Generate script

How to use Argbash online?

  1. The online generator takes the input from the textarea below and feeds it to Argbash. It then generates the script and its help message.
  2. You can select some example types that are pasted to the template editor, and observe the difference between templates as well as between generated scripts.
  3. Typically, you are interested in the commented template content right above the line beginning with # ARGBASH_GO.
  4. You can add support for additional arguments by adding lines with another declarations. You can also remove existing declarations, or you can modify existing ones.
  5. The generated script translates passed arguments into variables, so, for instance, if the script's CLI supports the --print argument, its value will be accessible as value of the _arg_print shell variable.
  6. Generate the script from the template by clicking the appropriate button (this is the same as running argbash over the template on your computer). You can request the generated code to contain comments, which is useful if you decide to examine the generated code. You should be able to use it as a black box, though.
  7. If the generation succeeds, you can select and copy the script to your clipboard, or you can download it as a file by clicking on the button at the bottom.
  8. Don't delete the two lines containing <-- needed because of Argbash and also take special care that normal and square parentheses are matched in your script.

Template writing guide Privacy concerns?