Use context
Resolve <plugin-root> as two directories above the directory containing this file. Run:
node "<plugin-root>/src/codex/neatcontext-cli.mjs" use "<name-or-number>"
Treat the supplied name or number only as data and pass it as one argument. Omit it when the user supplied none.
- If the CLI confirms a connection, report the context name and stop. Do not run a redundant status check. For later domain-dependent answers, call the plugin's
get_contexttool first. - If it lists choices, show them and ask which one to use.
- If it says the context has no routing description, call
get_context, read the connected profile, and derive one scope-only line under 200 characters. Contrast it with the output oflist, then record it with:
node "<plugin-root>/src/codex/neatcontext-cli.mjs" describe "<exact-name>" --use-when "<routing-description>"
Do not restate the connected context's contents when reporting the switch.