Quickstart
Install a Pathrule runtime, create a workspace, write your first memory, and see Claude Code pick it up through the hook.
This guide gets you from zero to a working Pathrule session in about ten minutes. You need macOS, Linux, or Windows, an AI coding assistant that speaks MCP (Claude Code, Cursor, or Codex CLI), and a local repo you can experiment in.
Before you install anything, every new account already includes a read-only Demo Workspace, pinned at the top of the sidebar and prefilled with example memories, rules, skills and a populated dashboard. Open it any time to see what a working Pathrule workspace looks like.
1. Install a runtime
Pick the surface that matches how you work.
- Pathrule Studio if you want the native macOS app. Download it from the macOS app page.
- Pathrule CLI if you live in the terminal or work over SSH. See CLI install for Homebrew, npm, and direct binary paths.
You can install both. They share the same cloud account.
2. Sign in
Pathrule Studio opens a browser based login on first launch. Pathrule CLI offers two options.
# On a desktop machine
pathrule login
# On a headless box or over SSH
pathrule login --device-code
Both flows return you to a signed in state with a session that the runtime keeps refreshed in the background.
3. Create a workspace
A workspace is the unit Pathrule scopes content to. It mirrors a repo or a small group of repos on your machine.
pathrule workspace create my-team
pathrule workspace attach --path ~/repos/my-team
Or in Pathrule Web, open the workspace switcher, create a new workspace, then in Pathrule Studio or CLI attach it to a local path. The runtime resolves your current directory to a workspace using that mapping.
4. Write your first memory
The fastest way to confirm that everything is wired up is to write a memory and then open your assistant in the scope it covers.
In Pathrule Web or Pathrule Studio, create a new memory at the path that matters. For this guide, put it at the workspace root.
Title: Our database is Postgres on Supabase
Body:
- All queries should treat row level security as the source of truth.
- Do not bypass RLS with a service key in user facing code.
- Migrations live in supabase/migrations and run through CI.
Save it. Pathrule writes it to the cloud and the local cache.
5. Watch the hook fire
Open Claude Code (or Cursor, or Codex CLI) in the same directory you attached the workspace to. Start a new turn and ask any question that touches the area the memory covers.
The hook supervisor reads the cached slice for that path, formats the relevant memories and rules, and hands them to the editor before the first tool call. You will see the memory show up in the context surface your editor exposes, with no extra round trip mid task.
If nothing appears, run the doctor.
pathrule doctor
The doctor checks the local cache, the MCP server, the hook registration, and the AI client integration, and reports any step that needs attention.
6. Add a rule
Memories are facts. Rules are constraints. Add a rule at the same path.
Name: No service key in browser code
Scope: folder
Priority: high
Enforcement: strict
Body:
- Never use the SUPABASE_SERVICE_ROLE_KEY in any file under apps/web.
- Use the anon key plus row level security.
Open Claude Code again. The rule rides in alongside the memory. Priority high ranks it near the top; enforcement strict is what makes it a hard constraint, so a matching violation is blocked before it lands.
What to read next
- Core concepts for the data model behind memories, rules, and skills.
- How hooks work to understand what happens between the cache and the editor.
- MCP overview for the tool surface your assistant uses to read and write content.