Skip to content

pathrule/cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pathrule

Pathrule is the shared memory, rules, and skills layer for AI coding agents.

Use the CLI to connect a local repository to Pathrule, sync the workspace context agents need, and install Pathrule into tools such as Claude Code, Cursor, Codex, and Windsurf.

Getting Started

Install the CLI:

npm i -g @pathrule/cli

Run setup from the repository you want to connect:

cd your-project
pathrule setup

pathrule setup guides you through sign-in when needed, finds or creates the right workspace, attaches the current folder, syncs local companion files, and offers to install Pathrule for your AI tools.

What Pathrule Gives Your Agents

  • Path-scoped context, delivered just in time instead of pasted into every chat.
  • Shared memory, rules, and skills that survive between AI sessions.
  • One workspace layer for Claude Code, Cursor, Codex, Windsurf, and other MCP-compatible tools.
  • Local setup for companion files, MCP config, SSH sessions, and headless terminals.
  • A privacy-first model: Pathrule does not read, scan, or upload your source code.

Common Commands

pathrule setup
pathrule sync
pathrule start
pathrule status

For diagnostics:

pathrule doctor

For scripted setup:

pathrule setup --json
pathrule setup --workspace <workspace-id-or-name> --target all --yes

Install Options

Pathrule CLI requires Node.js >=20.11.1 on every supported platform. After install, the binary lives at whatever path your npm global prefix puts it — verify with command -v pathrule (macOS/Linux) or where pathrule (Windows).

macOS

npm i -g @pathrule/cli
pathrule login
pathrule setup
pathrule doctor

Upgrade:

npm i -g @pathrule/cli@latest

Linux

npm i -g @pathrule/cli
pathrule login
pathrule setup
pathrule doctor

Optional: the bridge daemon can run under systemd --user if your distro ships user services. pathrule daemon start works without systemd; the daemon stays foreground until you stop it.

Windows

npm i -g @pathrule/cli
pathrule login
pathrule setup
pathrule doctor

Notes:

  • Windows autostart for the bridge daemon is not yet wired up. Start it manually with pathrule daemon start. pathrule daemon status --json reports supported: false, method: "task-scheduler" so scripts can distinguish a planned no-op from a real failure.
  • The CLI writes a pathrule-hook.cmd shim next to pathrule-hook.js inside %USERPROFILE%\.pathrule\bin\. AI clients that spawn hooks without a shell (Codex on Windows) execute the .cmd directly.
  • If you use a corporate proxy or custom CA, set HTTPS_PROXY, HTTP_PROXY, NO_PROXY, or NODE_EXTRA_CA_CERTS in the env before running pathrule install <client> — the CLI propagates those values into the managed MCP entry so AI-client-spawned MCP can still reach Supabase.

Homebrew (macOS)

The Homebrew formula is generated by every release but the tap is not yet publishing publicly. Until the pathrule/homebrew-tap repository goes live, prefer npm i -g @pathrule/cli@latest. Once the tap is up, brew upgrade pathrule will be advertised through versions.json.

Local-state override

Pathrule keeps per-user state in ~/.pathrule on every supported OS by default. Override with PATHRULE_HOME if you need a custom location:

PATHRULE_HOME=/srv/pathrule pathrule sync

pathrule install <client> propagates the active PATHRULE_HOME into the managed MCP entry so AI-client-spawned MCP reads the same credentials.

Authentication

Most users do not need to run pathrule login manually. pathrule setup starts the hosted Pathrule authorization flow when the CLI is not signed in.

You can still sign in directly:

pathrule login

The login flow shows a one-time code and opens Pathrule Web in your browser.

Security

Pathrule is designed for team workspaces without taking custody of your repository:

  • Your source code stays on your machine.
  • Cloud access uses user sessions, not embedded service keys.
  • Workspace permissions are enforced server-side and by database row-level security.
  • The local bridge binds to loopback and is intended for local browser and CLI workflows only.

For more details, visit pathrule.io.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors