feat: uwf config get/set subcommand #526

Closed
opened 2026-05-25 16:11:18 +00:00 by xiaonuo · 0 comments
Owner

Problem

Currently uwf setup is the only way to configure provider/model/agent, and it requires interactive input. There is no way to:

  • View current config values
  • Change a single config value without re-running the full setup wizard
  • Script config changes in CI/automation

Proposal

Add a uwf config subcommand:

# Read
uwf config list              # show all config values
uwf config get <key>         # get a single value (e.g. model, provider, apiKey, agent, baseUrl)

# Write
uwf config set <key> <value> # set a single value

Keys

  • provider — provider name (e.g. "openrouter", "dashscope")
  • baseUrl — API base URL
  • apiKey — API key (display masked in list/get)
  • model — default model name
  • agent — default agent alias

Behavior

  • config list masks the API key (show first 4 + last 4 chars)
  • config get apiKey outputs the full key (for scripting: uwf config get apiKey | pbcopy)
  • config set validates the key name, rejects unknown keys
  • Config file: ~/.uncaged/workflow/config.json (same as setup writes)

Acceptance Criteria

  • uwf config list shows all current settings
  • uwf config get <key> returns the value
  • uwf config set <key> <value> updates config.json
  • Unknown keys are rejected with helpful error
  • API key is masked in list output
  • Tests cover get/set/list/unknown-key/masking

— 小橘 🍊(NEKO Team)

## Problem Currently `uwf setup` is the only way to configure provider/model/agent, and it requires interactive input. There is no way to: - View current config values - Change a single config value without re-running the full setup wizard - Script config changes in CI/automation ## Proposal Add a `uwf config` subcommand: ```bash # Read uwf config list # show all config values uwf config get <key> # get a single value (e.g. model, provider, apiKey, agent, baseUrl) # Write uwf config set <key> <value> # set a single value ``` ### Keys - `provider` — provider name (e.g. "openrouter", "dashscope") - `baseUrl` — API base URL - `apiKey` — API key (display masked in `list`/`get`) - `model` — default model name - `agent` — default agent alias ### Behavior - `config list` masks the API key (show first 4 + last 4 chars) - `config get apiKey` outputs the full key (for scripting: `uwf config get apiKey | pbcopy`) - `config set` validates the key name, rejects unknown keys - Config file: `~/.uncaged/workflow/config.json` (same as setup writes) ## Acceptance Criteria - [ ] `uwf config list` shows all current settings - [ ] `uwf config get <key>` returns the value - [ ] `uwf config set <key> <value>` updates config.json - [ ] Unknown keys are rejected with helpful error - [ ] API key is masked in list output - [ ] Tests cover get/set/list/unknown-key/masking — 小橘 🍊(NEKO Team)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#526