bug: `lean-ctx config set` doesn't seem to work
lean-ctx version: (run lean-ctx --version)
lean-ctx 3.6.22 (official, https://github.com/yvgude/lean-ctx)
OS: (macOS / Linux / Windows) Linux
AI tool: (Cursor / Claude Code / Copilot / Crush / other) N/A -- this is run in the terminal directly
What happened:
I want to change the config values on the terminal via lean-ctx config set.
What you expected: The value to be changed.
Steps to reproduce:
- Run
lean-ctx config set proxy_enabled false, but this doesn't seem to be limited to this config attribute specifically.
Relevant output:
Unknown config key: proxy_enabled
Fixed in v3.6.23 (released).
Root cause: lean-ctx config set used a hardcoded match arm with only ~12 keys, while the config schema defines 80+ valid keys.
Fix: Implemented a generic schema-based setter (config/setter.rs) that:
- Validates any key against the ConfigSchema
- Parses values according to the schema type (bool, integer, float, string, enum, string[])
- Performs a TOML round-trip with full serde validation
- Shows allowed enum values on invalid input
All documented config keys now work with lean-ctx config set, including proxy_enabled, profile, compression_level, memory_profile, etc.
Example:
$ lean-ctx config set proxy_enabled false
Updated proxy_enabled = false
$ lean-ctx config set compression_level invalid
Invalid value 'invalid'. Allowed: off, lite, standard, max
Available via lean-ctx update once v3.6.23 propagates.