storemyapi
CLI Reference

Config

Configure CLI defaults, authentication, and output preferences.

Config

The storemyapi config command manages your local CLI configuration.

View current config

storemyapi config list
KEY                  VALUE
defaultProject       my-saas-app
defaultEnvironment   development
format               text
apiUrl               https://api.storemyapi.com

Set a config value

storemyapi config set <key> <value>

Available keys:

KeyDescriptionDefault
defaultProjectDefault project for all commands(none)
defaultEnvironmentDefault environmentdevelopment
formatOutput format: text, json, tabletext
apiUrlAPI endpoint (for self-hosted)https://api.storemyapi.com
# Set defaults
storemyapi config set defaultProject my-saas-app
storemyapi config set defaultEnvironment staging
storemyapi config set format json

Get a config value

storemyapi config get <key>
$ storemyapi config get defaultProject
my-saas-app

Reset config

# Reset a single key
storemyapi config unset defaultProject

# Reset all config to defaults
storemyapi config reset

Config file location

The global config file lives at ~/.storemyapi/config.json.

You can also create a .storemyapi file in any project directory to set project-specific overrides:

{
  "project": "my-saas-app",
  "environment": "development"
}

Resolution order (highest priority first):

  1. Command-line flags (--project, --env)
  2. Environment variables (STOREMYAPI_PROJECT, STOREMYAPI_ENV)
  3. Local .storemyapi file (current directory, walking up)
  4. Global ~/.storemyapi/config.json
  5. Built-in defaults

Environment variables

Every config option can be overridden with an environment variable:

VariableOverrides
STOREMYAPI_TOKENAuthentication token
STOREMYAPI_PROJECTdefaultProject
STOREMYAPI_ENVdefaultEnvironment
STOREMYAPI_FORMATformat
STOREMYAPI_API_URLapiUrl
NO_COLORDisables colored output

On this page