Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.automagik.dev/llms.txt

Use this file to discover all available pages before exploring further.

Infrastructure Commands

Commands for setting up Genie, launching the TUI and desktop app, managing services, diagnosing issues, updating, database management, and configuring terminal shortcuts.

genie tui

Launch the interactive terminal UI (OpenTUI nav + tmux Claude Code).
genie tui is not in the top-level genie --help output. Invoke it directly by name — the CLI resolves it at dispatch time. If your install was built without the TUI module, the command will error immediately; fall back to genie app (desktop app) or the pane-level commands in this page.
genie tui [options]
FlagDescription
--devDevelopment mode with auto-reload on file changes
# Launch TUI
genie tui

# Launch in dev mode (auto-reloads on source changes)
genie tui --dev

genie serve

Start, stop, and check status of all genie infrastructure services (pgserve, tmux, scheduler).
genie serve [command]

Subcommands

CommandDescription
startStart genie serve (pgserve, tmux, scheduler)
stopStop genie serve and all services
statusShow service health

genie serve start Options

FlagDescription
--daemonRun as background daemon (redirects to genie serve --headless)
--foregroundRun in foreground (for systemd ExecStart)
--headlessHeadless mode — no TUI, just services
genie daemon start now redirects to genie serve --headless. Use genie serve start directly for explicit control.
# Start all services
genie serve start

# Check service health
genie serve status

# Stop all services
genie serve stop

genie app

Launch the Genie desktop app — a Tauri-based native cockpit that layers 12 views on top of the same PostgreSQL state, NATS event stream, and tmux/SDK executors that power genie tui and the raw CLI. The app ships a Bun sidecar for IPC (JSON-RPC over stdin/stdout, proxied through Tauri’s invoke()), subscribes to khal.*.genie.* NATS subjects for live updates, and loads each view lazily from the app manifest.
genie app [options]
FlagDescription
--backend-onlyStart only the backend sidecar (IPC on stdin/stdout, no window)
--tuiFall back to terminal UI mode (useful on headless hosts)
--devDevelopment mode with hot reload
The desktop app requires a graphical environment (Linux X11/Wayland, macOS, or Windows). On headless servers use --tui to fall back to the OpenTUI interface, --backend-only to run just the sidecar for remote frontends, or the plain genie CLI.

Views

The app manifest declares 12 native views. The primary sidebar surfaces nine of them; Terminal, Activity, and Setup are opened from context (per-agent terminals, detail panels, first-run onboarding).
The app shell landing view — live activity feed, team activity rollups, recent cost snapshot, and quick links. Subscribes to events.runtime for real-time updates.
Agent roster grouped by team with a detail panel for identity, executor, and activity. Replaces the earlier 5-icon agents strip — one view with sidebar + main list + detail rail.
Historical session replay — scroll through completed sessions, re-watch transcripts, and inspect tool-use timelines.
Orchestration dashboard for in-flight wishes and task groups. Modal overlays for task detail; backed by the task NATS prefix.
Token spend and cost analytics — per-agent, per-team, and per-model breakdowns with live cost counters streamed from the backend.
Browser for project files, the brain memory store, and scheduled artifacts. Backed by the fs NATS prefix for filesystem notifications.
Create, pause, and inspect cron + ad-hoc schedules. Mirrors genie schedule from the CLI.
Host health — processes, PostgreSQL, tmux, NATS, CPU/memory/disk. Requires the platform-dev role.
Tabbed configuration surface for executor defaults, NATS URL, theme, and per-view permissions. Anchored to the bottom of the sidebar.
Embedded xterm.js panes streamed over NATS PTY subjects (pty.create, pty.resize, pty.data, pty.input). Opened from the Fleet detail panel when you attach to an agent. Requires the platform-dev role.
Recent events feed surfaced inside the Fleet detail panel (no standalone sidebar entry). Lives on the event NATS prefix.
First-run onboarding flow for new workspaces — configures executor, NATS, and default team.

When to use app, TUI, or CLI

Desktop app

Rich multi-view cockpit on a workstation with a GUI. Best for day-to-day orchestration, cost tracking, and live agent supervision.

TUI

Same visual affordances in a pure terminal. Best over SSH, in tmux, or on hosts without a display.

CLI

Scripts, CI, heartbeats, and remote automation. Best when you need deterministic, composable commands with JSON output.

Examples

# Launch the full desktop app
genie app

# Dev mode with hot reload (while hacking on the app package)
genie app --dev

# Start only the Bun sidecar — useful for remote frontends or CI
genie app --backend-only

# Headless host: fall back to the OpenTUI interface
genie app --tui

genie omni

Manage the Omni ↔ Genie NATS bridge. genie omni subscribes to omni.message.> subjects, routes inbound messages to agent sessions, and streams responses back to Omni. Session state and executor configuration are read from PostgreSQL — there is no in-memory Map, so status queries stay accurate across restarts and multiple bridge processes.
genie omni is not in the top-level genie --help output. It resolves by name at dispatch time; installations without the Omni bridge module will exit with a clear error. The bridge is opt-in and does not auto-start with genie serve.
genie omni [command] [options]

Subcommands

CommandDescription
startStart the NATS bridge and subscribe to omni.message.>
statusShow bridge status — active sessions, queue depth, idle timers (PG-backed)
stopStop the running NATS bridge
help [command]Display help for a subcommand

genie omni start options

FlagDefaultDescription
--nats-url <url>localhost:4222NATS server URL
--max-concurrent <n>20Maximum concurrent agent sessions
--idle-timeout <ms>900000Idle timeout before a session is suspended (ms)
--executor <type>tmuxExecutor backend — tmux or sdk

genie omni status options

FlagDescription
--jsonEmit the status payload as JSON (for scripts and dashboards)

Key concepts

genie omni status reads active sessions, queue depth, and idle timers directly from PostgreSQL via the executors table and its metadata index. The legacy in-memory session Map is documented but no longer authoritative, so status is consistent across bridge restarts and multiple observer processes. A safePgCall helper + pgAvailable scaffolding keeps the bridge resilient if PG is briefly unavailable.
The bridge resolves executor configuration (tmux vs SDK, concurrency, idle timeout) through a single resolver that honours the genie_executor flip switch. Flipping a single row swaps the backend for new sessions without restarting the bridge; in-flight sessions continue on their original executor.
Suspended sessions are resumed on demand. When a new message arrives for an idle chat, the bridge looks up the session row in executors, rehydrates state from its metadata index, and reattaches the executor. The SDK executor additionally captures inline session content so resumed SDK sessions start with their previous turns.

Examples

# Start the bridge with defaults (tmux executor, localhost NATS)
genie omni start

# Start with the SDK executor and tighter concurrency
genie omni start --executor sdk --max-concurrent 8 --idle-timeout 300000

# Point at a remote NATS cluster
genie omni start --nats-url nats://nats.internal:4222

# Check bridge health (human-readable)
genie omni status

# Check bridge health (JSON — for dashboards, alerts, CI)
genie omni status --json

# Stop the running bridge
genie omni stop
The NATS subjects, subscription patterns, and reliability semantics the bridge relies on are documented in Architecture → Messaging.

genie setup

Interactive wizard for configuring Genie settings.
genie setup [options]
Terminal
$ genie setup
╔════════════════════════════════════════════════════════════════╗
 Genie Setup Wizard
╠════════════════════════════════════════════════════════════════╣
  Terminal: tmux
  Session:  auto
  Codex:    not configured
╚════════════════════════════════════════════════════════════════╝

? Configure terminal shortcuts? (Y/n)
? Set up Codex integration? (Y/n)
? Configure session naming? (auto/manual)

Options

FlagDescription
--quickSkip interactive prompts, use defaults
--shortcutsOnly configure keyboard shortcuts (shell aliases + tmux keybindings)
--codexOnly configure Codex integration
--terminalOnly configure terminal settings
--sessionOnly configure session naming
--resetReset all settings to defaults
--showShow current configuration
Terminal
$ genie setup --show
Genie Configuration:
  Config: ~/.genie/config.json
  Terminal: tmux
  Session naming: auto
  Shortcuts: installed
  Codex: configured (OTel relay on port 4318)

genie doctor

Diagnose the Genie installation and environment.
genie doctor [options]
FlagDescription
--fixAuto-fix: kill zombie postgres, clean shared memory, restart daemon
Terminal
$ genie doctor
Genie Doctor Checking your environment...

  genie CLI v4.260324.8
  bun runtime v1.2.x
  tmux v3.4
  git v2.43.0
  claude code installed
  PostgreSQL connected (pgserve)
  NATS            ⚠️  not running (optional)
  .genie/ scaffolded
  AGENTS.md found
  CLAUDE.md found

Summary: 9/10 checks passed. 1 warning.

genie update

Update Genie to the latest version.
genie update [options]
FlagDescription
--nextSwitch to dev builds (npm @next tag)
--stableSwitch to stable releases (npm @latest tag)
Terminal
$ genie update
Checking for updates...
  Current: v4.260324.7
  Latest:  v4.260324.8
Updating...
 Updated to v4.260324.8

genie uninstall

Remove Genie from the system. Cleans up global state, configuration, and the CLI binary.
genie uninstall
Terminal
$ genie uninstall
Uninstalling Genie...
  Removed ~/.genie/
  Removed CLI binary
 Genie uninstalled.

genie db

For full database commands (db status, db migrate, db query, db backup, db restore, db url), see the Database CLI reference.

genie shortcuts

Configure Warp-like keyboard shortcuts for tmux.
genie shortcuts [command]

Subcommands

CommandDescription
showShow available shortcuts and installation status
installInstall shortcuts to config files (~/.tmux.conf, shell rc)
uninstallRemove shortcuts from config files
# Show current shortcut status
genie shortcuts show

# Install shortcuts
genie shortcuts install

# Remove shortcuts
genie shortcuts uninstall
Generates and installs:
PlatformConfigShortcuts
tmux~/.tmux.confCtrl+T (new tab), Ctrl+S (vertical split), Ctrl+Shift+S (horizontal split)
Termux~/.termux/termux.propertiesF1 (new tab), F2 (vsplit), F3 (hsplit)
Shell~/.bashrc / ~/.zshrcHelper functions + disable Ctrl+S flow control
Terminal
$ genie shortcuts
Installing keyboard shortcuts...
  tmux config: written to ~/.tmux.conf
  shell config: appended to ~/.zshrc
  termux config: skipped (not on Termux)

Shortcuts installed! Restart tmux to apply:
  tmux source ~/.tmux.conf