Stashbase

Config

Configuration for the CLI

With the config command, you can configure the behavior of the command line interface. For example, you can manage credential profiles or set the default output format for returned data.

stashbase config <COMMAND> [OPTIONS]

API Key

The API key used to authenticate your requests to Stashbase API. API-key commands operate on the active profile, resolved from STASHBASE_PROFILE, then the configured default profile, then default.

Set

Set the API key for the CLI. After this command you will be prompted to enter the API key safely, so the key is not exposed in the shell history.

stashbase config api-key set

To read the key from standard input—for example, in automation—use:

printf '%s' "$STASHBASE_API_KEY" | stashbase config api-key set --stdin

Print

Print the masked API key for the active profile.

stashbase config api-key print

Credential profiles

Credential profiles let one CLI installation authenticate with multiple Stashbase workspaces. API keys are stored separately in the OS secure credential store; the config file contains only the profile metadata.

The built-in default profile preserves the existing single-workspace workflow. It cannot be added or removed; manage its key with config api-key set.

Add or update a profile

Add a named profile and securely save its API key. Profile names can contain letters, numbers, hyphens, and underscores.

stashbase config profile add <NAME> [OPTIONS]

Prop

Type

stashbase config profile add acme --workspace acme-production
printf '%s' "$ACME_STASHBASE_API_KEY" | stashbase config profile add acme --stdin

List profiles

List the built-in default profile and every configured named profile. Add --json for machine-readable output.

stashbase config profile list
stashbase config profile list --json

Show the active profile

Print the profile that would be used for the current command. This respects STASHBASE_PROFILE; add --json for JSON output.

stashbase config profile current
STASHBASE_PROFILE=acme stashbase config profile current --json

Set the default profile

Select the profile used when STASHBASE_PROFILE is not set. Use default to return to the built-in single-workspace profile.

stashbase config profile use acme
stashbase config profile use default

Remove a profile

Remove a named profile and its secure-store API key. The active default cannot be removed; select another profile first.

stashbase config profile remove acme

Output

Default output format is used for formatting the output of returned data, except secrets.

Set

Set default output format. Possible values are list, table and json.

stashbase config output set table

Print current default output format.

Output secrets

Default output format is used for formatting the output of secrets.

Set

Set default output format. Possible values are list, dotenv, table and json.

stashbase config output-secrets set dotenv

Print current default output format for secrets.

Print the current configuration.

Options

Prop

Type

stashbase config print

Expand refs

Expand secrets references by default for the "list" and "get" secrets commands.

Set

Set default expand-refs. Possible values are true or false.

stashbase config expand-refs set true

Print current expand-refs configuration.

Print the current configuration.

stashbase config print

Reset

Reset the configuration to the default values and remove stored API keys for named profiles.

stashbase config reset

Options

Prop

Type

On this page