VELADocsvelab.si ↗

CLI

This page documents the vela command: its options, run modes, the interactive terminal UI, slash commands and environment variables.

vela [prompt...] [-p | --mode text|json] [-c | -r | --session <id>]
     [-e <extension>]... [--no-extensions] [--no-session]
     [--approve | --no-approve] [--model provider/id] [--thinking <level>]
     [--agent-dir <dir>] [-h | --help] [-v | --version]
vela daemon [start | stop | status | run]
vela setup [lark]
vela setup github [owner/repo...] [--url https://public-origin]

An unknown option or a bad value prints the usage line and exits with code 2. Retired commands (vela serve and --mode rpc) also exit with code 2 and point to vela daemon and connectRuntime(). There is no -- separator: every argument that starts with - (except a lone -) is read as an option. To send a prompt that starts with -, pipe it through stdin.

Options

Option Description
daemon [start|stop|status|run] Manage the resident single-writer local daemon (<VELA_DIR>/vela.sock). Default subcommand is status. See daemon.
prompt... Every argument that is not an option is a prompt. Several prompts are sent one after another.
@file Attach a file to the first prompt: images are detected by header; text is inlined as <file name="…">…</file>. A missing or unreadable file exits 1.
-p, --print Run the prompts, write the last assistant answer to stdout, then exit.
--mode text Same as -p.
--mode json Run the prompts and write one RuntimeEvent / StreamDeltaEvent JSON line per event to stdout, then exit. See JSON mode.
--agent-dir <dir> Override VELA_DIR (owner configuration and database directory).
-c, --continue Continue the most recent saved session of this project, or start a new one if there is none.
-r, --resume Pick a saved session at startup. Interactive mode only.
--session <id> Open the session with this id, creating it if it does not exist. Ids use letters, digits, ., _ and -, do not start with ., and are at most 128 characters; an invalid id is a usage error (exit code 2).
--no-session Keep the conversation in memory only; it is not saved and cannot be resumed. Tool call history, usage records and long tool output are not written to SQLite or the data directory (long tool output uses a temporary directory removed when the session closes). Memory is still written.
--fork <id> Copy the saved session <id> into a new session (with a new id) and start there, like pi. The original is not changed.
--export <id> [output] Write a saved session from vela.db (by id) directly without initializing models or extensions and exit, like pi. Writes HTML by default (vela-session-<id>…html in the current folder), or JSONL when output ends with .jsonl.
--model <provider/id> Use this model. See Models.
--thinking <level> Thinking level: off, minimal, low, medium, high, xhigh or max.
-e, --extension <path> Load an extension file or directory, or builtin:<name>. Repeatable. Relative paths resolve from the current folder.
--no-extensions, -ne Skip the built-in extensions and every discovered or configured extension. Extensions given with -e still load.
--system-prompt <text> Replace the default system prompt with this text, or the contents of the file at that path. Repeatable. Replaces ~/.vela/SYSTEM.md and .vela/SYSTEM.md for this run. See The system prompt.
--append-system-prompt <text> Append text, or the contents of the file at that path, to the system prompt. Repeatable. Replaces ~/.vela/APPEND_SYSTEM.md and .vela/APPEND_SYSTEM.md for this run. See The system prompt.
--no-context-files, -nc Don’t put AGENTS.md / CLAUDE.md into the system prompt. See Settings.
--tools, -t <tools> Tools for this run: a comma-separated list of names or * patterns (read_*), repeatable, which enables only those; or a list of only +name / -name entries (exact names), which turns default tools on or off and leaves the other tools alone.
--no-tools, -nt Start with no tools; --tools still enables the ones it names.
--exclude-tools, -xt <tools> Turn these tools off (names or * patterns), after --tools.
--list-models [search] Print the models listed in config.json (providers) and by extension providers (provider, model, context window, thinking support), optionally fuzzy-filtered, then exit. If an extension failed to load, the models that did load are still listed, but the exit code is 1.
--approve Trust this project’s .vela/config.json, .vela/extensions/, .vela/prompts/, .vela/SYSTEM.md, .vela/APPEND_SYSTEM.md and project skills (.vela/skills/, .agents/skills/, .skills/) for this run, without saving the decision.
--no-approve Do not trust them for this run, without saving the decision.
-h, --help Print the usage, every option, the run modes, examples and environment variables to stdout, then exit with code 0.
-v, --version Print the package version to stdout, then exit with code 0.

-c, -r, --session and --fork are mutually exclusive.

The tool options apply to every session the CLI opens (also after /new and /resume) and are checked after extensions load: an entry that matches no tool stops the CLI with exit code 2 and lists the available tools. pi ignores unknown names; Vela reports them so that a typo can’t leave a tool on or off. Like pi, they set the tools each session starts with: an extension can still change them with setActiveTools().

read, write, edit and bash are on by default; grep, find and ls are registered but off (like pi). --tools +grep turns one on, and --tools -bash turns a default tool off. Plain names and patterns replace the tools setting, while +name / -name entries apply on top of it. See Tools and Settings.

An extension that fails to load is reported on stderr (or in the chat log) and skipped; Vela still starts. Extension loading, discovery and the builtin: names are described in Extensions and Built-in extensions.

GitHub setup

vela setup github owner/repo --url https://public-origin configures user-level webhook settings and creates or updates repository hooks through the active account in GitHub CLI 2.57 or newer. Several repository arguments are supported. Missing arguments are prompted only in a terminal; non-interactive missing input exits 2. Setup runs without starting a model, extensions or channels. Success and cancellation exit 0; local configuration or remote API failures exit 1. Missing/unauthed gh saves local settings, prints manual values (including the secret), and exits 1. See GitHub webhook setup for secret storage, permissions, retries and verification.

Run modes

Vela picks the mode at startup:

  1. daemon manages the single-writer local daemon (start, stop, status, or foreground run).
  2. --mode json selects JSON mode.
  3. -p, --mode text, or a stdin or stdout that is not a terminal selects print mode.
  4. Otherwise Vela opens the interactive terminal UI.
vela                                         # interactive
vela -p "Summarize this repository"          # print the answer and exit
git diff | vela -p "Review this change"      # piped stdin
vela --mode json "List the TODOs" > events.jsonl
vela daemon start                            # start the resident local daemon
vela daemon status                           # inspect daemon PID & socket path

daemon

Local CLI sessions connect over <VELA_DIR>/vela.sock to a resident single-writer daemon (vela.db is opened only in that process, auto-started on demand).

  • vela daemon start: ensures the daemon is running and prints its PID and socket path.
  • vela daemon status: prints whether the daemon is running, its PID, app version, and socket path.
  • vela daemon stop: stops the daemon cleanly and reaps any active background jobs.
  • vela daemon run: runs the daemon in the foreground (used by auto-launch and systemd units).
  • vela serve and --mode rpc were retired in v0.9 and exit with code 2 (connectRuntime() from @glows777/vela replaces --mode rpc).

Failed agent runs keep the original error visible and add one next-step hint in the TUI and print-mode stderr. For example, a bad key shows Check your API key: /login or vela setup. Print mode still exits 1 and writes no answer for the failed run. Retries are unchanged.

Print mode sends each prompt in turn and writes only the final assistant text of this run to stdout. Diagnostics, extension notifications and console output from extensions go to stderr, so stdout stays clean for pipes. When context files were loaded, stderr also has one [context] line with their paths. See Context files. If the reader closes the pipe early (vela -p "..." | head -2), Vela stops and exits quietly with code 0.

If stdin is piped, its contents are prepended to the first prompt, separated by a blank line. If there is no prompt at all, Vela exits with code 2. If the turn fails or no model is available, the reason goes to stderr and the exit code is 1. Stopped by a signal, print and JSON modes abort the turn, kill the commands the model started, save the session and exit with 130 (SIGINT), 143 (SIGTERM) or 129 (SIGHUP); a second signal exits right away.

After printing, Vela stays open for background commands and the turns that handle their results. Those turns do not replace the printed answer. JSON mode continues emitting their events. If a background result turn fails, the CLI exits 1; text mode keeps the original answer it already wrote. A background command that reaches its unattended time limit is stopped and reports why, so it cannot keep print mode open indefinitely on its own.

Print mode has no UI: confirmation dialogs from extensions answer “no” and record a denied approval. If a turn pauses for human input (wait_for_input), print mode writes the assistant’s question to stdout, reports on stderr that the turn is waiting for input, and exits with code 1 so you can continue the session. Extension commands work (vela -p /memory), but the CLI’s own slash commands such as /context or /model do not; they are sent to the model as plain text.

JSON mode

--mode json writes a session header line followed by one v0.9 RuntimeEvent or StreamDeltaEvent JSON line per event of the session. Stdout carries only protocol records; diagnostics go to stderr. See JSON mode. For long-lived bidirectional automation, use connectRuntime() from @glows777/vela.

Sessions

Each launch starts a new session with an id like 20261008-081430-df22 (local date, time and four random characters). CLI sessions are persisted in SQLite at $VELA_DIR/vela.db (~/.vela/vela.db), with long tool outputs spilled under the project data directory.

Flag Behavior
none Start a new session.
-c, --continue Continue the most recently saved session of this project, or start a new one if there is none.
-r, --resume Show a picker of saved sessions (interactive mode only; use -c or --session in the other modes).
--session <id> Open the session with that id, creating it if it does not exist.
--no-session Keep the conversation in memory only; it is not saved and cannot be resumed. Tool call history, usage logs and long tool output are not written to SQLite or the data directory; long tool output uses a temporary directory removed when the session closes. Memory is still written.
--fork <id> Copy that saved session into a new one and start there.
vela --session refactor "Plan the parser refactor"
vela -p --session refactor "Now list the risky parts"
vela -c

A resumed session restores its history, name, thinking level and model (if the model was chosen by name and is still available). --model, --thinking and VELA_MODEL still win over the saved values. See Sessions.

Interactive mode

Interactive TUI connects to the local daemon (without channel adapters, which stay separate from the interactive chat log).

AI SDK warnings (for example a provider compatibility notice) appear in the chat log as notices instead of on the terminal, once per session even when the provider repeats them. Print and JSON modes keep them on stderr.

The fullscreen screen has, from top to bottom: the transcript and the dock. The transcript starts with the startup banner — Vela’s pixel portrait where the terminal can draw it, the CLI version, the session id and the key hints — and continues with the chat log, queued messages, a status line while the agent runs and extension widgets; the dock below it holds the editor and the footer. The portrait is drawn in darker colors when the terminal reports a light background, with the version, session and key hints in the column to its right; Apple Terminal and terminals narrower than 46 columns get the banner as plain text. When context files were loaded, the chat log starts with a [context] line naming them. /status lists the same paths. /extensions lists the loaded extensions and the tools, commands and channels each registered. The footer shows the folder and session name, tokens in and out, cost when known, context usage, the model and the thinking level, then the plan paying for the session when a subscription sign-in funds it (for example ChatGPT plan), followed by any extension status texts. The editor border color follows the thinking level.

The banner is the transcript’s first block, so it scrolls up out of view as the conversation grows and comes back when you scroll up; that is the layout Claude Code’s fullscreen renderer uses. The editor and footer stay in place while the transcript scrolls. The transcript follows streamed output while you are at the bottom. If you scroll up, output continues but the viewport stays at your reading position, and Vela shows ↓ New output · scroll to bottom. Scroll back to the bottom or press Ctrl+End to jump to the latest output and resume following it.

Text you send while the agent is running is a steering message: it is inserted after the current tool call. Slash commands run immediately even while the agent is running.

!command runs a shell command yourself, like pi: the output streams into a green block, and the command and its output go to the model as part of your next message. !!command runs it without sending it to the model (the block is dim). Both are saved in the session and work while the agent runs (the result is recorded when the run ends, so it never lands between a tool call and its result). Esc cancels the command. These commands don’t go through tool selection checks or hooks: they are yours. The editor border turns green while the input starts with !. connectRuntime() clients have the same via runtime.sessions.execBash().

When a project has untrusted configuration, Vela asks once at startup whether to trust it. See Project trust.

Keybindings

Vela’s own keys:

Key Action
Enter Send. While running: steer (insert after the current tool call).
Ctrl+V (Windows: Alt+V) Paste clipboard files as their original paths, an image as a temporary file path for the model to read with read, or clipboard text.
Alt+Up Move queued messages back into the editor.
Esc Cancel a running ! command; otherwise interrupt the running task (queued messages go back into the editor), cancel a session waiting on human input/approval, or clear a ! input. Closes the autocomplete menu first if it is open.
Ctrl+B Move the running shell command to the background, whether the model started it or you did with !. The row settles with the job’s id and the run keeps going. With nothing running it says No foreground command to background. In tmux, press it twice: the tmux prefix consumes the first press. This key replaces the editor’s Ctrl+B cursor-left (see the editor table); use Left.
Shift+Tab Cycle the thinking level.
Ctrl+L Open the model picker.
Ctrl+P, Shift+Ctrl+P Switch to the next or previous model in enabledModels (all available models when unset).
Ctrl+O Expand or collapse the process of every turn. Clicking a turn’s line does the same for that turn only.
Ctrl+T Show or hide thinking inside open turns.
Ctrl+C Clear the editor; press twice within half a second to exit.
Ctrl+D Exit when the editor is empty; otherwise delete the character after the cursor.

/hotkeys shows the same list. On macOS, Alt is the Option key (⌥), so Vela’s hints read Option+Up there. The editor itself comes from @earendil-works/pi-tui and uses its default keys. In fullscreen mode, PageUp and PageDown scroll the transcript, and Ctrl+End jumps to the latest output:

Key Action
Shift+Enter, Ctrl+J New line
Tab Complete a command or path
Up, Down Move the cursor; at the first or last line, browse prompt history
Left, Right / Ctrl+F Move by character
Alt+Left / Ctrl+Left / Alt+B, Alt+Right / Ctrl+Right / Alt+F Move by word
Home / Ctrl+A, End / Ctrl+E Line start, line end
Ctrl+], Ctrl+Alt+] Jump forward or backward to a character
PageUp, PageDown Scroll the transcript by page
Ctrl+End Jump to the latest output and resume following it
Backspace, Delete Delete character backward, forward
Ctrl+W / Alt+Backspace, Alt+D / Alt+Delete Delete word backward, forward
Ctrl+U, Ctrl+K Delete to line start, to line end
Ctrl+Y, Alt+Y Paste the last deleted text, cycle older deletions
Ctrl+- Undo

In pickers and dialogs: Up and Down move, Enter selects, Esc cancels. Keybindings cannot be changed.

Tool output

A turn’s process folds into one line above its answer, like Claude Code: Thought for 12s, searched for 3 patterns, read 2 files, ran 4 shell commands. During a turn, the fold shows tool-call totals such as 2 shell commands. The reasoning clock reads Thinking for … during reasoning and Thought for … when reasoning pauses. Thinking and the tool calls behind that line stay in the transcript but are hidden; Ctrl+O opens every turn and clicking a line opens that turn alone. A turn that left no answer text, because it was interrupted or only ran tools, stays open so its evidence shows. Within a turn, text the model wrote before a tool call is a preamble and joins the fold; the turn’s last text stays on screen.

Inside an open turn each tool call is a block showing the tool and its key argument and its full output, like pi. bash shows how long it took; edit shows the diff of its change. Ctrl+T hides or shows thinking inside open turns. A failed call leaves the fold and stays on screen, as do notices, permission prompts and your own ! commands (those keep the last 20 lines and expand with Ctrl+O). A resumed session draws the same folds with diffs.

If the terminal goes away (the window is closed or the SSH connection drops), Vela exits: on SIGHUP it saves and closes the sessions first, and when reading or writing the terminal fails it exits at once with code 129.

Completion

Typing / at the start of the editor lists commands: the TUI’s own, the CLI’s, prompt templates, skills (as skill:<name>), and commands registered by extensions, filtered as you type. Tab completes file and directory paths relative to the working folder.

@ starts fuzzy file completion over the working directory, as in pi. It uses fd, found or downloaded the same way as for the find tool (see Tools); until fd is ready, or if it can’t be found (for example with VELA_OFFLINE=1 and no fd installed), @ shows no suggestions and a notice says so. Within the TUI editor, @path is sent as written and the model reads the file with its tools.

Image and text attachments

On the command line, pass each attachment as its own @file argument: vela @shot.png "What is this?" or vela -p @notes.txt "Summarize this". Home paths such as @~/shot.png and macOS screenshot narrow-space filenames are resolved before reading. PNG, JPEG, GIF, WebP and BMP are identified by their bytes, even with a different filename extension. Images use the core’s existing input normalization. Each image includes an empty <file name="/absolute/path"></file> reference in attachment order, so the model can identify its source. Text wrappers also use escaped absolute filenames; a leading UTF-8 BOM is stripped and empty text files are skipped. Attachments and inlined text go to the first prompt only; other prompt arguments still run in order. An attachment alone also works. Piped stdin is included in the first prompt. Attachments used with a slash command are ignored with a notice.

Non-image attachments are rejected before a model request if they start with %PDF-, contain NUL bytes or are not valid UTF-8. Convert documents with an external tool (for example pdftotext) before attaching their text. Supported images and valid UTF-8 text, including Chinese and emoji, are preserved.

In the TUI, Ctrl+V (Alt+V on Windows) pastes what the local system clipboard holds. Copied files, such as a Finder file copy, are inserted as their original paths: one per line, or shell-quoted and space-separated in a ! bash command. A path containing a control character is refused with a notice instead of being inserted. With no files, a copied image is written to a private temporary file and its path is inserted; submit a prompt asking the model to read it with read. With neither, the shortcut inserts clipboard text at the cursor. A pasted path is plain text for the model to read, never an image attachment. Clipboard reading only inserts content: Enter keeps its normal behavior and does not wait for the read. Clipboard reads use pi-tui’s native clipboard on macOS, Windows and X11, or wl-paste from wl-clipboard on Wayland; file paths come from pi-tui’s native clipboard where it reports them, so Wayland keeps the image and text branches. Ordinary terminal text paste works as before. Temporary clipboard files are removed when Vela exits normally. Live and resumed history show short placeholders such as [image png 340KB] for user and tool images.

Slash commands

In interactive mode, a line that starts with / is a command; any other text, including single words such as exit or status, is sent to the model.

Interactive UI

Command Description
/new Start a new session.
/resume Pick a saved session and switch to it.
/name [name] Show or set the session name.
/model [provider/id] Without an argument, open the searchable model picker (models of providers that have a credential). With an argument, switch to that model.
/login [provider] Sign in to a provider (Sign in with ChatGPT, OpenRouter, or an API key) and store the credential in ~/.vela/auth.json. See Models.
/logout [provider] [--forget] Remove a provider’s stored credential (--forget also forgets saved OAuth client registration so the next sign-in re-registers).
/thinking [level] Without an argument, open a picker of the levels the model supports. With an argument, set it (clamped to a supported level).
/compact [focus] Summarize the conversation now, optionally telling the summary what to focus on.
/approve [yes|no|cancel] Review and resolve pending tool approvals on the current session.
/tree Move to another point in the session tree, optionally summarizing the branch you leave, or label an entry. See Sessions.
/fork Pick one of your earlier messages and continue in a new session from just before it (its text goes into the editor).
/clone Copy the current branch into a new session and switch to it.
/export [path] Write the current branch as HTML, or as JSONL when the path ends in .jsonl.
/copy Copy the last answer to the clipboard (pbcopy, PowerShell Set-Clipboard on Windows, wl-copy, xclip or xsel; over SSH or without a display, the terminal’s OSC 52). Windows text is read from a UTF-8 temporary file to preserve Chinese and other Unicode. If none works, the error says what to install.
/hotkeys Show the keyboard shortcuts.
/quit, /exit Exit.

/new, /resume, /compact, /tree, /fork and /clone refuse to run while a task is running.

CLI commands

Command Description
/status Session overview: CLI version, id, where the session is saved (vela.db path; not written yet until the first save; in-memory with --no-session), working directory, loaded context files, model, thinking level, message count, context estimate and token usage. The dollar amount uses the same rounding as the footer. A channel session also shows its channel; a fork shows the session it was copied from.
/context Context window usage by category (system prompt, tools, memory, skills index, messages) and the autocompact buffer (the window above the summary threshold).
/usage Token usage, cache hits and cost for this session.
/skill, /skills List skills.
/extensions Loaded extensions and the tools, commands and channels each registered.
/channel, /channel list Registered channels. See Channels.
/hooks Extension names with registered tool_call (pre) and tool_result (post) handlers, in dispatch order.
/cache on, /cache off Turn the prompt cache simulation of the demo model on or off (VELA_MODEL=mock only).

Two more kinds of / input are expanded by the session itself, so they also work in print, JSON and RPC mode: /skill:<name> [instruction] sends a skill, and /<template> [args] sends a prompt template. See Skills and Prompt templates.

Built-in extension commands

Command Extension Description
/memory memory List memories, flagging those with warnings.
/memory search <keywords> memory Search memories.
/memory lint memory Check the memory store for problems.
/dream memory Consolidate memory against recent conversations in an isolated call and show the report.
/tasks, /bashes background List this session’s background tasks: id, state, elapsed time, command head and output tail.
/tasks stop <id> background End a running background task through background_stop and print its final tail. An id that already delivered prints the same unknown-command message as background_stop.

Other extensions add their own commands; /extensions lists them. See Built-in extensions and Extensions.

Debug output

Set VELA_DEBUG=1 to see debug logs. In interactive mode they are appended to ~/.vela/debug.log so they do not garble the screen, and Vela shows which system prompt sections are on when a session opens. In the other modes debug lines go to stderr.

Environment variables

Variable Description
VELA_DIR User directory. Default ~/.vela; ~ is expanded.
VELA_MODEL mock uses the offline demo model; faux:<file.json> replays a recorded scenario. Overrides model and a resumed session’s model; --model still wins. See Testing.
VELA_RECORD Record this run’s model responses and user input as a faux scenario file, for replay with VELA_MODEL=faux:<file>.
VELA_DEBUG 1 enables debug logging (see above).
VELA_OFFLINE 1, true or yes: never download rg / fd for the search tools. See Tools.
OPENAI_API_KEY API key of the built-in openai provider.
OPENAI_API_BASE_URL Base URL of the built-in openai provider, for proxies and OpenAI-compatible services.
ANTHROPIC_API_KEY API key of the built-in anthropic provider.
OPENROUTER_API_KEY API key of the built-in openrouter provider.
DEEPSEEK_API_KEY API key of the built-in deepseek provider.
TAVILY_API_KEY, SERPER_API_KEY Independent search keys for the web extension (web.tavilyKey, web.serperKey). Tavily wins if both are set; supported models may use provider-hosted search without either key.
LARK_APP_ID, LARK_APP_SECRET Credentials for the lark channel (lark.appId, lark.appSecret); without them it does not connect.
LARK_OWNERS Comma-separated Lark open_ids whose direct chats are always enabled (lark.owners).

The extension variables are defaults for the built-in keys shown in parentheses: a value set in config.json overrides them, and an empty string counts as unset. providers, built-in section objects, and extensionConfig can read any other variable with $NAME or ${NAME}. Vela does not implicitly read the SDK’s OPENAI_BASE_URL or ANTHROPIC_BASE_URL; configure a provider baseUrl instead.

The installed vela command does not load .env files. Bun does, from the current folder, when you run the source with bun packages/vela/src/cli/main.ts.