{"repo":"rzcastilho/do_it","free":true,"listed":false,"github":"https://github.com/rzcastilho/do_it","clone":"git clone https://github.com/rzcastilho/do_it.git","description":"Do It - Elixir Command Line Interface Library","language":"Elixir","stars":93,"topics":["elixir","cli","command-line-interface","command-line-tool"],"license":null,"category":"cli-tools","readme_excerpt":"Do It Elixir Command Line Interface Library. A library that helps to develop CLI tools with Elixir. Installation The package can be installed by adding do it to your list of dependencies in mix.exs : Usage Do It have two main components: DoIt.Command - represents a single command. DoIt.MainCommand - the entrypoint of the application where you declare all the commands, must be used as main module in escript definition. The commands version and help are automatic generated for the client. The version number is obtained from mix.exs or option version in MainCommand . So, if you have a client named cli , you can type cli version and cli help to get the version number and the list of commands respectively from the client. MainCommand It's the entrypoint of your CLI, it generates functions matching all declared commands in that module, delegating the call to the matched command. A MainCommand could be defined as follows: Command We can define a new command as follows: A help option is automatically added to the command to describe its usage. Use DoIt.Command and provide a required description , the command name is the module name, you can override that name using the name option. You can declare subcommands in a command to group them logically using the subcommand macro. Package There are two ways to generate the binaries. - escript - burrito-elixir escript To generate an application using the escript, you have to add a :escript key with the :main module option to your project prop","default_branch":null,"files":null,"tree":[],"storefront":"/r/rzcastilho","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rzcastilho/do_it/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}