Local or Cloud
Choose Pathrule Local with no account or Pathrule Cloud for shared knowledge, folder by folder. What each edition stores, how a folder's edition is chosen and switched, and what moves between them.
On this page
Every folder you use Pathrule in is served by one edition. Pathrule Local keeps the folder's knowledge on this machine. Pathrule Cloud makes it available through your Pathrule account. Your coding agent stays the one you already use in either edition.
Choose by who needs the knowledge
| Local | Cloud | |
|---|---|---|
| Account | Not required | Pathrule account |
| Workspace knowledge | Local store on this machine | Managed Cloud workspace |
| Sharing | This local workspace | According to workspace membership and permissions |
| Repository setup | CLI or VS Code | CLI or VS Code |
| Browser surface | Local Console, with pathrule ui | Cloud console at app.pathrule.io |
| Hosted MCP | Not available | OAuth access to an approved workspace |
| Signals | Local storage and verification | Managed ingest, fix recording and verification on Pro, Team and Enterprise |
Start with Local when the knowledge is for this machine. Choose Cloud when another machine or teammate needs the same authored source. Plan availability and limits are on Pricing.
How a folder's edition is chosen
Pathrule decides which edition serves a folder in this order. The deepest folder decides, so a project nested inside another keeps its own edition.
- The folder's own choice, recorded when you run
pathrule setuporpathrule initthere. - The workspace that already serves it: its Local workspace, or the Pathrule Cloud workspace attached to it on this machine.
- The device default, for a folder with neither.
The device default is Pathrule Cloud on a new install. You can make it Local, which changes what new folders use and never a folder that already has its own edition:
pathrule config get default-mode
pathrule config set default-mode local
pathrule setup and pathrule init are the only commands that change a folder's edition. Every other command, and the MCP server, the hook and VS Code, follows the folder: a Cloud folder reads its Cloud workspace and a Local folder its Local workspace. There is no automatic fallback to Local. When a Cloud folder cannot be served, because you are signed out or offline, have no access, the folder is not attached, a plan limit is reached or Pathrule Cloud cannot be loaded, you get an error that says what to do, and nothing is served from a Local store instead.
A folder with both a Local workspace and an attached Cloud workspace, and no choice between them, is a conflict. Nothing guesses: commands stop and name pathrule setup --cloud and pathrule setup --local, and the hook delivers nothing there until you choose. pathrule status shows the folder's edition and why, the device default and the workspace that serves it.
Set up Local
From your repository:
pathrule setup --local
pathrule ui
On a new install the device default is Pathrule Cloud, so setup asks whether Local is for this project only, the default, or the device default. Setup creates the folder's Local workspace, writes the MCP entry for every AI client, and installs the hooks and repository files for Claude Code, and for Codex when the repository has Codex files. pathrule ui opens the Local Console, where you browse, search, edit and restore knowledge and inspect activity or Local Signals.
No model runs on your machine in either edition. If you configure an external embedding provider, the text you rank goes to that provider.
Set up Cloud
pathrule setup
On a new install, a folder with no edition of its own is set up on Pathrule Cloud. Setup offers to sign you in, then uses the folder's attached workspace, an existing workspace with the folder's name, or a new workspace named after the folder. To use a different workspace, run pathrule attach <name-or-id> in the folder. Each teammate attaches their own local folder. Shared knowledge does not share another person's folder bindings or client configuration.
The Cloud console manages workspaces, people, plans and settings. A client that cannot run a local process can use Remote MCP, with an approved workspace grant. Remote tools have their own schemas and install no local hooks.
Switch a folder
A folder changes edition only when you run pathrule setup or pathrule init with the other edition. Setup then asks what the change is for, with two answers:
- This project only (recommended, the default). Only this folder changes. Other folders and the device default stay as they are.
- The device default. New folders use the new edition. Folders already set up keep theirs, this one too when it is already set up; a folder not set up yet follows the new default.
In a script, answer with --scope project or --scope device. A script that changes a folder already set up in the other edition, without either, stops and names both commands; a folder not set up yet gets the default, this project only, and setup says so. Choosing a scope never approves a copy of knowledge.
From Local to Cloud
pathrule setup --cloud
The folder's Local workspace stays on this machine, unchanged and unused while the folder is a Cloud folder. pathrule setup --local brings it back. Its knowledge can be copied to the Cloud workspace, with a preview and your separate approval, as described below. A Cloud setup that does not finish leaves the folder on Local.
From Cloud to Local
pathrule setup --local
Nothing from Pathrule Cloud is copied to this machine, ever, on any plan, Solo included.
- The folder's Cloud workspace stays on Pathrule Cloud, and stays attached on this machine, unused.
pathrule setup --cloudmakes it serve the folder again. - This machine's cached copy of it, the hook index and session caches, is removed, and the Claude Code rule files in
.claude/rules/pathrule/are written again from Local. - The Local side starts with the folder's earlier Local workspace when this release kept it unused, and empty otherwise.
- A Local workspace that shared the folder with a Cloud workspace under an earlier release may hold content that came from Pathrule Cloud, so it is set aside: kept on disk, never used, not deleted. A new Local workspace starts empty.
Detach a Cloud workspace
pathrule detach removes the folder's attachment and this machine's cached copy of that Cloud workspace and its rendered knowledge files. Nothing is deleted on Pathrule Cloud.
Copy Local knowledge to Cloud
When pathrule setup or pathrule init runs on Pathrule Cloud in a folder whose Local workspace holds knowledge, it offers to copy that knowledge to the folder's Cloud workspace. Nothing is copied without your approval.
The preview is always printed first: how many memories, rules and skills, their size, the target workspace and organization, what is kept, what is lost or changed, what cannot be copied, and whether it fits your plan's limits.
- Kept: memories with their paths and related paths; rules with their priority, scope and executable constraints; skills with their content and metadata.
- Changed: Pathrule Cloud records the person copying as the author and the time of the copy, and each item keeps its original author and dates in a "copied from Local" note. A skill's version restarts at 1.0.0, and the note keeps its Local version. A rule or skill attached to several folders in Local keeps one of them, and the preview names the others.
- Not copied: remedy evidence and private session content. Local search vectors are not copied either; Pathrule Cloud indexes the copies itself. Activity is copied separately, with
pathrule activity import --from-local. - Never shortened: an item over 1 MiB, or with a title over 500 characters, is listed as one that cannot be copied.
- Limits: the preview checks the copy against Pathrule Cloud's own usage figures for your organization: workspaces, storage, search index, 10,000 nodes per workspace and 1 MiB per item. A copy that does not fit stops where the plan is full.
The approval is separate. At a terminal setup asks Copy these N items to "<workspace>"? [y/N], and only y copies. In a script, --transfer approves and --no-transfer declines; with neither, nothing is copied and setup names pathrule setup --cloud --transfer. A no is remembered, and setup does not ask again unless you pass --transfer.
Running it again is safe. Each copied item keeps an identity tied to its Local workspace, the item and the target Cloud workspace, so a second run copies only what is missing, never overwrites an item edited in Pathrule Cloud since, and never changes the Local workspace.
The summary is honest. It says Copied X of N, lists what failed with the reason and what was not attempted because a plan limit stopped the copy, and names the command to retry. Only a complete copy says everything is on Pathrule Cloud; an incomplete one exits non-zero. If Pathrule Cloud does not take copies for that workspace, nothing is copied and setup says so.
What the agent receives
The local runtime delivers knowledge through the hooks and files of Claude Code and Codex, and through the MCP server, which every client reaches through the MCP entry setup writes. That works with either Local or Cloud workspace knowledge. Remote MCP returns Cloud knowledge when called; it does not provide hook-time delivery.
Memories, rules and skills keep their meaning in either edition. Project requirements still outrank personal preference, and source-backed findings remain advice to verify.
Move deliberately
Moving a folder to Pathrule Cloud never publishes its Local knowledge on its own: the copy needs the preview and your separate approval, and it takes every item of the folder's Local workspace that can be copied. Before you approve, remove what should not be shared in the Local Console. Keep secrets, private customer data and personal notes out of shared knowledge. Security explains the local, Cloud and coding-agent provider boundaries.