> For the complete documentation index, see [llms.txt](https://docs.visdom.virtuslab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.visdom.virtuslab.com/visdom-tracing/user-guide/command-reference.md).

# Command reference

Every command the `tracevault` binary exposes, taken from the CLI's own definitions. Commands marked **hook** are installed by `tracevault init` and invoked by the agent or by git; they are not meant to be run by hand.

| Command                                             | What it does                                                                                                                                                                                                             | Run by |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ |
| `tracevault init`                                   | Wire tracing into a repository: agent hooks, git hooks, `.tracevault/`, server registration. Flags: `--server-url`, `--agent`, `--claude-settings`, `--no-gitignore`, `--global`, `--user-context`, `--no-user-context`. | You    |
| `tracevault login`                                  | Sign in through Keycloak with the OAuth device grant. `--server-url` required, `--no-browser` for headless.                                                                                                              | You    |
| `tracevault logout`                                 | Revoke the refresh token and delete the local credentials file.                                                                                                                                                          | You    |
| `tracevault status`                                 | Show the session's tracing status. Mode-aware; `--session-id` to inspect a specific session.                                                                                                                             | You    |
| `tracevault stats`                                  | Local session statistics, read from disk.                                                                                                                                                                                | You    |
| `tracevault sync`                                   | Sync the repository's git remote URL with the server.                                                                                                                                                                    | You    |
| `tracevault check`                                  | Evaluate unpushed sessions against the repo's policies. Can block the push.                                                                                                                                              | Hook   |
| `tracevault flush`                                  | Re-send events that failed to stream live.                                                                                                                                                                               | You    |
| `tracevault verify`                                 | Check that commits are registered and sealed on the server. `--commits` or `--range`.                                                                                                                                    | CI     |
| `tracevault verify-start`                           | Open (or re-open) a verification phase for the session. `--session-id` in multi-agent setups.                                                                                                                            | You    |
| `tracevault agent-policies`                         | Print the rendered, agent-readable policy instructions for the current repo.                                                                                                                                             | You    |
| `tracevault context set \| update \| show \| clear` | Manage the flow ID, labels and params stamped on every event. `--global` and `--user` select the layer.                                                                                                                  | You    |
| `tracevault context source`                         | Enable, disable or relocate the user-level context. One of `--enable`, `--disable`, `--path`, `--default`.                                                                                                               | You    |
| `tracevault repo switch \| status \| reset`         | Bind, inspect or clear the repository a detached session is tracing (workspace mode).                                                                                                                                    | You    |
| `tracevault project`                                | Bind and inspect the project a detached session is attributed to.                                                                                                                                                        | You    |
| `tracevault proxy info`                             | Print the LLM proxy URL and setup instructions for AI tools.                                                                                                                                                             | You    |
| `tracevault stream --event <name>`                  | Stream one hook event to the server. Installed into the agent's hook config.                                                                                                                                             | Hook   |
| `tracevault session-start`                          | Export the session ID and inject the bound repo's policies at session start.                                                                                                                                             | Hook   |
| `tracevault user-prompt`                            | Re-inject policies when the session's effective repo has changed.                                                                                                                                                        | Hook   |
| `tracevault commit-push`                            | Push commit metadata to the server. Installed into `.git/hooks/post-commit`.                                                                                                                                             | Hook   |

## Environment

* `TRACEVAULT_SERVER_URL`: the server every command talks to
* `TRACEVAULT_API_KEY`: long-lived key for CI and automation; **takes precedence over an interactive login** on the same machine
* `TRACEVAULT_SESSION_ID`: the session that `repo`, `project` and `status` resolve against; set by `tracevault init --global`

Credentials live in `~/.config/tracevault/credentials.json` (mode `0600`); the user-level context and its config live beside them in `~/.config/tracevault/`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.visdom.virtuslab.com/visdom-tracing/user-guide/command-reference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
