Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
document examples and env vars
  • Loading branch information
DannyBen committed Nov 21, 2019
commit ce0f3d1fc78419c57a83728b2382ed0752d5622b
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ flags:
- long: --force
short: -f
help: Overwrite existing files

examples:
- download example.com
- download example.com ./output -f
```


Expand All @@ -91,6 +95,9 @@ name: cli
help: Sample application
version: 0.1.0

environment_variables:
API_KEY: Set your API key

commands:
- name: download
short: d
Expand All @@ -108,6 +115,13 @@ commands:
short: -f
help: Overwrite existing files

examples:
- cli download example.com
- cli download example.com ./output -f

environment_variables:
DEFAULT_TARGET_LOCATION: Set the default location to download to

- name: upload
short: u
help: Upload a file
Expand All @@ -134,7 +148,7 @@ Configuration Reference

### Command options

With the exception of `version` and `commands` (shich define subcommands),
With the exception of `version` and `commands` (which define subcommands),
everything else in this section is suitable both for the main script, and for
any subcommand you define using `commands`.

Expand All @@ -150,6 +164,16 @@ help: a sample script generated with bashly
# The string to display when using --version
version: 0.1.0

# Specify an array of examples to show when using --help
examples:
- myscript download
- myscript download --force

# Specify an array of environment variables needed by your script
# This is used purely for displaying in the help text (when using --help)
environment_variable:
VARIABLE_NAME: Variable help text

# Specify the array of subcommands to generate.
# Each subcommand will have its own args and flags.
# If this is provided, then you cannot provide flags or args for the main
Expand Down