Getting Started
Get Era Code running in your project in under 5 minutes.
Prerequisites
- Node.js 20 or higher
- npm or yarn
- A git repository
Installation
npm install -g @era-laboratories/era-code
Trouble installing? Configure GitHub Packages access
- Run:
gh auth refresh --scopes read:packages --hostname github.com
- Run:
curl -fsSL https://gist.githubusercontent.com/crouch-era/094fab65d3b4d5e0dfbf2196f4d2afe5/raw/68b34fdfd9218fc0259daea05291b941089477b4/gistfile1.txt | ORG=era-laboratories bash
Set Up Era Globally (recommended)
Run this once per machine and every repo you open inherits the full Era baseline — agents, skills, commands, MCP servers, permissions, governance hooks, and the constitution plus universal directives — for both harnesses, with no per-repo step:
era-code setup
This installs the user-scope config layer (~/.config/opencode/, ~/.claude/) and the global governance memory (~/.era/memory/). It is idempotent and non-destructive — re-running is safe, and it never clobbers your own files. To scope it to one harness, pass --harness claude or --harness opencode.
After setup, missing MCP credentials are reported with a warning. Supply them with:
era-code mcp auth
See era-code setup for the full install layout and --remove.
Initialize a Project (optional)
Per-repo era-code init is optional and layers project-specific directives on top of the global baseline (project config overrides global). Use it only when a project needs its own directives. Navigate to your project root and run:
era-code init
This will:
- Create the
.era/directory structure - Set up OpenCode configuration
- Generate governance files (constitution and directives)
- Configure MCP servers — Notion, Linear, and Slack are baseline connections, enabled by default with auth prompting
Non-Interactive Mode
For CI/CD or scripting:
era-code init --quiet
[!NOTE]
era-code setup(global, once per machine) andera-code init(per repo, optional) layer rather than compete. Run setup for the org-wide baseline; run init per repo only when a project needs its own directives. See Global setup vs per-repo init.
Verify Installation
era-code status
Expected output:
Era Code Status
──────────────────────────────────────────────────
Version: 3.0.0
Tool: OpenCode
Directives: 3 categories
Start Coding with AI
Era Code supports two harnesses. Launch whichever you prefer — both get the same governance, agents, commands, skills, and MCP servers:
# OpenCode
era-code start
# Claude Code
era-code claude
Each command syncs its harness configuration, builds directives, and launches the agent with all Era settings applied. See the Claude Code guide for how the two harnesses compare.
Configure Settings
Customize your Era setup:
# Set the default agent
era-code config --set settings.default_agent=orchestration
# View all settings
era-code config --list
# Interactive configuration
era-code config
See Configuration for all options.
Project Structure
After initialization, your project will have:
your-project/
├── .era/
│ ├── manifest.json
│ ├── governance.yaml # Project governance settings
│ └── memory/
│ ├── constitution.md # Immutable governance
│ ├── DIRECTIVES.md # Compiled directives
│ └── directives/ # Your directive files
├── .opencode/ # OpenCode resources
├── opencode.jsonc # OpenCode config
├── AGENTS.md # Agent instructions
└── .gitignore # Updated with Era entries
Running era-code claude additionally syncs the Claude Code surface:
your-project/
├── .claude/ # Claude Code resources (agents, commands, skills, settings)
├── CLAUDE.md # Era-managed governance imports (committed)
└── .mcp.json # MCP servers in Claude Code format
Next Steps
- Configure governance settings for your workflow
- Create custom directives for your project
- Configure MCP servers for external integrations
- Use Era with Claude Code
- Explore all commands