Skip to main content

init

Initialize Era governance in a new or existing project.

Usage

era-code init [options]

Options

OptionDescription
-y, --skip-promptsUse defaults, no interactive prompts
-q, --quietNo 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:

  1. Backup your user directives
  2. Remove all legacy files
  3. Initialize fresh with OpenCode
  4. 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.