Stream: ideas

Topic: basic-cli Command API


view this post on Zulip Richard Feldman (Jul 28 2023 at 20:52):

I'm using the Command API for the first time - really nice job with it @Luke Boswell! :heart_eyes:

I had a couple of ideas:

  1. Call it Cmd to make calling its functions more concise (e.g. |> Cmd.arg over |> Command.arg)
  2. Change output to return Task Output (Output, Error) and then remove the status part of the Output record. This way, output Just Works with Task.await, whereas currently since it can never fail, it takes an unusual amount of work to bail out of a chain of tasks if it fails :big_smile:

Last updated: Jun 16 2026 at 16:19 UTC