Repository mode
Commit the hook to a repository, and everyone who opens it gets your org’s context, with no per-person hook setup. It works on every plan.
Add the hook to a repository
Pick one of these:
-
From the terminal, inside the repository:
lore hooks install --scope=project --org=<your-org>This merges Lore’s entry into each tool’s project settings file, keeping whatever is already there.
-
From the panel, go to Governance Hooks → Repository, choose the tools, and download the files. If a file already exists in the repository, add Lore’s entry to it instead of replacing it.
The files are:
| Tool | File |
|---|---|
| Claude Code | .claude/settings.json |
| OpenAI Codex | .codex/hooks.json |
| GitHub Copilot | .github/hooks/lore.json |
| Cursor | .cursor/hooks.json |
The committed command calls lore from the PATH, so it works on every member’s machine.
What members need
Each member still needs the Lore CLI and lore login (see Individual mode, steps 1 and 2). Without a sign-in, the session shows a one-line notice instead of the context.
Codex only runs repository hooks after each member trusts the project and approves the hook in /hooks, and some Codex surfaces don’t run repository hooks at all yet. For Codex, prefer individual mode, or org mode once available.
Claude Code, Copilot and Cursor also run repository hooks only in folders the member has trusted.
Name the org with .lore.yaml
A lighter alternative to committing hooks: a .lore.yaml file at the repository root that names the org. Members’ own (individual) Lore hooks then deliver that org’s context in this repository, instead of the org they installed the hook for. Nothing is written into the tools’ settings files.
lore hooks pin --org=<your-org> # writes .lore.yaml at the repository root
git add .lore.yaml && git commit -m "chore: bind repository to <your-org> in Lore"lore hooks pin checks that you belong to the org. lore hooks pin --remove deletes the file.
The file looks like this, and a subdirectory can have its own to name a different org (the nearest file wins):
# Lore: this repository belongs to the acme org. Written by `lore hooks pin`.
org: acme- The file only selects an org. A member who doesn’t belong to it gets a one-line notice and no context. Lore doesn’t fall back to the member’s other org in that repository.
- Org-mode (managed) and repository hooks ignore it.
- An invalid file is ignored, and
lore hooks statussays why.
When several Lore hooks run
If a member has their own Lore hook and the repository also has one, the repository’s hook answers and the member’s stays silent, but only when Lore can tell that the tool runs the repository’s hook for that member:
| Tool | Repository hook counted as running |
|---|---|
| Claude Code | Yes |
| GitHub Copilot | Only when the repository is in Copilot’s trusted folders (trustedFolders in ~/.copilot/config.json) |
| OpenAI Codex | Unknown: Lore can’t read Codex’s hook approvals |
| Cursor | Unknown: not yet verified |
When it’s unknown, both hooks answer, each with its own org, rather than risk a session with no context. lore hooks status flags this. To avoid it, use .lore.yaml instead of a repository hook, or keep both hooks on the same org.