diff --git a/dev/cli_md_template.md b/dev/cli_md_template.md index f03da55dde..ba64d8a21e 100644 --- a/dev/cli_md_template.md +++ b/dev/cli_md_template.md @@ -10,10 +10,18 @@ pip install cortex ## Install the CLI without Python Client +### Mac/Linux OS + ```bash # Replace `INSERT_CORTEX_VERSION` with the complete CLI version (e.g. 0.18.1): $ bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/vINSERT_CORTEX_VERSION/get-cli.sh)" -# For example to download CLI version 0.18.1 (Note the 'v'): +# For example to download CLI version 0.18.1 (Note the "v"): $ bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/v0.18.1/get-cli.sh)" ``` + +### Windows + +To install the Cortex CLI on a Windows machine, follow [this guide](../guides/windows-cli.md). + +## Command overview diff --git a/dev/generate_cli_md.sh b/dev/generate_cli_md.sh index c30be6a841..7992f91131 100755 --- a/dev/generate_cli_md.sh +++ b/dev/generate_cli_md.sh @@ -18,15 +18,18 @@ set -e ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. >/dev/null && pwd)" -cat $ROOT/dev/cli_md_template.md +out_file=$ROOT/docs/miscellaneous/cli.md +rm -f $out_file +echo "building cli..." make --no-print-directory -C $ROOT cli -echo # Clear default environments cli_config_backup_path=$HOME/.cortex/cli-bak-$RANDOM.yaml mv $HOME/.cortex/cli.yaml $cli_config_backup_path +cat $ROOT/dev/cli_md_template.md >> $out_file + commands=( "deploy" "get" @@ -47,17 +50,18 @@ commands=( "completion" ) -echo "## Command overview" -echo +echo "running help commands..." for cmd in "${commands[@]}"; do - echo "### ${cmd}" - echo - echo -n '```text' - $ROOT/bin/cortex help ${cmd} - echo '```' - echo + echo '' >> $out_file + echo "### ${cmd}" >> $out_file + echo '' >> $out_file + echo -n '```text' >> $out_file + $ROOT/bin/cortex help ${cmd} >> $out_file + echo '```' >> $out_file done # Bring back CLI config mv -f $cli_config_backup_path $HOME/.cortex/cli.yaml + +echo "updated $out_file" diff --git a/docs/guides/windows-cli.md b/docs/guides/windows-cli.md index 99bdd1253b..3f62406152 100644 --- a/docs/guides/windows-cli.md +++ b/docs/guides/windows-cli.md @@ -42,7 +42,7 @@ pip install cortex # Replace `INSERT_CORTEX_VERSION` with the complete CLI version (e.g. 0.18.1): $ bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/vINSERT_CORTEX_VERSION/get-cli.sh)" -# For example to download CLI version 0.18.1 (Note the 'v'): +# For example to download CLI version 0.18.1 (Note the "v"): $ bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/v0.18.1/get-cli.sh)" ``` diff --git a/docs/miscellaneous/cli.md b/docs/miscellaneous/cli.md index 43f22058cf..75b6575050 100644 --- a/docs/miscellaneous/cli.md +++ b/docs/miscellaneous/cli.md @@ -16,7 +16,7 @@ pip install cortex # Replace `INSERT_CORTEX_VERSION` with the complete CLI version (e.g. 0.18.1): $ bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/vINSERT_CORTEX_VERSION/get-cli.sh)" -# For example to download CLI version 0.18.1 (Note the 'v'): +# For example to download CLI version 0.18.1 (Note the "v"): $ bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/v0.18.1/get-cli.sh)" ```