ctx_upgrade
Update context-mode and reconfigure its hooks.
ctx_upgrade updates context-mode in one step. The upgrade pulls the latest
source from GitHub, builds it, updates your global install, and reconfigures the
hooks for your platform so routing keeps working after the new version lands.
As an MCP tool, ctx_upgrade returns the exact shell command to run and asks your
agent to execute it and show the result as a checklist — the heavy lifting happens
in the context-mode upgrade run that command performs. Either way the end result
is the same: a fresh build wired into your agent CLI.
The hook setup matters: an update that changed the hook contract would silently break routing if the configuration were left stale. The upgrade reconfigures hooks as part of the run, so the new build is wired into your agent CLI when it finishes.
What it does
Pull the latest
Fetches the current context-mode source from GitHub.
Build
Compiles the freshly pulled source.
Update the global install
Replaces your installed context-mode with the new build.
Reconfigure hooks
Rewrites the hook configuration for your platform so routing fires under the new version.
Your knowledge base is preserved across upgrades. Indexed content and session memory survive the update, so you do not re-index anything afterward. Restart your session after the upgrade completes so the new version loads.
Example
Run the upgrade from the terminal.
context-mode upgradeYou can also run it inside an agent with the slash command
/context-mode:ctx-upgrade.
After upgrading
Confirm the new build is healthy by running the diagnostic checklist. It verifies runtimes, the knowledge base, hook registration, and the installed version in one pass.