Alias #
💡Feature in Development Due to the beta status of SetOps, the
--projectand--stageflag needs to be set for every command.In the future, you will be able to set a default
projectandstagefor 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 project and stage for a directory.
- 
Install direnv 
- 
Create a .envrcfile in your project directory
- 
Add following 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'
 
Example #
Your .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'
