CLI
Reference for the viewport command. To install it, see Install the CLI.
Commands
Section titled “Commands”usage: viewport <command> [args]| Command | What it does |
|---|---|
viewport install |
Adds the /viewport skill and the conversation capture hooks to every supported coding agent it finds. Safe to re-run. See Connect your coding agent. |
viewport uninstall |
Removes the skill and the hooks. Leaves the binary and ~/.viewport in place. |
viewport login |
Signs this machine in through the browser and stores a token. See Sign in. |
viewport pr [source] [target] |
Starts a review of source (default: the current branch) against target (default: origin/HEAD, else main, else master) and prints the link. See Run a review. |
viewport --version |
Prints the version. |
viewport --help |
Prints the list of commands. |
Every command exits with 0 on success and 1 on failure, with the error on stderr.
Environment variables
Section titled “Environment variables”| Variable | Use |
|---|---|
VIEWPORT_HOME |
Where the CLI keeps its files. Default ~/.viewport. |
VIEWPORT_API |
The server login and pr talk to. Default https://app.tryviewport.ai. |
VIEWPORT_NO_BROWSER |
Set to 1 to have viewport login print the pairing URL instead of opening a browser. |
VIEWPORT_LOG |
Set to json to also write each warning and error to stderr as a JSON object. Useful when you report a bug. |
NO_COLOR |
Set to turn off colored output. |
Files on your machine
Section titled “Files on your machine”| Path | What it is |
|---|---|
~/.local/bin/viewport |
The binary. |
~/.viewport/credentials.json |
Your CLI tokens, one per server. |
~/.viewport/sessions/<agent>/<id>.jsonl |
The recorded agent conversations, one file per session. They stay here until viewport pr sends a branch’s turns. |
~/.claude/skills/viewport/SKILL.md |
The skill for Claude Code. |
~/.claude/settings.json |
Claude Code’s settings, where the two capture hooks are added. |
~/.cursor/skills/viewport/SKILL.md |
The skill for Cursor. |
~/.cursor/hooks.json |
Cursor’s hooks. |
~/.agents/skills/viewport/SKILL.md |
The skill for Codex and Copilot CLI, shared by both. |
~/.codex/hooks.json |
Codex’s hooks. |
~/.copilot/hooks/viewport.json |
Copilot CLI’s hooks. |
If you set VIEWPORT_HOME, the files under ~/.viewport live there instead.