CLI & Launcher Reference
The elthoria executable (~/.elthoria/bin/elthoria when installed, or ./elthoria-mcp-server/elthoria from source) is the unified entry point for interactive GM chat, web play, one-shot execution, local knowledge crawls, spin packaging, and the standalone MCP server.
For all underlying chat flags (--model, --provider, --auth, --mode, --web-port, slash commands, etc.), see Upstream Kompile CLI Overview ↗ and Kompile Chat & Harness ↗.
Commands
Usage: elthoria [COMMAND] [ARGS...]| Command | Description | Example |
|---|---|---|
chat [ARGS...] (default) | Start interactive Kompile chat preloaded with the elthoria-gm role, skills, .mcp.json, and pinned play dashboard | elthoria or elthoria chat --model gpt-5.6-sol |
web [ARGS...] | Open trusted-local browser play chat with one persistent game runtime | elthoria web --web-port 9181 --open-browser |
auth [ARGS...] | Sign in, list, switch, or log out of remote AI providers (OAuth subscriptions & API keys — see Connecting an AI Provider) | elthoria auth login or elthoria auth list |
acp [ARGS...] | Expose Elthoria over Agent Client Protocol (ACP) v1 on stdio, or pass --ws for a localhost WebSocket bridge for Foundry VTT and other browser VTTs (see Connecting Foundry VTT & Other VTTs) | elthoria acp --ws --port 9188 |
exec PROMPT... | Run one non-interactive GM turn through Kompile chat (supports default streaming text, --json / --output-format stream-json, --output-last-message, --timeout, --resume, and provider overrides — see Headless & Streaming Mode) | elthoria exec --output-format stream-json "/elthoria-recap" |
server [ARGS...] | Run the headless Elthoria MCP server over stdio or sse with safe local defaults (H2 console disabled, timed world advancement off) | elthoria server --transport stdio --port 0 |
crawl [ARGS...] | Run Kompile's offline crawl against the managed data/input_documents/elthoria/ source directory | elthoria crawl --pipeline-id standard-text |
knowledge paths | Print the resolved shared workspace, source directory, knowledge-base ID, crawl directory, and graph.kgraph path | elthoria knowledge paths |
project [ARGS...] | Run a Kompile project command against the shared workspace | elthoria project crawl-list |
spin build [ARGS...] | Assemble a self-contained .kspin archive with embedded Kompile runtime, bundled Java, and Elthoria payloads | elthoria spin build --runtime-dir /releases/kompile-full --output /releases/elthoria-1.0.kspin |
doctor | Verify the resolved Kompile executable, harness templates, workspace wiring, and server artifacts | elthoria doctor |
version | Print the installed Elthoria harness version | elthoria version |
help | Show CLI usage and environment variable summary | elthoria help |
Resuming chat sessions & switching vendors
elthoria chat forwards Kompile's session resume and provider-routing flags directly (while keeping the managed elthoria-gm role and workspace pinned):
# List recent chat sessions in the Elthoria harness workspace
elthoria chat --list
# Resume the most recent chat session (or a specific session ID)
elthoria chat --continue
elthoria chat --resume <session-id>
# Resume a saved chat session on a different vendor/model
elthoria chat --resume <session-id> --provider openrouter --model anthropic/claude-sonnet-4-5
elthoria chat --resume <session-id> --provider openai --auth oauth --model gpt-5.6-sol
elthoria chat --resume <session-id> --provider github-copilot --model gpt-5.6-solInside any live elthoria or elthoria web session, you can also switch vendors mid-conversation without restarting:
/auth(alias/provider) — switch vendor, auth route, named account, and model cleanly fromConversationLedger(refused mid-stream until the current reply completes)./model <vendor>//model <vendor>:<model>— inspect a vendor's live catalog or switch vendor + model in one line./model failover(alias/model ladder) — configure an automatic multi-vendor/multi-account failover ladder onQUOTA_EXHAUSTED/ rate-limit boundaries.
For cross-CLI native session reconstruction (kompile resume --session-id <id> --agent claude|codex|agy|opencode|qwen|gemini|pi|kompile), batch workspace recovery (kompile resume-all), and CrossAgentResumeCompactor details, see Upstream Kompile Import, Resume & Mid-Conversation Vendor Switching ↗.
Headless & streaming mode (stream-json)
elthoria exec and non-interactive elthoria chat inherit Kompile's full stream-json JSONL streaming engine by proxy while keeping Elthoria's elthoria-gm role and workspace pinned:
# Stream ordered JSONL events (session, tool_start, tool, text, usage, result)
elthoria exec --output-format stream-json "/elthoria-recap"
elthoria exec --json --output-last-message recap.md "/elthoria-recap"
# Passthrough streaming over external CLIs behind the same JSONL envelope
elthoria chat --mode passthrough --agent claude --prompt "/elthoria-recap" --output-format stream-jsonSee Headless & Streaming Mode (elthoria exec & stream-json) for the full event schema, jq recipes, exit codes, and upstream Kompile Headless & Streaming Mode ↗.
elthoria server flags
Stable launcher flags translate cleanly to Spring Boot properties (raw Spring --key=value arguments also work):
| Flag | Translates to | Notes |
|---|---|---|
--transport <stdio|sse> | --mcp.server.transport=<value> | Use stdio for per-client processes; use sse (endpoint /mcp/sse) for shared localhost servers |
--port <n> | --server.port=<n> | Use --port 0 with stdio to avoid port collisions; keep SSE bound with --server.address=127.0.0.1 |
--ready-file <path> | --mcp.server.ready-file=<path> | Written by McpReadyFileListener on ApplicationReadyEvent once every tool/prompt/resource provider is registered |
Environment variables
| Variable | Default | Purpose |
|---|---|---|
ELTHORIA_HOME | ~/.elthoria | Root directory for Elthoria state, runtime, database, and generated harness workspace |
ELTHORIA_INSTALL_DIR | ~/.elthoria | Installation root for install.sh (bin/, components/elthoria/, lib/, libexec/, share/) |
ELTHORIA_WORKSPACE | $ELTHORIA_HOME/kompile-harness | Single folder identity for chat, crawl, RAG, and graph.kgraph (ELTHORIA_HARNESS_DIR is accepted as a compatibility alias) |
ELTHORIA_KNOWLEDGE_SOURCES_DIR | $ELTHORIA_WORKSPACE/data/input_documents/elthoria | Managed crawl source directory (must remain a strict descendant of data/input_documents/) |
ELTHORIA_KNOWLEDGE_BASE | <workspace-slug>-knowledge (kompile-harness-knowledge) | Deterministic folder-local Kompile knowledge-base ID |
ELTHORIA_DATA_DIR | $ELTHORIA_HOME/data | Persistent H2 campaign database directory |
ELTHORIA_RUNTIME_DIR | $ELTHORIA_HOME/runtime | Working directory for server-relative runtime state |
ELTHORIA_KOMPILE | (resolved from PATH / ~/.kompile) | Path or command name for the upstream kompile binary |
KOMPILE_INSTALL_DIR | ~/.kompile | Selects which existing Kompile installation to reuse (never modified by Elthoria) |
ELTHORIA_HARNESS_SYNC | 1 | Set to 0 to preserve custom local edits to .kompile/roles/ and .kompile/skills/; .mcp.json is always regenerated and verified |
ELTHORIA_APP_JAR | (Maven repo lookup in source mode; lib/elthoria-app.jar in dist) | Explicit path to the campaign-builder shaded JAR |
ELTHORIA_GAME_VERSION | 1.0-SNAPSHOT | Selects the org.example:campaign-builder artifact version for source-launcher lookup |
ELTHORIA_PRODUCT_NAME / ELTHORIA_ENGINE_NAME | Elthoria / Elthoria engine | Optional display-name overrides for help text, titles, and logs |