start
Launch OpenCode with Era-managed settings.
Usage
era-code start [options]
Options
| Option | Description |
|---|---|
-m, --model <model> | Model to use |
-a, --agent <agent> | Agent to use (overrides default_agent setting) |
-q, --quiet | Suppress output |
Examples
Launch with defaults
era-code start
Use a specific model
era-code start --model claude-sonnet-4-20250514
Use a specific agent
era-code start --agent orchestration
What It Does
- Checks initialization - If Era is not initialized, offers to run
era-code initfirst - Syncs configuration - Updates
opencode.jsoncwith latest settings (includingdefault_agent) - Builds directives - Compiles your directive files into
DIRECTIVES.md - Loads credentials - Injects MCP server credentials into the environment
- Launches OpenCode - Spawns OpenCode with Era configuration applied
Auto-Initialization
If you run era-code start in a project that hasn't been initialized, you'll be prompted:
Era is not initialized in this project.
Would you like to initialize Era now? (Y/n)
Selecting yes runs the full interactive era-code init flow, then automatically continues to launch OpenCode. In quiet mode (--quiet), this prompt is skipped and an error is thrown instead.
Available Agents
Primary Agents
These can be set as the default agent via era-code config:
| Agent | Purpose |
|---|---|
plan | Strategic planning, creates docs/plans (default) |
orchestration | Main coding agent for implementation |
Subagents
These are invoked automatically via the Task tool:
| Agent | Purpose |
|---|---|
explore | Fast codebase exploration |
researcher | Documentation and web research |
debugger | Systematic debugging and root cause analysis |
docs-generator | Generate /docs folder |
readme-generator | Generate README.md |
Changing the Default Agent
Use the config command to change which agent starts by default:
# Set orchestration as default
era-code config --set settings.default_agent=orchestration
# Set plan as default (this is the default)
era-code config --set settings.default_agent=plan
The change applies on next era-code start.
Environment
The start command sets:
ERA_CODE_MANAGED=1- Indicates Era is managing the session- MCP credentials from
~/.config/era-code/credentials.json