ratchet update
Refreshes Ratchet skill files and slash commands for all configured tools in the project. Applies the current Ratchet version, active profile workflows, and delivery settings to all existing tool installations.
Synopsis
ratchet update [path] [options]
[path] is the target project directory. Defaults to . (current directory).
Options
| Option | Argument | Description |
|---|---|---|
--force | Force update even when tools are up to date. |
Behavior
-
Prerequisite check.
updaterequires.ratchet/to exist at the target path. If not found, the command exits with:No Ratchet directory found. Run 'ratchet init' first. -
Migration. Before any update,
updateruns a one-time migration pass on existing projects to align them with the current profile system. Tool directories detected in the project are preserved. -
Profile and delivery resolution. The active profile and delivery mode are read from the global config:
coreprofile (default): workflowspropose,apply,verify,archive,propose-standard,apply-batch,archive-batch,propose-batch,brainstorm.customprofile: only the workflows listed in the global config'sworkflowsfield.deliverycontrols whether skills, commands, or both are written.
-
Legacy artifact detection. If legacy Ratchet artifacts are present:
- Interactive mode: prompts to upgrade and clean up.
- Non-interactive with
--force: cleanup proceeds automatically; detected legacy tools are upgraded to the new skills system. - Non-interactive without
--force: a warning is printed and the command continues without cleanup.
-
Smart update detection. Without
--force,updatecomputes which configured tools need refreshing:- Version mismatch: the
generatedByversion embedded in existing skill files differs from the current Ratchet version. - Config sync needed: the installed set of workflows or delivery mode differs from what the active profile specifies.
Tools that already match the current version and profile are skipped. The command reports which tools are being updated and which are already up to date.
- Version mismatch: the
-
Force update. With
--force, all configured tools are updated regardless of their current version or sync state. -
Skill and command regeneration. For each tool being updated:
- Skill files under
<tool-dir>/skills/are rewritten from current templates. - Slash-command files are rewritten via the tool's command adapter.
- Skill directories and command files for workflows no longer in the active profile are removed.
- If delivery changed to skills-only, existing command files are removed. If changed to commands-only, existing skill directories are removed.
- Skill files under
-
New tool detection. After updating,
updatescans the project for tool directories that are not yet configured and prints a hint to runratchet initto add them. -
Extra workflow note. If any installed workflows are not part of the active profile, a note is displayed suggesting
ratchet config profileto manage them.
Output
update prints a per-tool spinner during generation and a summary on completion:
- Tools updated at the current version.
- Tools that failed, with error messages.
- Count of removed command files or skill directories when delivery changed.
- Count of removed files for deselected workflows.
When all tools are already up to date (without --force), the command reports the version and lists the up-to-date tools without writing any files.
Notes
- Restart the IDE after
updatefor slash command changes to take effect. updatedoes not re-run tool selection or modify.ratchet/config.yaml. To change which tools are configured or to add new tools, useratchet init.- Use
--forceto unconditionally rewrite all skill and command files, for example after manually editing a skill file that should be reset to the managed template.