Skip to content

Revise a chain

care revise is the AI counterpart to care generate: instead of building a chain from a task, it hands an existing saved chain to MAGE and asks for a minimal, targeted edit described in plain language. It’s the terminal twin of the TUI’s /revise command.

MAGE plans the smallest edit that satisfies your instruction. By default the command only previews that plan — nothing is written. Pass --yes to save the result as a new version of the same chain.

Terminal window
care revise weather "use Celsius and add a 3-day forecast"
care revise weather "use Celsius and add a 3-day forecast" --yes
FlagDefaultPurpose
<change>…—What to change, in natural language (nargs=+, so quote it).
--channel NAMElatestVersion channel to read and write.
--mode fast|deep—MAGE mode override (defaults to MAGE’s own default).
--yesoffSave the edited chain as a new version (default: preview only).
--jsonoffEmit the edited chain as JSON instead of the plan summary.

When you confirm with --yes, the new version reuses the existing chain’s name and records change_summary="revise: <instruction>", so the edit shows up clearly in care lineage and the chain’s history.

If the <chain_id> reference is ambiguous, revise lists the candidates and asks you to re-run with an explicit id. On a 401/403 it prints a friendly token-expiry hint instead of a raw error.