Getting started

Install Maester, register a citadel, sync your sources, and (optionally) install the Grand Maester for your coding agent.

Maester is a Node CLI. You install it once, then use it to manage two kinds of configuration files: a citadel.yaml that lists the sources you pull from, and (optionally) a maester.yaml on each source that declares what it publishes.

Install

npm install -g baller-maester

If you’d rather not install globally, every command below also works through npx:

npx baller-maester

npx baller-maester is also the top-level entry point — running it with no subcommand opens an interactive menu that picks the right next step based on whether the current repo is a citadel, a maester, both, or neither.

Register your first citadel

Run the interactive walk-through from the root of the repository you want to use as an aggregation point:

maester init

It will:

  1. Prompt for a baseDir — the parent folder under which every default-destination source lands (pre-filled with citadel).
  2. Prompt for one or more sources to register, asking “Git repository or local directory?” for each. A git source takes a name, URL, and ref; a local directory takes a path and whether to link or copy its files.
  3. Per source, offer an optional includes list — leave it blank to use the source’s own maester.yaml if it has one (otherwise the whole repository is linked), or declare paths/globs directly when the source has no manifest (a third-party repo, say).
  4. Validate any auth.type env-var names so secrets never land in the citadel.yaml.
  5. Optionally register connectors and third-party MCP servers, so agents can query live services.
  6. Add an idempotent maester:sync script to package.json if one exists.
  7. Offer a final, recommended-by-default opt-in to install the Grand Maester agent skill — see below.

When it’s done, you’ll have a citadel.yaml at the repo root. Commit it. To change it later, use maester add, maester remove, and maester list rather than editing the YAML by hand.

About the Grand Maester step

The last prompt asks:

Install the Grand Maester agent skill? (Y/n)

The Grand Maester is an optional integration that teaches your AI coding agent (Claude Code, Codex CLI, Cursor, or any agent that reads project-level AGENTS.md) where the citadel lives, which files are canon vs draft, and to run maester status before substantial reads so it never answers from a stale corpus.

Accepting moves into target-agent selection (you can pick more than one). Declining is fine — you can run maester skill install later. Either way, init completes normally.

Sync the citadel

To pull every source in your citadel.yaml into the local tree:

maester sync

Or to pull a single named source:

maester sync source-context

Sync uses partial clones and sparse checkouts — it only fetches the paths the source actually publishes. Each source’s destination receives a small provenance marker recording the remote URL, ref, resolved commit SHA, and active filter set.

Published files are copied and stamped with their state, category and tags. Sources that resolve to the whole repository, and local directories in link mode, are linked instead and kept out of git — see Copied or linked.

Check what’s behind

Before relying on the citadel — or before an agent reads from it — ask whether anything is behind:

maester status

Status is read-only. It uses the provenance markers to compare each configured source against its remote and prints up-to-date, behind, or failed for each. The exit code (0 clean, 1 behind, 2 failed) makes it easy to call from CI or from an agent’s pre-read hook.

Configure a source (optional)

If you also want to declare what this repo publishes to other citadels, run:

npx baller-maester

…and pick “Configure this repo as a maester” from the menu. The walkthrough writes a maester.yaml at the repo root. No scripts are scaffolded — the maester is purely a published manifest.

Prefer to let your coding agent draft it? Install the Publisher skill:

npx baller-maester skill install --skill publisher

…then ask the agent to “set this repo up as a maester”. It shows you the full proposal and writes only what you approve.

Next steps