# vg CLI reference

> Every vg command an agent or a terminal user can run in a workspace: synopsis, flags, output, exit status and an example.

Source: https://docs.ventgris.com/agents/vg-cli

`vg` is the command of the workspace. Each command is one request to the workspace control plane (`vgd`) over a local socket, so it works the same from an AI session, from a terminal of the interface and from a script. The same commands are offered to Claude Code and Codex as MCP tools (`memory_log`, `action_run`, ...). This page lists every command a customer and the agent can run. Commands of the `vg admin` group, `vg secret set` and `vg memory reindex` need `root` on the machine and are not covered.

## Common rules

| Rule | Detail |
|---|---|
| Help | `vg help` lists every command; `vg help GROUP` (for example `vg help art`) the commands of a group; `vg COMMAND --help` one command |
| `--json` | every command takes it and prints the raw answer of `vgd` instead of text |
| Flags | before, between or after the arguments. `--flag value` or `--flag=value`. A flag that takes no value refuses `--flag=x` |
| Text that starts with a dash | put it after `--`: `vg log -- "-5 % on the quote"` |
| Paths | relative to the current directory, and must be inside the workspace. A path outside, or a link that leads outside, is refused: `PATH is outside the workspace (ROOT): vg only takes paths inside it` |
| Durations | `90s`, `30m`, `24h`, `30d`, `2w` |
| Dates | `YYYY-MM-DD` |
| Output | short plain text written for a model to read. No command ever prints a secret value |
| Errors | `vg: <message> (<code>)` on standard error, exit status 1 |
| Unknown command | `vg: unknown command "x"`, exit status 2. An unknown sub-command of a group prints the group's help and exits 1 |

## Who can run what

`vgd` knows who calls from the kernel (the user and process of the caller), not from anything the caller sends.

| Caller | What it gets |
|---|---|
| AI session turn (Claude Code or Codex) | every command below, within the policy of its [agent profile](https://docs.ventgris.com/agents/agent-profiles.md). It carries `VG_SESSION_TOKEN`, bound to the process group of the turn |
| Terminal of the interface | every command below, as the shell. It may start a session of any profile and run any declared action, under the same guardrails |
| Command job of the scheduler | only `vg notify`, `vg deliver` and `vg log` |
| Background task (`vg task start`) | none: a task holds no token |
| Terminal opened on a session | none |

Some refusals depend on the caller: a session cannot start a session of a wider policy, cannot confirm a rule from a tainted turn (one that read untrusted content), and can only run the actions its profile lists.

## Memory

### vg log

```text
vg log "text"
```

Appends one line to today's journal, `ventgris-os-memory/memory/daily/YYYY-MM-DD.md`, under `## Log`, with the time and the session. Prints `logged in PATH, line N`. One sentence, past tense, with names and numbers.

```bash
vg log "Sent the 2026-12 newsletter draft to Claire for review (drafts/news-2026-12.md)"
```

### vg recall

```text
vg recall "query" [--layer L,..] [--since DATE] [--until DATE] [--limit N]
```

Full-text search over the memory: journals, notes, rules, skills, `AGENTS.md` files. Every word must be in a passage; when no passage holds them all, it prints `no passage holds every word: these hold some of them` and shows partial matches.

| Flag | Meaning |
|---|---|
| `--layer` | comma separated: `daily`, `weekly`, `monthly`, `quarterly`, `yearly`, `rule`, `note`, `learning`, `next`, `agent`, `skill` |
| `--since`, `--until` | only passages dated on or after, on or before this day |
| `--limit` | how many passages at most |

Output, two lines per hit: `PATH:LINE [LAYER DATE] TITLE` (with `(quarantined)` for a quarantined write), then the snippet. `nothing found for "q"` when empty.

```bash
vg recall "Lyon venue deposit" --layer daily,note --since 2026-10-01
```

### vg map

```text
vg map [--refresh]
```

Prints `WORKSPACE_MAP.md`, the generated map of the workspace (house CLIs, databases, paths, conventions). With `--refresh`, regenerates it and prints `WORKSPACE_MAP.md rewritten: N lines, N tokens of 1500` (or `unchanged`). Without a map: `no workspace map yet (...): run vg map --refresh`.

### vg loop add, list, close

```text
vg loop add "what" --who CONTACT [--due DATE] [--they-owe]
vg loop list [--state open|done|dropped|all] [--late]
vg loop close ID [--dropped]
```

Open loops are the register of commitments: what we owe (default) or what someone owes us (`--they-owe`). `--who` is required. Each line reads `ID [direction] WHO: WHAT (due DATE) LATE [state]`.

```bash
vg loop add "Send the signed quote" --who "claire@example.com" --due 2026-12-02
vg loop list --late
vg loop close lop_01JF... --dropped
```

## Asking a human, acting on the outside

### vg ask

```text
vg ask "question?" --default D [--choices a,b] [--timeout 30m]
```

Asks a person and prints the answer alone on standard output, so `answer=$(vg ask ...)` works. `--default` is required. When the timeout passes, the default is printed and the task goes on. In a job the default applies at once. On standard error: `que_...: answered by usr_...` or `que_...: nobody answered, the default applies; an answer can still come later and is kept for next time`. Limits: 12 choices, 2000 characters of question, timeout at most 24 hours. See [Brokered actions](https://docs.ventgris.com/agents/brokered-actions.md#ask-a-human-with-a-default).

### vg action list, run, cancel

```text
vg action list
vg action run NAME [--file input.json|-]
vg action cancel RUN_ID [--note TEXT]
```

`list` prints `NAME  class CLASS  gate GATE  TITLE [blocked for now: ...]`. `run` sends the input (a JSON file, `-` for standard input, nothing for `{}`) and prints `RUN_ID NAME: STATE (gate GATE)` with a line for what comes next. Exit 0 for `done`, `scheduled`, `pending_approval`; 1 for `blocked`, `failed`, `cancelled`, `expired`. `cancel` withdraws one of your own runs while it is `scheduled` or `pending_approval`. Full rules: [Brokered actions](https://docs.ventgris.com/agents/brokered-actions.md).

```bash
echo '{"recipient":"discord:partners","text":"Doors open at 18:30."}' | vg action run discord.post --file -
```

### vg activity

```text
vg activity [--since 24h] [--all] [--limit N]
```

Your action runs and questions since the given time (default 24 hours): `HH:MM action NAME STATE ID (reason)` and `HH:MM question STATE ID "text" -> answer`. `--all` shows everybody's, with `by <requester>`.

### vg notify

```text
vg notify CHANNEL "text" [--title T]
```

Posts in a channel of the team (`platform:name`, for example `discord:pulse`). With `--title` on Discord it opens a thread tied to this session. Prints `queued for CHANNEL (N message(s))`. A message to anyone outside the team is a brokered action, not `vg notify`. Counts as the delivery of a job run.

### vg deliver

```text
vg deliver FILE [--caption "text"]
```

Sends a workspace file in the conversation the session was started from (its channel thread), and records it in the ledger of deliverables. From a command job it posts in the job's `deliver_to`. Refused in a session not started from a channel: `this session was not started from a channel: there is no conversation to deliver the file in`.

### vg channel

```text
vg channel list
vg channel save PLATFORM:ID [--name N] [--agent SLUG] [--instructions T] [--shared yes|no] [--thinking quiet|stream] [--alerts all|critical] [--enabled yes|no]
vg channel remove PLATFORM:ID
vg channel user add PLATFORM ID --label L --role admin|member [--policy P] [--scope CHANNEL]...
vg channel user set PLATFORM ID [--label L] [--role admin|member] [--policy P] [--scope CHANNEL]...
vg channel user remove PLATFORM ID
vg channel whatsapp [--account ID] [--template NAME --language L]
```

`list` prints the platforms (connected or not, missing secrets), the channels and the people the agent listens to. Every other sub-command is a request: it submits a brokered action (`channels.channel_save`, `channels.user_add`, ...) that waits for a person to approve with step-up, and prints its run. Unset flags keep the current values. `remove` only deletes a channel that never had a conversation. See [Channels](https://docs.ventgris.com/workspace/channels.md).

### vg check

```text
vg check FILE [--check slopcheck,readcheck]
```

Runs the content checks the broker runs on what leaves, on a workspace file. Each finding is `BLOCK|WARN CHECK FILE:LINE [rule] « passage »` with an advice line `-> ...`, then `N BLOCK, N WARN in FILE: checks`. Exit 1 when a finding blocks or a check could not run.

## Artifacts

An [artifact](https://docs.ventgris.com/workspace/artifacts.md) is a folder published at an address. Private by default: only signed-in members open it.

```text
vg art publish DIR [--title T] [--update ID] [--access owner|team|password] [--expires 30d|--no-expiry] [--public --slug S]
vg art list [--mine]
vg art show ID
vg art set ID [--title T] [--access owner|team|password] [--new-password] [--expires 30d|--no-expiry] [--spa yes|no] [--listed yes|no] [--allow-external HOSTS]
vg art rollback ID --to N
vg art unpublish ID
vg art delete ID
```

| Flag of `publish` | Meaning |
|---|---|
| `--title` | title shown in the list |
| `--update ID` | publish a new version of an existing artifact (`art_...`) |
| `--access` | who opens the private address: `owner` (default), `team`, `password` |
| `--expires`, `--no-expiry` | when the address stops working; not both |
| `--public` | also ask for a public address. This is the brokered action `art.publish_public`: checked, then live after its undo window |
| `--slug S` | the name in the public address; only with `--public` |
| `--owner USER` | the member who owns it, when the session works for nobody in particular |
| `--spa` | serve `index.html` for unknown paths (single-page app) |
| `--allow-external HOSTS` | comma separated hosts the pages may load from |
| `--indexable` | let search engines index the public page |
| `--listed` | list it among the public artifacts |
| `--storage` | serve the public page from the storage host, so it can use browser storage |
| `--waive contacts` | waive the check for addresses and phone numbers |

`publish` prints `ID vN published: VISIBILITY, access ACCESS`, the address, `password of the link (shown once): ...` for `password` access, the number of check findings, and the state of the public request (`public: act_... scheduled, live at HH:MM unless cancelled: vg action cancel act_...`). It exits 1 when going public was `blocked` or `failed` (the private version stays). `list` prints `ID VISIBILITY/ACCESS vN "title" URL (expires DATE)`. `unpublish` takes a public artifact back to private at once.

```bash
vg art publish reports/q4 --title "Q4 report" --access team --expires 30d
vg art publish site/ --update art_01JF... --public --slug meetup-dec
```

## Media

[Media](https://docs.ventgris.com/workspace/media.md) are heavy files (images, videos, sounds, PDF) kept in object storage instead of the workspace.

```text
vg media put FILE --desc "what it shows" --usage "what it is for" [--title T] [--tags a,b] [--project P] [--source S] [--public]
vg media find ["words"] [--kind image|video|audio|pdf|document] [--project P] [--tag T] [--public|--private] [--limit N]
vg media show ID
vg media link ID [--ttl 1h]
vg media set ID [--desc D] [--usage U] [--title T] [--tags a,b] [--project P] [--public|--private]
vg media use ID WHERE [--note N]
vg media rm ID [--force]
vg media import DIR --usage "why these files exist" [--desc-prefix T] [--tags a,b] [--min-size 1MB] [--all] [--keep] [--dry-run]
```

| Command | Detail |
|---|---|
| `put` | `--desc` and `--usage` are required. Private unless `--public` (then served from the CDN). The same file twice is not uploaded again: `already stored, nothing uploaded`. Prints `ID KIND VISIBILITY SIZE NAME` and the address, or `private: vg media link ID gives a signed link` |
| `find` | searches name, description, usage and tags |
| `link` | the CDN address of a public media, or a signed link for a private one: `--ttl` default 1h, 7d at most |
| `use` | records where a media is used (a path, an address, a post) |
| `rm` | refused while the media is used somewhere, unless `--force` |
| `import` | stores every heavy file of a folder (video, audio, image, PDF, zip, slides) of 1 MB or more (`--min-size`), `--all` for every file. Each file is replaced by `NAME.media.json` unless `--keep`. Skips `.git`, `node_modules`, `.venv`, `__pycache__`, `.next`, `dist`, `.cache`. `--dry-run` lists without uploading. Exit 1 when a file failed |

## Jobs

```text
vg job list
vg job create FILE.toml
vg job enable NAME
vg job disable NAME
vg enqueue JOB [--arg k=v]...
```

| Command | Detail |
|---|---|
| `list` | `NAME (ID) KIND schedule "CRON" next run HH:MM deliver_to CHANNEL last run STATE`, or `on event only`, `disabled` |
| `create` | creates a job from a TOML file with the fields of [Job files](https://docs.ventgris.com/agents/job-files.md), inside the caps of your policy. The job is enabled at once. A `secrets` key is dropped with a note. Prints `created ...` |
| `enable`, `disable` | switch a job on or pause it. A system job cannot be changed: `this job belongs to the system: an agent cannot change, start or stop it` |
| `enqueue` | runs a job now, with arguments (`VG_ARG_<KEY>` in a command job). Prints `RUN_ID STATE`. Refused while a run is in progress for a manual run, and on a frozen machine |

`vg job create` needs an owner: the person the session works for. A session started by a channel user or by another session, or a terminal, has none and gets `the job needs an owner: a human of the interface`. Write a job file instead.

## Sessions

```text
vg session title "title"
vg session run "prompt"|- [--agent SLUG] [--title T] [--wait]
```

`title` names the current session (and its channel thread): call it once, early. `run` starts another session under a profile; `-` reads the prompt from standard input (256 KiB at most). Without `--wait` it prints `SES_ID started` or `queued`. With `--wait` it prints the answer of that session, then `ID: STATUS in DURATION` on standard error, and exits 1 when the status is not `completed`. A session may only start a profile of its own policy; the session it starts is tainted if the caller's turn is.

## Background tasks

A task runs a long command (a build, a render, a transcription) outside the turn, which has a time limit. The session is told when it ends.

```text
vg task start [--name N] [--resumable] [--weight MB] -- COMMAND...
vg task status ID
vg task logs ID [--tail N] [--follow]
vg task list
vg task stop ID
```

| Command | Detail |
|---|---|
| `start` | prints the id (`tsk_...`) alone on standard output, so `id=$(vg task start -- make)` works. `--weight` is the memory it needs in MB (default 512); a heavy task waits for a heavy slot. `--resumable` starts it again once after a restart of the machine. It starts in the current directory when that is inside the workspace, else at the workspace root |
| `status` | `ID "name": STATE (weight N MB)`, the command, the session that started it. States: `queued, position N`, `running for ...`, `frozen in place (memory pressure)`, `done, exit code 0 after ...`, `failed`, `stopped` |
| `logs` | the last 100 lines, or `--tail N`. `--follow` prints new output until the task ends. One answer carries 256 KiB at most |
| `stop` | a queued task never starts; a running one is ended |

A task runs as the session user with no token: it cannot call `vg` itself.

## Skills, rules, tools

```text
vg skills list
vg skills sync
vg skills lint
vg skills import URL|FOLDER [--dry-run] [--only NAME]... [--replace] [--token SECRET]
vg agents import URL|FOLDER [--dry-run] [--only NAME]... [--replace] [--token SECRET] [--policy P]
vg rule list
vg rule hit ID
vg rule confirm ID
vg tools
vg rules build
vg mcp sync
```

| Command | Detail |
|---|---|
| `skills list` | `NAME [LINT_STATE] description`, then each lint finding `SEVERITY CODE: message` |
| `skills sync` | reads `agents/`, `skills/` and `rules/` again: `agents: N added, N changed, N removed`, same for skills and rules, and `could not read: ...` |
| `skills lint` | runs the lint on every skill, same output as `list`. See [Skills and rules format](https://docs.ventgris.com/agents/skills-and-rules-format.md) |
| `skills import`, `agents import` | import from `https://github.com/OWNER/REPO[/tree/REF/FOLDER]` or a workspace folder. Prints the preview (`KIND NAME (FORMAT) → TARGET [new / exists already / refused: reason]`), then writes. `--dry-run` writes nothing. `--only` picks items by name. An existing item is kept unless `--replace`. `--token` names a vault secret holding a GitHub token, for a private repository. `--policy` sets the policy of the converted profiles (default `ventgris`). Refused when the session policy does not allow managing skills or agents, or the turn is tainted. See [Agent profiles](https://docs.ventgris.com/agents/agent-profiles.md#import-agents) |
| `rule list` | `ID level N, N hit(s), quarantined, level N proposed: summary` |
| `rule hit ID` | report that a correction a rule already covers came back |
| `rule confirm ID` | release a quarantined rule; refused from a tainted turn |
| `tools` | `N tool(s), arch ARCH, tier TIER`, then `NAME [STATE] reasons` for each tool of the catalog |
| `rules build` | regenerates what the harnesses read at start: `~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md`, the MCP configuration. Prints each file `written`, `unchanged` or `failed`, then the rules, skills and MCP servers per harness. Exit 1 when a file could not be written |
| `mcp sync` | brings the MCP configuration of the harnesses in line with the registry of [Integrations](https://docs.ventgris.com/workspace/integrations.md), same output |

## Secrets

```text
vg secret list
vg scan PATH
```

`secret list` prints the names of the secrets granted to this session and how each is handed over: `NAME (env)`, `(file)`, `(broker)` (used by an action, never visible to you), `(proxy)`. Never a value. `no secret is granted here` when empty. `scan` looks for secret values of the vault in a file or a folder and prints `PATH: NAME, NAME`; it exits 1 when one is found. Run it before you publish or commit. See [Secrets](https://docs.ventgris.com/workspace/secrets.md).

## Machine

```text
vg resources
```

Prints `tier TIER: N MB of N MB in use (machine N MB)`, then for each kind of slot `KIND: N running of N (N free)`, then `queue: N waiting` and `admission paused by memory pressure` when it is. Read it before starting something heavy.

## Sandboxes

A [sandbox](https://docs.ventgris.com/workspace/sandboxes.md) runs code you do not trust, in an isolated container with no access to the workspace unless you mount a folder.

```text
vg sandbox run [--image base] [--network none] [--mount DIR[:DST][:rw]] -- COMMAND...
vg sandbox create [--image base] [--network none] [--ttl 30m]
vg sandbox exec ID [--tty] -- COMMAND...
vg sandbox shell [ID | --image base --network none]
vg sandbox cp ID:/path FILE | FILE ID:/path [--tar]
vg sandbox rm ID...
vg sandbox list [--all]
vg sandbox logs ID [--tail N]
vg sandbox image list
```

| Flag | Meaning |
|---|---|
| `--image` | `base` (default), `python`, `node`, `browser`, or another image of `vg sandbox image list` |
| `--network` | `none` (default, loopback only), `allowlist` (through the egress proxy, to the `--host` list), `packages` (to the package registries), `web` (any public host on ports 80 and 443) |
| `--host H` | a host for `allowlist`; repeatable or comma separated. Sets `--network allowlist` when no network is given |
| `--mount DIR[:DST][:ro\|rw]` | a workspace folder, read-only unless `rw`, at `/work/<name>` unless `DST` |
| `--volume NAME[:DST]` | a named writable volume, at `/data` unless `DST` |
| `--env K=V` | an environment variable; repeatable |
| `--user` | `root` (default without a writable mount) or `agent` (the default, and only choice, with one) |
| `--memory`, `--disk` | `384`, `384m`, `2g` |
| `--cpus`, `--pids` | positive numbers |
| `--ttl` | how long the sandbox lives: default 30 minutes, at most 6 hours. An unused sandbox stops after 15 minutes |
| `--read-only` | read-only root file system |
| `--no-wait` | fail at once instead of queueing when no slot is free |
| `--cwd`, `--timeout` | for `run`, `exec`, `shell`: working directory (default `/work`) and time limit of the command |

`run` and `exec` stream the output and end with the exit status of the command. `create` prints the id (`sbx_...`). `cp --tar` copies a folder as a tar archive. `list --all` adds the sandboxes of the last 7 days. With `--json`, `run` prints `id`, `exit_code`, `queued_ms`, `duration_ms`, `stdout`, `stderr`.

```bash
vg sandbox run --image python --mount downloads/untrusted -- python3 /work/untrusted/script.py
```

> [!NOTE]
> The footer of `vg help` may still say `Not available on this build: vg sandbox`. The `vg sandbox` commands above are served; a workspace that cannot start sandboxes answers each one with the reason.

## Browser

The shared browser has no CLI command. Sessions get it as MCP tools: `browser_open`, `browser_tabs`, `browser_tab`, `browser_navigate`, `browser_snapshot`, `browser_click`, `browser_type`, `browser_press`, `browser_select`, `browser_scroll`, `browser_hover`, `browser_screenshot`, `browser_wait`, `browser_upload`, `browser_downloads`, `browser_handoff`, `browser_mobile`, `browser_close`. Password and one-time code fields are refused: call `browser_handoff` and end the turn. Downloads land in `inbox/browser/`. See [Browser](https://docs.ventgris.com/workspace/browser.md).

## Harness integration

These are started by Claude Code and Codex, not typed.

| Command | Role |
|---|---|
| `vg mcp` | the MCP server of the session on standard input and output: the commands above as tools, plus `whoami` (the session id, profile, policy, denied commands, taint, MCP servers) |
| `vg mcp --check` | says what a session gets, for a human to read |
| `vg hook pretool [--harness claude\|codex] [--strict] [--tool T --command C]` | the PreToolUse hook. It refuses a shell command that starts with one of the policy's `deny_commands`. `--tool` and `--command` try a call by hand |

## Related

- [Read this first if you are an agent](https://docs.ventgris.com/agents/overview.md)
- [Brokered actions](https://docs.ventgris.com/agents/brokered-actions.md)
- [Job files](https://docs.ventgris.com/agents/job-files.md)
- [Workspace layout](https://docs.ventgris.com/agents/workspace-layout.md)
- [Terminals](https://docs.ventgris.com/workspace/terminals.md)
