init
Initialize Era governance in a new or existing project.
Usage
era-code init [options]
Options
| Option | Description |
|---|---|
-y, --skip-prompts | Use defaults, no interactive prompts |
-q, --quiet | No output, use defaults (implies --skip-prompts) |
Examples
Interactive initialization
era-code init
Walks you through:
- Tool configuration (OpenCode)
- MCP server selection (Notion, Linear)
- Credential setup for selected servers
Non-interactive initialization
era-code init --quiet
Uses all defaults. Ideal for CI/CD or scripting.
What It Creates
.era/
├── manifest.json
└── memory/
├── constitution.md
├── DIRECTIVES.md
└── directives/
├── _config.yaml
├── 000-upstream-header.md
└── 999-upstream-footer.md
.opencode/
├── agent/
├── command/
├── skill/
└── plugin/
opencode.json
AGENTS.md
Legacy Migration
If Era detects legacy Claude Code files (.claude, CLAUDE.md, .mcp.json), it will:
- Backup your user directives
- Remove all legacy files
- Initialize fresh with OpenCode
- Restore your directives
This migration is automatic and preserves your custom directives.
Idempotent
Running init multiple times is safe. It syncs your installation to the latest version without losing user content.