💡Feature in Development Due to the beta status of SetOps, the
--stageflag needs to be set for every command.
In the future, you will be able to set a default
stagefor a directory.
Set alias with default for directory #
You can use direnv as a shell extension to load and unload environment variables depending on the current directory. With this tool, you can set your
stage for a directory.
.envrcfile in your project directory
export SETOPS_PROJECT=<PROJECT> export SETOPS_STAGE=<STAGE>
Create an alias for your shell, e.g.:
alias sos='setops -p $SETOPS_PROJECT -s $SETOPS_STAGE'
.envrc should look like this:
# /myproject/.envrc export SETOPS_PROJECT=myproject export SETOPS_STAGE=staging
Then you can execute the following commands:
sos app # executes 'setops --project <PROJECT> --stage <STAGE> app'