Skip to content

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.

zsh
npm i -g @pathrule/clipathrule 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.

ssh prod-builder
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.

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.

  1. Installnpm i -g @pathrule/cli on macOS, Linux or Windows, with Node.js 22.14.0 or later.
  2. Set up the repositorypathrule setup signs you in when needed, finds or creates the workspace and attaches this folder. --local skips the account.
  3. Connect your agentsMCP entries are written for every agent, hooks and knowledge files for Claude Code and Codex, and pathrule doctor confirms 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.

Where to go deeper.

One install.
Your agents are connected.

  • Every commandThe command reference, flag by flag.