Environments
Command to interact with environments
The environments root command allows you to easily manage environments in your workspace.
stashbase environments <COMMAND> -p <PROJECT> [OPTIONS]List
Use this command to list environments within a selected project.
environments list -p <PROJECT> [OPTIONS]Options
Prop
Type
Examples
stashbase environments list -p my-project
# filter environments by production type
stashbase environments list -p my-project --production true
# sort environments by secret count
stashbase environments list -p my-project --sort-by secretCount
# sort in descending order
stashbase environments list -p my-project --sort descGet
Use this command to get selected environment in a selected project.
stashbase environments get (<NAME_OR_ID> -p <PROJECT> | --scope=environment) [OPTIONS]Options
Prop
Type
Examples
stashbase environments get my-env -p my-project
# format output as json
stashbase environments get my-env -p my-project --format json
# example with scope=environment (environment-scoped API Key required)
stashbase environments get --scope=environmentCreate
Use this command to create new environment in a selected project.
stashbase environments create <NAME> --type <TYPE> -p <PROJECT> [OPTIONS]Options
Prop
Type
Examples
stashbase environments create node_api-prod --prod true \
-p my-projectUpdate
Use this command to update existing environment.
stashbase environments update <NAME_OR_ID> -p <PROJECT> [OPTIONS]Options
Prop
Type
Examples
stashbase environments update my-env -n my-env-v2 \
-p my-projectCompare
Use this command to compare environments secrets in a selected project.
stashbase environments compare <NAME_OR_ID_1> <NAME_OR_ID_2> -p <PROJECT> [OPTIONS]Options
Prop
Type
Examples
stashbase environments compare my-env-1 my-env-2 -p my-projectDelete
Use this command to delete selected environment in a selected project.
stashbase environments delete <NAME_OR_ID> -p <NAME> [OPTIONS]Options
Prop
Type
Examples
stashbase environments delete my-env -p my-projectOpen
Use this command to open environment in a browser.
stashbase environments open <NAME_OR_ID> (-p <PROJECT> | --scope=environment) [OPTIONS]Options
This command does accept only global options.
Examples
stashbase environments open api-dev -p my-project