Implement the devlog config command documented in README.md.
Context:
README.md documents:
devlog config set <key> <value>
devlog config get <key>
devlog config list
- The current
cmd/config.go command is only a stub and does not implement any subcommands
- The project already uses Viper and writes initial config in
internal/store/store.go
Expected behavior:
devlog config set <key> <value> updates configuration and persists it to ~/.devlog/config.json
devlog config get <key> prints the current value for a supported key
devlog config list prints the current configuration in a readable format
Supported keys should include the documented config values, including:
- defaults.project
- defaults.style
- defaults.language
- llm.enabled
- llm.provider
- llm.model
- llm.apiKeyEnvVar
Implementation notes:
- Align CLI key names with the actual config structure used in code and docs
- Validate unknown keys and invalid value types with clear error messages
- Support boolean parsing for keys like llm.enabled
- Ensure changes are written back safely without corrupting the existing config file
Acceptance criteria:
devlog config set, get, and list exist and appear in help output
- Config values persist correctly to
~/.devlog/config.json
- Unknown keys return a clear error
- Boolean and string values are parsed correctly
- Behavior matches the README documentation
Implement the devlog config command documented in README.md.
Context:
README.mddocuments:devlog config set <key> <value>devlog config get <key>devlog config listcmd/config.gocommand is only a stub and does not implement any subcommandsinternal/store/store.goExpected behavior:
devlog config set <key> <value>updates configuration and persists it to~/.devlog/config.jsondevlog config get <key>prints the current value for a supported keydevlog config listprints the current configuration in a readable formatSupported keys should include the documented config values, including:
Implementation notes:
Acceptance criteria:
devlog config set,get, andlistexist and appear in help output~/.devlog/config.json