mayros code

Start an interactive coding session in the terminal (TUI). This is the primary entry point for working with Mayros. On first run, it launches the onboarding wizard if setup has not been completed.

The command automatically ensures the Gateway and Cortex sidecar are running before launching the TUI.

Options

FlagDescriptionDefault
--url <url>Gateway WebSocket URL (defaults to gateway.remote.url when configured)
--token <token>Gateway token (if required)
--password <password>Gateway password (if required)
--session <key>Session key"main" (or "global" when scope is global)
--deliverDeliver assistant repliesfalse
--thinking <level>Thinking level override
--message <text>Send an initial message after connecting
--timeout-ms <ms>Agent timeout in ms (defaults to agents.defaults.timeoutSeconds)
--history-limit <n>History entries to load200
--cleanStart with a blank chat (session history is preserved)false
--continueContinue the most recent sessionfalse
--model <name>Model identifier or alias (e.g. sonnet, opus, gpt4o)
--system-prompt <text>Override the system prompt
--append-system-prompt <text>Append text to the system prompt
--fork-sessionFork the session on resume (creates a new session branch)false

Session management

  • Default session — if no --session is given, the default key is "main".
  • Continue--continue resumes the most recent session.
  • Fork--fork-session creates a new branch from the current session, preserving the original history.
  • Clean start--clean shows a fresh chat view but keeps the session history intact on the server.

Model aliases

The --model flag accepts aliases that resolve to full model identifiers:

AliasModel
sonnetClaude Sonnet (latest)
opusClaude Opus (latest)
haikuClaude Haiku (latest)
gpt4oGPT-4o

See mayros models for the full list of supported models and aliases.

Examples

bash
# Start a new coding session
mayros code

# Continue the most recent session
mayros code --continue

# Start with a specific model
mayros code --model opus

# Send an initial message
mayros code --message "Review the auth module"

# Override the system prompt
mayros code --system-prompt "You are a Go expert"

# Fork an existing session
mayros code --session my-feature --fork-session

# Connect to a remote gateway
mayros code --url ws://remote:8080 --token mytoken

# Limit history loaded on resume
mayros code --continue --history-limit 50
  • Headless mode — non-interactive single-prompt mode
  • batch — parallel prompt processing
  • session — checkpoint, fork, and rewind sessions
  • onboard — first-time setup wizard