Skip to content

Open-source, local-first AI agent for real work.

4.5 KB
Raw Blame
---
title: CLI and settings
description: Run scripted tasks in text or JSON mode and understand how global, project, and resource paths are resolved.
---

The CLI is useful for one-off terminal tasks, JSON event output, and RPC startup. Desktop users normally do not need to maintain these files by hand; hosts and automation should use the public parameters and schemas.

## Entry points

| Entry point | When to use it |
| --- | --- |
| Installed desktop app: `Vetta --agent-rpc <args...>` | Regular use. Everything after `--agent-rpc` is passed unchanged to the Agent command line |
| Built from source in `apps/cli-host`: `vetta <args...>` | Development or debugging inside the monorepo; `@vetta/cli-host` is not published to npm |

The installer does not put a standalone `vetta` command on `PATH`. Instead, it reuses the app's own executable: `/Applications/Vetta.app/Contents/MacOS/Vetta` on macOS, `Vetta.exe` in the installation directory on Windows, and the installed `Vetta` executable on Linux. This mode does not open a window, and logs go to stderr. `Vetta --help` lists only the desktop app's own commands, and it is shown whenever `--help` or `-h` appears anywhere in the arguments; use this page for Agent options, or run `vetta --help` from a source build for the full list.

The examples below use `vetta` for either entry point; with an installed app, replace it with `Vetta --agent-rpc`.

## Run one task

```bash
# Default text output
vetta "Summarize the project structure in the current directory"

# Structured JSON event stream
vetta --mode json "Check the scripts in package.json"

# Choose a model and thinking level
vetta --model openai/gpt-4o:high "Analyze this failure"

# Resume the most recent session
vetta --continue "Continue the previous task"
```

| Option | Description |
| --- | --- |
| `--mode text|json|rpc` | Output or protocol mode |
| `--provider <name>` | Select a provider |
| `--model <provider/id[:thinking]>` | Select a model and optional thinking level |
| `--continue` | Resume the most recent session in the current session directory |
| `--session <path>` | Open a specific session file |
| `--session-dir <dir>` | Set the session storage and lookup directory |
| `--no-session` | Do not persist this session |
| `--thinking <level>` | Thinking level: `off`, `minimal`, `low`, `medium`, `high`, `xhigh` |
| `--tools <a,b,...>` / `--no-tools` | Select or disable built-in tools |
| `--append-system-prompt <text>` | Append text or file contents to the system prompt |
| `--list-models [search]` | List available models and exit |
| `--export <file>` | Export a session file to HTML and exit |
| `--offline` | Disable network operations during startup |

`--resume` is no longer supported. Use `--continue` or `--session` instead.

## Settings precedence

| Scope | Path |
| --- | --- |
| Global | `~/.vetta/agent/settings.json` |
| Project | `<cwd>/.vetta/settings.json` |

Project settings override global settings. Relative paths are resolved from the directory containing their configuration file; absolute paths and `~` are also supported.

Common settings include the default model, thinking level, message queue, context compaction, automatic retry, resource paths, MCP, image processing, personalization, and shell. The schema exported by `@vetta/coding-agent/settings` is the source of truth for all fields.

## Command shell

On Windows, commands run in `pwsh.exe` from `PATH` by default, then `powershell.exe`, and finally `cmd.exe` if neither is found; PowerShell automatically gets a UTF-8 output prefix. On macOS and Linux the default is `/bin/bash`, falling back to `bash` or `sh` on `PATH`.

To use a POSIX shell such as Git Bash instead, configure it explicitly. The program at `shellPath` is invoked as `-c <command>`, and command execution fails immediately if the path does not exist:

```json
{
  "shellPath": "C:\\Program Files\\Git\\bin\\bash.exe",
  "shellCommandPrefix": "shopt -s expand_aliases"
}
```

Do not put an API key in `shellCommandPrefix` or in commands that may be logged. Prefer credential configuration or a controlled environment variable.

## Install resource packages

The `install`, `list`, `update`, and `remove` subcommands manage resources containing extensions, skills, and prompts from npm, Git, or a local source:

```bash
vetta install npm:@scope/[email protected]
vetta install git:github.com/example/repo@v1
vetta list
vetta update
vetta remove npm:@scope/package
```

Resource packages can execute code. Review their source, version, and permissions before installing them into a long-lived configuration.