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 listKEY VALUE
defaultProject my-saas-app
defaultEnvironment development
format text
apiUrl https://api.storemyapi.comSet a config value
storemyapi config set <key> <value>Available keys:
| Key | Description | Default |
|---|---|---|
defaultProject | Default project for all commands | (none) |
defaultEnvironment | Default environment | development |
format | Output format: text, json, table | text |
apiUrl | API 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 jsonGet a config value
storemyapi config get <key>$ storemyapi config get defaultProject
my-saas-appReset config
# Reset a single key
storemyapi config unset defaultProject
# Reset all config to defaults
storemyapi config resetConfig 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):
- Command-line flags (
--project,--env) - Environment variables (
STOREMYAPI_PROJECT,STOREMYAPI_ENV) - Local
.storemyapifile (current directory, walking up) - Global
~/.storemyapi/config.json - Built-in defaults
Environment variables
Every config option can be overridden with an environment variable:
| Variable | Overrides |
|---|---|
STOREMYAPI_TOKEN | Authentication token |
STOREMYAPI_PROJECT | defaultProject |
STOREMYAPI_ENV | defaultEnvironment |
STOREMYAPI_FORMAT | format |
STOREMYAPI_API_URL | apiUrl |
NO_COLOR | Disables colored output |