Skip to content

feat: add wt config update command#1083

Merged
max-sixty merged 1 commit intomainfrom
deprecated-config
Feb 17, 2026
Merged

feat: add wt config update command#1083
max-sixty merged 1 commit intomainfrom
deprecated-config

Conversation

@max-sixty
Copy link
Copy Markdown
Owner

Summary

  • Adds wt config update — detects deprecated config patterns, previews changes with a diff, and applies with confirmation (--yes to skip prompt)
  • Extracts format_deprecation_warnings() as a shared helper to avoid duplicating warning formatting between config show and config update
  • Uses get_config_path() (respects WORKTRUNK_CONFIG_PATH and --config) for user config resolution

Test plan

  • 4 non-interactive snapshot tests: no deprecations, template vars, commit-generation, approved-commands
  • 2 PTY-based interactive tests: prompt accept and decline flows
  • 1057 integration tests pass, 530 unit tests pass
  • All lints clean (pre-commit run --all-files)

This was written by Claude Code on behalf of @max-sixty

Adds a command that detects deprecated config patterns (renamed template
variables, restructured sections, approved-commands), previews the changes
with a diff, and applies them with confirmation.

Extracts `format_deprecation_warnings()` from `format_deprecation_details()`
to share warning formatting between `config show` and `config update`.

Co-Authored-By: Claude <noreply@anthropic.com>
pub fn format_deprecation_details(info: &DeprecationInfo) -> String {
/// Lists which deprecated patterns were found: template variables, config sections,
/// approved-commands. Used by both `format_deprecation_details` (which adds the "mv"
/// hint) and `config migrate` (which applies automatically).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the docstring references config migrate but the command is config update.

Suggested change
/// hint) and `config migrate` (which applies automatically).
/// approved-commands. Used by both `format_deprecation_details` (which adds the "mv"
/// hint) and `config update` (which applies automatically).

@max-sixty max-sixty merged commit b70b99e into main Feb 17, 2026
21 checks passed
@max-sixty max-sixty deleted the deprecated-config branch February 17, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants