Orient
Give Claude Code and every other agent your team's memory.
From sign-up to a working Harbor: create your workspace, name your first Space, run one command in the repo you work in, and open your agent. Teams add three steps after that.
Get Harbor working
Sign up
Press Start free and sign up with Google or email. Free for you and one teammate, no card, no call. On a phone? Setup ends in a terminal, so press On your phone? Email me the link under step 1 on the home page and finish on your computer.
Start there, not in a terminal: the install in step 4 signs you in to your workspace, so the workspace has to exist first. Until then, the harborloop CLI reference opens with
harbor context, which needs no account.Name your workspace
Right after sign-up, name your workspace and press Create my workspace. Use your company or team, for example Acme, not one project: everything else sits inside it.
Name your first Space
Next, Harbor asks you to Create your first Space. A Space groups the repos that share rules, so your backend’s rules stay out of the mobile app. Name it after the product or team you will connect first, for example Backend, or press Skip and call it General. You can rename it, or add more Spaces, any time in Settings.
Binding a repo turns Harbor on in it. In a bound repo your agent gets your rules before each prompt and saves what it learns as it works. Every other repo is left alone, and nothing is sent from it. Each bound repo belongs to one Space, which decides whose rules it gets. A new workspace has one Space, the one you just named, and that is all a solo developer needs.
Run one command in your repo
In the repo you work in:
npx harborloop initIt signs you in, in your browser. It connects Claude Code, Codex, Cursor and GitHub Copilot, whichever of them are installed, by adding Harbor’s MCP server and hooks to each one’s own config (which config files harborloop changes). And it turns Harbor on in this repo, in your Space.
It may ask a few questions on the way:
- Which Space does this repo belong to? Only when the workspace has more than one. Pick a number, or press Enter for none for now: Harbor is then on with no Space, and what the repo’s sessions learn waits in Review until you pick one.
- Turn Harbor on in https://github.com/acme/acme-api? Only in a workspace with other people in it and one Space, because what your agent learns here is shared with them. Enter is yes. A workspace of one is never asked.
- Send their rules to your team’s review queue? When the repo commits a CLAUDE.md, an AGENTS.md, Cursor rules (
.cursorrulesor.cursor/rules/*.mdc) or.github/copilot-instructions.md. It asks once, before anything leaves the machine. Harbor reads the text with a model, with keys and tokens blanked first, and the rules wait in Review: nothing reaches an agent until someone on your team approves it. - Install the
harborcommand too, so it works in any terminal? Run from npx, it offers to. Say yes: the last two steps use it.
Run it after steps 2 and 3. With no workspace yet it stops with This account is not a member of any workspace yet. Run it inside the repo: in a folder that is not a git repo with an origin it sets up the machine and says Harbor is set up, but it is on in no repo yet, unless an admin turned on work outside a repo. Then restart any agent session that was already open: a session started before
initdoes not have Harbor.Open your agent there
Start Claude Code, Codex, Cursor or Copilot in that repo and do a real task. There is nothing new to type. For Copilot in VS Code, start the harbor MCP server once first: MCP: List Servers, harbor, Start Server.
In Claude Code and Codex, Harbor talks to you in lines that start with ⚓. On the first prompt of your first three sessions, while there is nothing to hand your agent yet, it reads ⚓ Harbor is connected to "Acme" and on in this repo.
Once your team has rules, Harbor puts the ones that fit in front of your agent, and an answer that used one ends with a
harbor-applied:line naming their numbers. Right under that answer, Harbor says what they were: ⚓ Harbor: your agent used 2 team rules, then each rule’s number and title, up to five. A turn that used no rule prints nothing. This receipt is on by default;harbor off --receipthides it, and the rules still reach the agent.Cursor and Copilot show none of these lines: their hooks give Harbor no way to print one to you, though your rules still reach the agent. In those, run
harbor doctorfrom step 8 instead.See your first learning
When your agent finishes a task, it saves what it learned: a convention you settled, a fix that cost time, a decision and its reason. In Claude Code and Codex the save shows right under it, for example ⚓ Harbor saved a rule, the rule’s text, and Your team’s agents get it from their next session. Open Knowledge in Harbor to see it.
In a new workspace a learning goes live on its own. One that contradicts a live rule replaces it when you may curate that Space or wrote the rule (a workspace’s owner may), and Knowledge keeps a Restore; otherwise it waits in Review for a decision. A few wait for you in Review whatever the setting: a secret, an install step or a risky shell command in the text, no Space to put it in, or a clash Harbor could not settle. What coding agents remember, and who approves it has the setting.
Turn Harbor on in another repo
Inside the other repo:
harbor bindWith one Space, it goes there. With more than one, it asks which. Turning it on in another repo has the rest.
Check it any time
harbor doctorIt checks the whole chain, from your sign-in to whether a prompt in this repo received anything. Every failing line names the fix, usually a command you can paste. What harbor doctor checks explains each line.
For teams
Three more steps, in any order.
- Connect GitHub. In Sources, connect GitHub. Merged pull request reviews are where your team’s conventions were argued out, and Harbor reads them as learnings. Each review comment waits in Review for a person, because about one in three is a bug report rather than a rule. Reviews on your coding agents’ open pull requests are read too, and wait the same way. Start with GitHub alone, then connect Slack, Notion, Jira and the rest.
- Decide who sees which Space. In Settings, under your workspace’s name, Access sets who can see which Space. A Space’s rules reach only the people who can read it. To move a repo to another Space, run
harbor bind --project <Space>inside it. Scoping rules by repo and team with Spaces says who can. - Invite your team. Invite is the button at the top right of the app, for admins and owners. Each person accepts the invite email, creates their account with the address it was sent to (a different email is a different account), then runs
npx harborloop initin the repos they work in.
How do I give Claude Code memory across sessions?
Install Harbor in the repo with npx harborloop init and let Claude Code work. When it finishes a task it saves what it learned to your Harbor workspace, and in every later session Harbor’s prompt hook puts the rules that fit in front of it when you submit a prompt. You type nothing new, and nothing is sent from a repo you did not bind.
That memory is not a file on your laptop. A CLAUDE.md is one file in one repo that somebody keeps up by hand. Harbor keeps what was learned in your workspace, so the next session, your other machine once it has run harbor init, and every teammate’s Claude Code, Codex, Cursor and Copilot get it too, scoped by Space.
It starts from what you already wrote down. If the repo commits a CLAUDE.md, AGENTS.md, Cursor rules or copilot-instructions.md, init and bind offer to send their rules to Review, where a person approves the ones that should reach every agent.
To see it work, read the line under an answer: ⚓ Harbor: your agent used 1 team rule and the rule’s title. It lists what the agent says it used, and agents claim more uses than really changed their work, so read it as an upper bound. Checking whether your agent follows team rules counts it over weeks.
How do I turn it on in another repo?
Run harbor bind inside it. With one Space the repo goes there; with several it asks which, or you name one with harbor bind --project <Space>. It asks the same rules-file question init does.
Until you do, Harbor stays off there and sends nothing. The first time you open Claude Code or Codex in a repo Harbor is off in, it says so once: ⚓ Harbor is off in this repo, so your agent gets nothing from Harbor here. To turn it on, run harbor bind.
Your agent cannot do this for you. Harbor’s hook refuses an agent’s harbor bind and tells it that harbor bind is a person’s decision, so a person types it in their own terminal, so the agent hands you the command.
- A repo in a Space you are not in. When a teammate bound it into a Space you cannot read, its rules and guardrails do not reach you, and Claude Code and Codex say ⚓ You’re not in Payments, so its rules and guardrails are off. Ask an admin to add you.
- A folder that is not a git repo. A scratch folder with no origin stays off unless an admin turns on Settings, Spaces, Work outside a repo; then work there goes to the Space they chose, and
harbor offin one of them pauses every such folder on your machine. Your home folder itself always stays off. - Moving a repo. On a repo that is already bound, naming another Space moves it there for the whole workspace. Owners, admins and curators can.