Pathrule,
from your terminal.
Install with npm, run pathrule setup in a repository, and your coding agents are connected: an MCP entry for each of them, plus hooks and knowledge files for Claude Code, and for Codex when the repository has Codex files. A new folder is set up on Pathrule Cloud for shared workspaces; add --local to keep it on this machine with no account. Commands print stable JSON with --json for scripts and CI.
$ npm i -g @pathrule/cli$ pathrule setup[ok] Created workspace "acme-shop" in "Acme".Attached /Users/you/repos/acme-shop to workspace "acme-shop".[ok] claude-code: MCP entry installed (~/.claude.json)Synced "acme-shop": 2 companion file(s) written, 0 skipped; hook index updated.$ pathrule statusPathrule status Edition: Pathrule Cloud (this project's choice)
What the CLI owns.
$ pathrule login --no-openPathrule CLI login[info] One-time code: FJKD-2M9QVisit https://app.pathrule.io/device?code=FJKD-2M9Q on any browser to approve this terminal.[ok] Signed in as you@acme.com
Sign in on a desktop or over SSH.
pathrule login shows a one-time code and opens Pathrule Web to approve it. On a machine with no browser, add --no-open and approve the code from any other device. Most people never run it directly, because pathrule setup signs you in when needed.
$ pathrule setup --localPathrule setup (local)[ok] Created local workspace "acme-shop" at ~/repos/acme-shop[ok] Hooks + offline context index ready (no account, no cloud).
One command per repository.
pathrule setup uses this folder's workspace or creates one, attaches the current folder, writes the MCP entry for each AI client and syncs the agent files. With --local it does the same with no account, and the knowledge is stored on this machine.
$ pathrule install cursor[ok] cursor: installed (~/.cursor/mcp.json)$ pathrule sync[ok] Synced "acme-shop": 2 companion file(s) written, 0 skipped; hook index updated.
Each agent, reached its own way.
Claude Code gets a prompt-submit hook, so context arrives before the agent acts, and so does Codex when the repository has Codex files. Cursor, GitHub Copilot and Windsurf get the MCP entry and reach the knowledge through Pathrule's MCP tools. pathrule install rewrites an MCP entry, and pathrule sync keeps the hook and knowledge files current.
$ pathrule memory list$ pathrule memory read "Checkout flow decisions"$ pathrule search "payment retries"# use rule or skill in place of memory
Read and search it in the terminal.
List, read and search knowledge from the terminal in either edition. The CLI does not write knowledge: your agent writes it through Pathrule's MCP tools, and you edit local knowledge in the Local Console or VS Code.
$ pathrule doctorPathrule doctor[ok] auth: Pathrule Cloud (https://cloud.pathrule.io)[ok] cwd_attach: current folder is attached[ok] claude-code: installed[warn] codex: not installed# pathrule install codex writes the missing entry
One command tells you what is wrong.
Read-only diagnostics for this folder's edition and workspace, your Pathrule Cloud sign-in, the files Pathrule manages and each agent's MCP entry, with the next command to run when the sign-in or the attachment is off.
$ pathrule doctor --json | jq -r '.data.mcp[] | select(.installed == false) | .client'codex# exit code is non-zero when a check fails
Stable JSON on request.
Add --json and a command prints a versioned envelope instead of human output, so a CI runner reads a result rather than parsing text.
Everything a connected agent needs on this machine, plus the parts that only make sense in a terminal. Pick one to see the command behind it.
From install to a connected agent.
- Install
npm i -g @pathrule/clion macOS, Linux or Windows, with Node.js 22.14.0 or later. - Set up the repository
pathrule setupsigns you in when needed, finds or creates the workspace and attaches this folder.--localskips the account. - Connect your agentsMCP entries are written for every agent, hooks and knowledge files for Claude Code and Codex, and
pathrule doctorconfirms them.
Two commands, and a third tells you whether it worked. Billing and team admin open Pathrule Web in your browser rather than being reimplemented in the terminal.