defmodule Mix.Tasks.Vibe do @shortdoc "Launch Vibe, the minimal BEAM-native coding agent" @moduledoc """ Launches Vibe. ## Usage Installed command: vibe # Start server if needed and attach the TUI vibe [options] [message...] vibe --web [--port 4321] vibe --bg "prompt" vibe server start [--foreground] vibe server restart vibe server status vibe server stop vibe new # Create and attach a fresh session. Alias: vibe n vibe sessions [--all] [--live] [--failed] [--limit n] # Alias: vibe ls vibe sessions prune --empty vibe send "prompt" vibe storage migrate vibe storage status vibe storage fts status vibe storage fts rebuild vibe storage fts optimize vibe storage checkpoint vibe storage vacuum vibe search [--cwd project] [--role user|assistant|tool] [--include-tools] vibe storage search [--cwd project] [--role user|assistant|tool] [--include-tools] vibe storage import pi [--no-fts] [--rebuild-fts] [--batch-size N] vibe subagents jobs|active|schedules|status |result |cancel vibe connect [--ssh|--dist] vibe gateway telegram --foreground vibe skill list|show |apis|from-session vibe attach # Alias: vibe a vibe attach # Alias: vibe a From a checkout: mix vibe mix vibe [options] [message...] ## Options * `--model ` - Model identifier passed to ReqLLM. Defaults to `VIBE_MODEL` or `openai_codex:gpt-5.5`. * `--api-key ` - API key for OpenAI-compatible requests. * `--system-prompt ` - Override system prompt for direct TUI/`--direct` calls. * `--mode ` - Output mode. Defaults to `text`. * `--print`, `-p` - Non-interactive mode: process prompt and exit. * `--bg` - Start a background session for the prompt and return immediately. * `--direct` - Use a direct ReqLLM call instead of the tool-capable agent runtime. * `--stream` - Stream direct ReqLLM calls. Default for `--direct`. * `--no-stream` - Disable direct ReqLLM streaming. * `--eval ` - Evaluate Elixir code through `Vibe.Eval`. * `--compact` - Compact stored trajectory context. * `--web` - Ensure the server is running and open the Phoenix LiveView web console. * `--port ` - Port for `--web`. Defaults to 4321. * `--keep-recent ` - Events to keep when compacting. Defaults to `12`. * `--checks` - Run Vibe validation gates. * `--codex-usage` - Show Codex subscription usage via Codex app-server RPC. * `--session ` - Continue or name a persisted session. * `--sessions` - List persisted sessions. Prefer `vibe sessions` for server-aware listings. * `--all` - With `vibe sessions`, include empty/internal historical sessions. * `--live` - With `vibe sessions`, show only live sessions. * `--failed` - With `vibe sessions`, show sessions whose preview looks failed. * `--limit ` - With `vibe sessions`, limit displayed sessions. Defaults to `20`. * `--timeout ` - Request/eval timeout. * `--cast ` - Record the TUI byte stream as a native gzip cast for debugging. * `--ssh`, `--dist` - Select remote transport for `vibe connect`. * `--yes` - Accept remote SSH host keys for `vibe connect --ssh`. * `--login codex` - Sign in with ChatGPT/Codex OAuth. * `--help`, `-h` - Show this help. * `--version`, `-v` - Show version. ## Examples vibe vibe -p "Inspect runtime info with eval" vibe --model openai_codex:gpt-5.5 "Review this project" vibe --login codex vibe --compact --keep-recent 20 vibe --eval "Vibe.OTP.runtime_info()" vibe --bg "Research this failure in the background" vibe new --mode json vibe ls --limit 5 vibe send 20260425-120000-abcd "Use eval to inspect System.version()" vibe storage search "figma variable" vibe subagents jobs vibe connect --ssh localhost:4022 --yes vibe a vibe a 20260425-120000-abcd """ use Mix.Task @impl true def run(argv) do parsed = Vibe.CLI.parse(argv) Vibe.CLI.Boot.configure_application_start(parsed) Mix.Task.run("app.start") Vibe.CLI.Command.dispatch(parsed) end end