config
Read and write the local CLI configuration file — get, set, and list
config reads and writes the CLI's local settings file. All three subcommands — get, set, and list — are entirely local: no network, no authentication. They operate only on the allowlisted, non-secret keys.
config is the one command group that emits plain text, not the schema-bearing JSON envelope. Its subcommands ignore --format and --json — config get prints a bare value, config list prints key=value lines. Parse them as plain text, not JSON.
The allowlisted keys are:
| Key | Purpose |
|---|---|
api_url | Solwyn Cloud API base URL. |
default_project | Project ID used when --project and SOLWYN_PROJECT_ID are unset. |
format | Default output format: table or json. |
Anything else is rejected as a usage error. For the file's location, precedence against flags and environment variables, and each field in detail, see Configuration.
config get
Print one configuration value. An unset key prints an empty line.
$ solwyn config get default_project
proj_abc12345| Option | Type | Default | Purpose |
|---|---|---|---|
key | argument | required | Configuration key to read. |
| Contract | |
|---|---|
| Auth | local (none) |
| Exit codes | 0 success · 2 usage |
| JSON schema | none (plain text value) |
config set
Validate and persist one value. The write is atomic, and a confirmation is printed to stderr.
$ solwyn config set default_project proj_abc12345
Set default_project.| Option | Type | Default | Purpose |
|---|---|---|---|
key | argument | required | Configuration key to update. |
value | argument | required | New value for the key. |
| Contract | |
|---|---|
| Auth | local (none) |
| Exit codes | 0 success · 2 usage |
| JSON schema | none (confirmation on stderr) |
An invalid key or value exits 2 without changing the file.
config list
Print every allowlisted key and value in deterministic order, one key=value per line. Unset keys print an empty value.
$ solwyn config list
api_url=https://api.solwyn.ai
default_project=proj_abc12345
format=table| Contract | |
|---|---|
| Auth | local (none) |
| Exit codes | 0 success · 2 usage |
| JSON schema | none (plain text key/value list) |
Related
- Configuration — file location, format, and resolution order
login— where credentials are stored (not here)