Open source core
What is open source in Pathrule, the pathrule repository and the CLI on npm under Apache-2.0, what runs with no account and no model, and where proprietary Pathrule Cloud begins.
On this page
Pathrule's foundation is open source. Your memories, rules and skills live in a format and on a machine you control, the code that stores, selects and delivers them is public, and nothing in it depends on Pathrule the company being reachable.
The repository
github.com/pathrule/pathrule is the open-source foundation, under Apache-2.0. It runs with no account, no network service and no model on your machine: the store, retrieval and ranking, the MCP server, the hooks, the learning loop and the CLI.
| Package | What it is |
|---|---|
protocol | The types and contracts every package shares, including the plugin contract versions. |
agent-ir | The atom formats a rule compiles into, and their deterministic compile and render. |
core | The knowledge store on embedded SQLite, retrieval and ranking, and the tool handlers. |
integrations | Everything written into an AI client: the hook and its index, instruction files, MCP entries, skills. |
mcp | The local MCP server, on stdio. |
host | One local process per Pathrule home, shared by the CLI, the MCP server and the extension. |
ui, local-console | The shared design system and the accountless Local Console behind pathrule ui. |
cloud | The Pathrule Cloud client built into the CLI: sign-in, attaching a folder, sync and the hook's Cloud extension. Using it needs a Pathrule Cloud account. |
cli | The pathrule command, and the composition of all of the above. |
vscode | The VS Code extension. It carries the CLI as its MCP server. |
The CLI is published on npm as @pathrule/cli and the MCP server as @pathrule/mcp, and the extension on the Visual Studio Marketplace and Open VSX. The open packages are released together on one version.
Two more repositories sit beside it under github.com/pathrule: benchmark, PathruleBench with its fixtures, scenarios, hidden checks and every published chain (see How we measure), and patterns, the curated, path-scoped bundles of memories, rules and skills you can import (see Patterns). Both are Apache-2.0. The earlier mcp repository, an older Pathrule MCP server under MIT, is kept public and frozen.
What the open foundation does on its own
Everything that happens on your machine is in the repository, and none of it needs a model:
- Knowledge is matched by path, scope and relevance, fit to a per-prompt budget and delivered through the hooks, the instruction files and MCP.
- A decision you state in a prompt is saved in your own words, a lesson a failing command taught is kept once, and a preference you voice to an agent becomes active when you say it again or state it as lasting.
- A sentence that says where code lives is marked as of writing, and when an edit writes a value a newer decision replaced, the hook quotes the decision at that edit.
- The open CLI sends no telemetry and makes no network request you did not ask for.
PathruleBench measured exactly this arm, the open-source CLI in local mode. See How we measure.
Where Pathrule Cloud begins
Pathrule Cloud is proprietary. Its client, the cloud package in the CLI, is open source; the service is not. It adds what cannot live on one machine: team workspaces with managed persistence and history, sync across machines and members, the web console at app.pathrule.io, Remote MCP at cloud.pathrule.io/mcp, Cloud Signals, and the Cloud model tier. That tier reads the prompts Pathrule's phrase rules found nothing in and keeps a decision you meant to last, in your own words; it is paid from AI Credits.
Cloud builds on the open foundation's knowledge format rather than replacing it, and the Cloud and local editions expose the same MCP tool contract, so an agent cannot tell them apart. These docs describe what Cloud does for you, not how it is built.
Clients consume the foundation
The CLI, the local MCP server, the VS Code extension and Remote MCP are different ways in to the same workspace knowledge. Choosing one does not change who owns the knowledge.
Local stdio and Remote MCP share knowledge types but expose different tool catalogs and schemas. The hosted Remote MCP endpoint cannot read a local filesystem, write local files or run local hooks. Local delivery uses the hooks and instruction files each client supports. See one MCP contract and how hooks work.
Getting started
The normal entry point is the guided CLI setup:
npm i -g @pathrule/cli
pathrule setup
Choose Cloud for a managed start or Local to work on this machine without an account:
pathrule setup --local
In local mode your knowledge stays on this machine and nothing proprietary is installed. See Install for setup and verification, and Contributing in the repository for how to build it from source.