Problem
tth config can show, get, and set values, but there is no quick way to open the config file in an editor, nor to print its resolved path for scripting. Users must remember where the file lives (~/.config/thoth/config.toml, or wherever THOTH_CONFIG/XDG_CONFIG_HOME point).
Proposed solution
Add two small subcommands under tth config:
tth config edit - open the resolved config file in $EDITOR (or $VISUAL), creating it with defaults if absent.
tth config path - print the resolved config file path and exit.
tth config path # /home/user/.config/thoth/config.toml
tth config edit # opens $EDITOR on that file
Alternatives considered
- Only
path, let users pipe to their editor - discarded: edit is a common convenience (git, gh, cargo all have it).
- Hardcode a default editor - discarded: respect
$VISUAL/$EDITOR, fall back to a sensible default only if unset.
Acceptance criteria
Scope
cli (extend the ConfigAction enum), config (reuse resolve_config_path / ensure_default_config).
Additional context
The ConfigAction enum in src/cli.rs already has Print/Get/Set to copy from. resolve_config_path() and ensure_default_config() already exist in src/config.rs. Good first issue: follows an established pattern.
Problem
tth configcan show,get, andsetvalues, but there is no quick way to open the config file in an editor, nor to print its resolved path for scripting. Users must remember where the file lives (~/.config/thoth/config.toml, or whereverTHOTH_CONFIG/XDG_CONFIG_HOMEpoint).Proposed solution
Add two small subcommands under
tth config:tth config edit- open the resolved config file in$EDITOR(or$VISUAL), creating it with defaults if absent.tth config path- print the resolved config file path and exit.Alternatives considered
path, let users pipe to their editor - discarded:editis a common convenience (git, gh, cargo all have it).$VISUAL/$EDITOR, fall back to a sensible default only if unset.Acceptance criteria
tth config pathprints the same pathresolve_config_path()returns.tth config editopens$VISUAL/$EDITORon that path.editcreates the file with defaults first if it does not exist.Scope
cli(extend theConfigActionenum),config(reuseresolve_config_path/ensure_default_config).Additional context
The
ConfigActionenum insrc/cli.rsalready hasPrint/Get/Setto copy from.resolve_config_path()andensure_default_config()already exist insrc/config.rs. Good first issue: follows an established pattern.