Egregore

Installation

Set up Egregore from scratch

Prerequisites

You need two things installed:

  • gitgit-scm.com
  • Claude Codenpm 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 --open

The installer walks you through:

  1. Sign in with GitHub — OAuth device flow. Opens your browser, no tokens to copy.
  2. Pick your account — Personal GitHub account or organization.
  3. Name your project — Creates an Egregore instance and shared memory repo on GitHub.
  4. Create a project repo (optional) — For your actual code. You can add repos later.
  5. Done — Everything cloned and linked locally.

What the Egregore GitHub App does

The npx create-egregore flow:

  1. You install the App → establishes the scope.
  2. The installer runs device-flow OAuth as your user — not as the App.
  3. All repo creation, cloning, pushing uses your personal GitHub token on your machine.
  4. 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 browser

Step 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.sh

Step 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 sourceEgregore GitHub Appgh auth login (first-party)
Requires Node.jsYes (npx)No
Installs a GitHub AppYes (scoped, revocable)No
Result on your machineIdenticalIdentical
Teammate invitation flowSameSame

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:

egregore

This opens Claude Code in your Egregore directory, syncs memory, and shows your status.

First-Time Setup

On first launch, Egregore runs /setup automatically:

  1. Clones the shared memory repo as a sibling directory
  2. Creates the memory/ symlink
  3. Registers your person node in the knowledge graph (if connected)
  4. 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 login

Step 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.

On this page