Installation
Set up Egregore from scratch
Prerequisites
You need two things installed:
- git — git-scm.com
- Claude Code —
npm install -g @anthropic-ai/claude-code
Create Your Egregore
Two install paths, same result on your machine. Option 1 is the fastest; Option 2 uses only first-party GitHub tooling. Pick whichever fits you better.
Option 1 — npx (simplest)
npx create-egregore@latest --openThe installer walks you through:
- Sign in with GitHub — OAuth device flow. Opens your browser, no tokens to copy.
- Pick your account — Personal GitHub account or organization.
- Name your project — Creates an Egregore instance and shared memory repo on GitHub.
- Create a project repo (optional) — For your actual code. You can add repos later.
- Done — Everything cloned and linked locally.
What the Egregore GitHub App does
The npx create-egregore flow:
- You install the App → establishes the scope.
- The installer runs device-flow OAuth as your user — not as the App.
- All repo creation, cloning, pushing uses your personal GitHub token on your machine.
- Nothing in Egregore Labs' infrastructure polls or pulls content from those repos.
If you'd rather not install a GitHub App — for personal preference or because your organization prefers first-party tools — Option 2 below is the same flow using the GitHub CLI.
Option 2 — gh CLI (no GitHub App)
Uses the GitHub CLI — GitHub's own first-party tool — instead of the Egregore App. The token is minted by GitHub for you, with no third party in the loop. The end state on your machine is identical to Option 1.
Step 1 — Install the GitHub CLI and authenticate:
brew install gh # macOS — or see https://cli.github.com for other OSes
gh auth login # first-party device flow in your browserStep 2 — Download the installer, inspect it, then run:
curl -sLO https://raw.githubusercontent.com/egregore-labs/egregore/main/bin/init-gh.sh
less init-gh.sh # optional — read what it will do before running
bash init-gh.shStep 3 — Answer the installer's prompts. The flow mirrors Option 1:
- If you run it from inside an existing git repo, it offers to install in the parent directory and auto-adopt that repo as managed.
- Pick the owner (personal account or an organization you're a member of).
- Name your Egregore.
- Multi-select any existing repos you want managed.
- Optionally create a new project repo.
- Set your display name. Optionally invite a teammate.
What the installer does locally: creates your Egregore repo (from the public template), creates a memory repo, clones both + any managed repos as siblings, symlinks memory/, writes .env (mode 0600) using your gh token, installs a shell alias, and registers the instance. Every step is visible in the script you downloaded.
The source is bin/init-gh.sh on GitHub. For the full walkthrough with every prompt explained, see INSTALL-GH.md.
Both paths at a glance
Option 1 (npx) | Option 2 (gh) | |
|---|---|---|
| Credential source | Egregore GitHub App | gh auth login (first-party) |
| Requires Node.js | Yes (npx) | No |
| Installs a GitHub App | Yes (scoped, revocable) | No |
| Result on your machine | Identical | Identical |
| Teammate invitation flow | Same | Same |
Everything is MIT-licensed and source-available. Every install script is in bin/ and every hook in .claude/hooks/ — read them before you run them.
Start Working
Setup adds an egregore shell command to your profile. Open a new terminal:
egregoreThis opens Claude Code in your Egregore directory, syncs memory, and shows your status.
First-Time Setup
On first launch, Egregore runs /setup automatically:
- Clones the shared memory repo as a sibling directory
- Creates the
memory/symlink - Registers your person node in the knowledge graph (if connected)
- Clones any managed repos from
egregore.json
Join an Existing Egregore
If someone invited you, you have the same two options as for a fresh install. Pick whichever fits you better.
Option 1 — npx (simplest)
npx create-egregore@latest join <github-org>/<repo-name>This accepts pending invitations, clones the instance + memory + managed repos, and runs onboarding.
Option 2 — gh CLI (no third-party App)
Step 1 — one-time gh setup (skip if you already authenticated):
brew install gh
gh auth loginStep 2 — download the joiner, inspect it, then run:
curl -sLO https://raw.githubusercontent.com/egregore-labs/egregore/main/bin/join-gh.sh
less join-gh.sh # optional — read it first
bash join-gh.sh <github-org>/<repo-name>The joiner auto-accepts pending GitHub invitations from that owner, clones core + memory + every managed repo you have access to as siblings, writes .env with your own gh token, and installs a shell alias. On first session, Claude Code runs /onboarding with the context the inviter set up.
Source: bin/join-gh.sh.
Invite Others
From inside your Egregore:
/invite <github-username>This adds them as a collaborator on GitHub. They join with the command above.