Skip to main content

Quick Start

A copy-paste-runnable walkthrough that takes a project from empty to released using hatch3r. The path is the same for greenfield and brownfield work — only the second step branches.

:::info Last verified 2026-04-28 against hatch3r 1.7.0. URLs and credential flows reverified each audit cycle (P3 — Adapter & MCP Currency). :::

Prerequisites

  • Node.js 22 or later — the only hard prerequisite. Check with node --version.
  • A git repository at the working directory, OR a non-git folder containing one or more git subdirectories (workspace mode is auto-detected).
  • One of the supported tools — Cursor, Claude Code, Copilot, OpenCode, Windsurf, Amp, Codex CLI, Gemini CLI, Cline / Roo, Aider, Kiro, Goose, Zed, Amazon Q, or Antigravity.

That is it. No global install, no preflight setup.


Step 1 — Initialize hatch3r

npx hatch3r init

Interactive flow (~2 minutes). hatch3r asks 9 questions, in this order:

  1. Platform — GitHub, Azure DevOps, or GitLab. Auto-detected from your git remote; press Enter to accept.
  2. Repo identity — owner / org / repo name. Auto-filled from git remote where possible.
  3. Default branch — used by board, PR, and release commands.
  4. Project typegreenfield (new) or brownfield (existing). Filters out content irrelevant to your situation.
  5. Team sizesolo or team. Solo skips board-management content.
  6. Content profileminimal, standard, full (recommended), or custom. See the profile table below.
  7. Tools — multi-select from the 15 supported adapters.
  8. Worktree isolation — only asked if you selected a worktree-capable tool.
  9. MCP servers — multi-select from 10 servers (3 default, 7 opt-in). Platform-aware: the GitHub / ADO / GitLab MCP that matches your platform is pre-selected.

For headless / CI use, pass --yes with optional flags:

npx hatch3r init --yes --preset standard --tools claude --project-type brownfield --team-size team

What gets created

PathPurpose
.agents/Canonical, tool-agnostic source (agents, skills, rules, commands, mcp/)
.agents/hatch.jsonManifest with content selection, tool list, MCP servers, integrity checksums
.agents/AGENTS.mdGenerated index of installed content
AGENTS.md (repo root)Rich agent roster with skill and command links
Tool-specific outputs.cursor/, CLAUDE.md, .windsurfrules, .clinerules, GEMINI.md, etc. — one per selected tool
.env.mcpSecret placeholder file (gitignored) — only created if you enabled MCP
.gitignoreUpdated to exclude .env.mcp
.worktreeincludeCreated only if a worktree-capable tool is selected

Content profiles

ProfileWhat's includedBest for
MinimalCore agents and core rules only (core tag)Quick setup, minimal footprint
StandardFull development lifecycle without niche auditsMost projects
Full (recommended)Everything including board management and all auditsLarge teams, full coverage
CustomInteractive picker per artifact typeFine-grained control

The profile is combined with greenfield/brownfield and solo/team filters, so a solo + greenfield + standard install carries materially less content than team + brownfield + full.


Step 2 — Add MCP credentials

Skip this step if you did not enable any credential-requiring MCP server. The 3 default servers (Playwright, Context7, Filesystem) need nothing.

The 7 opt-in servers each need an API key or token. Open .env.mcp and fill the placeholder values:

# .env.mcp — generated by hatch3r init (gitignored)
GITHUB_PAT=ghp_xxxxxxxxxxxx
BRAVE_API_KEY=BSA_xxxxxxxx
# ... and any others your selected servers need

Where to obtain each credential

ServerEnv varWhere to obtainRequired scopes / notes
GitHubGITHUB_PATgithub.com/settings/tokens/newClassic PAT: repo, read:org, project. Fine-grained PATs still cannot access user-owned Projects V2 as of 2026 — for board commands on user-owned projects, classic is required.
Brave SearchBRAVE_API_KEYapi-dashboard.search.brave.com/registerBrave retired the free tier in 2026. New users get $5/month in credits (~1,000 queries); legacy free-plan users grandfathered to 2,000/month. Credit card required.
SentrySENTRY_AUTH_TOKENsentry.io/settings/account/api/auth-tokens/User token for personal MCP. Org-scoped tokens (Org Settings → Auth Tokens) are preferred for shared / CI use.
PostgresPOSTGRES_URLYour database providerFormat: postgresql://user:pass@host:5432/db. Treat as a secret.
LinearLINEAR_API_KEYlinear.app/settings/apiPersonal API keys are still supported. OAuth 2.0 is preferred for shared installations.
Azure DevOpsAZURE_DEVOPS_PAT, AZURE_DEVOPS_ORGMicrosoft Learn — Use PATsScopes: Work Items (R/W), Code (R/W), Build (R), Project and Team (R). Microsoft now recommends Entra ID over PATs; PATs still work for hatch3r MCP, but Entra-backed orgs require sign-in every 90 days to keep PATs active.
GitLabGITLAB_TOKENgitlab.com/-/user_settings/personal_access_tokensScope: api. For automation contexts, consider Project Access Tokens or Group Access Tokens instead of personal PATs. Self-hosted: also set GITLAB_HOST=https://gitlab.example.com.

For deeper guidance — fine-grained PAT permission tables, Claude Code permission opinions, custom MCP server registration — see the MCP Setup guide.

Loading secrets into your editor

Two patterns, depending on the tool:

Auto-loaded — VS Code / Copilot read env vars from the env object hatch3r writes into .vscode/mcp.json. No sourcing needed; just fill .env.mcp and let the adapter regenerate the per-tool config on the next sync.

Source-and-launch — Cursor, Claude Code, Windsurf, Amp, Codex, Gemini, Cline / Roo, Kiro all expect env vars to be present in the process that launches the editor:

# macOS / Linux (zsh, bash)
set -a && source .env.mcp && set +a && cursor . # or: claude / windsurf / etc.
# Windows (PowerShell)
Get-Content .env.mcp | ForEach-Object {
if ($_ -match '^\s*([^#][^=]+)=(.*)$') {
[Environment]::SetEnvironmentVariable($matches[1].Trim(), $matches[2].Trim(), 'Process')
}
}
cursor .

Persist tokens by adding the set -a; source .env.mcp; set +a lines to ~/.zshrc / ~/.bashrc, or paste them into Cursor's per-server pencil-icon UI.


Step 3 — Restart your editor

MCP configs are read on editor launch. Close and reopen so the new .cursor/mcp.json / .mcp.json / etc. takes effect.

Verify connection: most editors show MCP status in their Tools / Settings panel. In Cursor, Settings → Tools & MCP — each enabled server should show a green dot and its tools should appear in the Available Tools list inside chat.


Step 4 — Define scope

Pick the path that matches the work in front of you.

Greenfield (new project)

/hatch3r-project-spec # Generate specs from your project vision
/hatch3r-roadmap # Phased plan with epics, broken into milestones

Brownfield (existing codebase)

/hatch3r-codebase-map # Reverse-engineer specs from the current code
/hatch3r-roadmap # Plan improvements off the analysis

Single feature (no full project)

/hatch3r-feature-plan # Plan one feature in depth — no board needed

Tiny change (typo / config tweak / one-file refactor)

/hatch3r-quick-change # Skip everything below; this is a complete one-shot flow

If you took the tiny-change path, you are done — jump to Step 8.


Step 5 — Set up the board

Run inside your editor:

/hatch3r-board-init

This creates or connects a project board on your detected platform — a GitHub Projects V2 board, an Azure DevOps board, or a GitLab Issues board. It writes back the resolved board owner / project number / area labels into hatch.json so subsequent commands target the correct board.

Skip this step for the single-feature path.


Step 6 — Fill the board

Write a todo.md at the project root with one line per work item:

- Add OIDC login support for the customer portal
- Migrate analytics events to the new schema
- Replace Stripe webhook polling with idempotent event ingestion

Then run:

/hatch3r-board-fill

board-fill parses todo.md, classifies each item (feature / bug / refactor / migration / test), groups items into epics, builds a dependency DAG, and marks ready items as status:ready on the board.

For backlog hygiene later: /hatch3r-board-groom surfaces stale items, priority imbalances, and decomposition candidates.


Step 7 — Pick up work

/hatch3r-board-pickup

board-pickup selects the next status:ready issue by dependency order and priority, creates a feature branch, and runs the four-phase agent pipeline: research → implement → review loop (reviewer + fixer, max 3 iterations) → final quality gates (test-writer + security-auditor). When the loop converges clean, it opens a PR.

The reviewer + fixer loop is automatic — there is no separate review command.

Repeat this step until the board drains.


Step 8 — Maintain canonical state

Day-to-day commands you will run as you edit .agents/ content or rotate tools:

CommandWhen to run
npx hatch3r syncAfter editing anything inside .agents/. Re-generates all tool outputs from the canonical state.
npx hatch3r statusDrift check — does any generated file differ from what canonical would produce?
npx hatch3r validatePre-commit / CI structural check — frontmatter, cross-references, content compliance. Exit 0 means clean.
npx hatch3r verifySHA-256 + manifest integrity check. --fix auto-runs update to heal drift.
npx hatch3r configReconfigure platform, tools, MCP servers, features, or content selection — fully interactive.
npx hatch3r updatePull the latest hatch3r templates, safe-merging into your customizations. Use --offline to skip the npm fetch.
npx hatch3r cleanRemove all hatch3r-managed artifacts.

Step 9 — Release

/hatch3r-release

release reads the conventional-commit history since the last tag, decides the semver bump (patch / minor / major), generates a changelog entry, tags, and publishes per your project's release config.

That closes the loop: init → spec → board → pickup → release.


Multi-Repo Workspace

If your working directory is a non-git folder containing multiple git subdirectories (e.g. frontend/, backend/, infra/), hatch3r auto-detects workspace mode. Force it explicitly with --workspace:

npx hatch3r init --workspace
npx hatch3r sync # cascade to all repos
npx hatch3r sync --repos frontend # sync only frontend/
npx hatch3r sync --dry-run # preview without writing
npx hatch3r config # add or remove repos, change sync strategy

The shared .agents/ lives at the workspace root; each sub-repo gets independent copies of the generated files (not symlinks), with optional per-repo overrides for tools, features, and content. See the Workspace guide for details.


  • MCP Setup — full per-server configuration, PAT scope tables, custom MCP servers, Claude Code permissions
  • Workflow guide — the deeper view of the four-phase pipeline and review loop
  • Adapter Capability Matrix — which adapters emit MCP, hooks, skills, etc.
  • Troubleshooting — common init / sync / MCP errors and fixes