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 emits plain text, not the schema-bearing JSON envelope. Its subcommands ignore --format and --json — and the root options are not even validated ahead of them — so config get prints a bare value and config list prints key=value lines whatever flags precede them. Parse them as plain text, not JSON.
The allowlisted keys are:
| Key | Purpose |
|---|---|
api_url | Solwyn Cloud API base URL. |
format | Default output format: table or json. |
credential_store | Where credentials are stored: auto, keyring or file. Any other value exits 2. SOLWYN_CREDENTIAL_STORE overrides it. solwyn login --store <mode> writes it. |
Anything else exits 2 with Invalid configuration key, including default_project, which CLI 0.5.0 removed: the project now comes from --project, SOLWYN_PROJECT or the repository's .solwyn.env (see Choosing the project). 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 api_url
https://api.solwyn.ai| 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 format json
Set format.| 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 · 3 credential lock (credential_store only) |
| JSON schema | none (confirmation on stderr) |
An invalid key or value exits 2 without changing the file, as does a failure to lock or write it. Setting credential_store takes the exclusive credential lock, like solwyn login --store <mode>, so a login in progress can't miss the change. If the lock can't be taken within 10 seconds, or can't be opened, it prints an Error: line on stderr (and a Hint: line when there is one) and exits 3 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)
credential_store=auto
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)