astra shellenv
astra shellenv [-qV] [--ignore-beta-warnings] [--ignore-multiple-paths]
[--no-input] [--no-update-notifier] [--[no-]spinner] [--color
[=WHEN]] [--dump-logs[=FILE]] [-h[=all]]
[--default-args=<$defaultArgs>] [--home=<$home>] [-o=FORMAT]
[--rc=<$rc>]
Completions, configuration, and more
Eval-ing the output of this command will:
-
Add the binary to your PATH
-
Enable shell completions
-
Optionally set any other configuration environment variables.
Intended to be added to your shell profile (.zprofile, .bash_profile, .profile, etc.), but you can technically just eval it in any shell session to get completions and update your PATH for that session.
Options
--home-
Sets the
ASTRA_HOMEenv var. Seeastra config home path -hfor how this is resolved. --rc-
Sets the
ASTRARCenv var. Seeastra config path -hfor how this is resolved. --ignore-multiple-paths-
Ignore warnings about multiple astra home folders or astrarc files being present. Sets
ASTRA_IGNORE_MULTIPLE_PATHS=trueunder the hood. --ignore-beta-warnings-
Ignore warnings about commands being in beta. Sets
ASTRA_IGNORE_BETA_WARNINGS=trueunder the hood. --no-update-notifier-
Disables background update checks notifications. Sets
ASTRA_NO_UPDATE_NOTIFIER=trueunder the hood. --default-args-
Sets the default args used for every CLI command (e.g. --no-spinner or --no-color). Sets
ASTRA_DEFAULT_ARGSunder the hood.
Common Options
-h,--help-
Show this help message and exit.
-o,--output-
One of: human, json, csv
-V,--verbose-
Enable verbose logging output
-q,--quiet-
Only output essential information
--spinner-
Enable/disable loading spinners
--no-input-
Don’t ask for user input (e.g. confirmation prompts)
--color-
One of: auto, never, always
--dump-logs-
Write all logs to an optionally specified file
Examples
# Put this in your shell profile (e.g. ``~/.zprofile``) to generate completions and set your PATH
$ eval "$(/path/to/astra shellenv)"
# Set a custom ``ASTRA_HOME`` path
$ eval "$(/path/to/astra shellenv --home /path/to/astra/home)"
# Set a custom ``ASTRARC`` path
$ eval "$(/path/to/astra shellenv --rc /path/to/astrarc)"
# Disable update notifications
$ eval "$(/path/to/astra shellenv --no-update-notifier)"
# Check the helptext for plenty more options
$ astra shellenv -h