CLI reference
pitview is one program. You run a few of its commands yourself; your coding tools run the rest.
pitview login [server-url] sign in (opens your browser)
pitview init [--repo] connect Claude Code, Cursor and Codex, and share the repository you're in
pitview status is pitview working here?
pitview team your teams, and whether work in this repository is shared
pitview private stop sharing the current session and delete what was shared
pitview check test-merge your work with live teammates' pushed branches
pitview --help all of these
pitview --version
pitview hook and pitview mcp are run by your coding tools, not by you, so pitview --help leaves them out.
Install
curl -fsSL https://pitview.dev/install | sh
On Windows, in PowerShell:
irm https://pitview.dev/install.ps1 | iex
Run in a terminal, the installer goes on to sign you in and run pitview init, so the one paste is the whole setup. Piped or scripted, it only installs and says what to run next.
Builds exist for macOS and Linux, on Apple silicon/ARM64 and Intel/x64, and for 64-bit Windows (the x64 build, which Windows on ARM also runs). The program is installed as ~/.local/bin/pitview, or pitview.exe in the .local\bin folder of your user folder on Windows. Set PITVIEW_INSTALL_DIR to install elsewhere.
On Windows, ~ in these pages means your user folder, such as C:\Users\you.
To upgrade, run the install command again. If you are already signed in it skips signing in, and it runs pitview init again so the tool settings match the new version.
To uninstall, delete the pitview file, remove pitview's entries from the tool settings listed under pitview init, and delete ~/.config/pitview.
pitview login
pitview login https://pitview.dev
Signs this computer in. Your browser opens a pitview page and the terminal prints a short code. Check the page shows the same code and choose Allow. If you aren't signed in to the dashboard in that browser, you sign in with GitHub first. The CLI then stores a pitview login token on your laptop.
Only allow a request you started yourself: whoever you allow can share and read your team's work as you. The request expires after 10 minutes, and Don't allow ends it.
A server from before this sign-in existed asks you to enter a code on a GitHub page instead.
- If this computer is already signed in to that server, it says so and does nothing.
pitview login --againsigns in anyway. - The server address is remembered. Later,
pitview loginalone signs in to the same server. - A login that isn't used for 90 days stops working. Run
pitview loginagain. - To sign out every machine, use Sign out all CLI logins in the dashboard's Settings.
pitview init
pitview init # every repository on this machine
pitview init --repo # only the repository you are in
Connects Claude Code, Cursor and Codex. Run it once per computer: it connects the tools for every repository, and which repositories are shared is decided by your teams' lists, not by init. See Your team's repositories. It adds pitview's hook entries and its MCP server to each tool's settings:
| Tool | Files |
|---|---|
| Claude Code | .claude/settings.json (hooks). The MCP server is registered with claude mcp add --scope user. |
| Cursor | .cursor/hooks.json, .cursor/mcp.json |
| Codex | .codex/hooks.json, .codex/config.toml |
Without --repo, these are the files in your home folder. With --repo, they are the ones in the repository.
What to know:
- It merges. Your other hooks and settings are left as they are.
- The first time it changes an existing file it saves a copy next to it ending in
.bak. - It is safe to run again. If nothing needs changing it says
Already set up. - A settings file that isn't valid JSON is left untouched, with a warning.
- The entries point at the exact
pitviewprogram you ran, by its full path. - Restart open agent sessions afterwards.
- Run inside a repository your team doesn't share yet, it asks whether to share your work in it, as
pitview team addwould. It only asks at a terminal; otherwise it says how.
With --repo, Claude Code's MCP server can't be registered automatically. Do it once with:
claude mcp add --scope local pitview -- "$(command -v pitview)" mcp
pitview status
pitview status
Checks, for the folder you are in:
- whether you are signed in, to which server, and which teams you are in
- whether each tool is connected, for all repositories or only this one
- when the last pitview session ran here, and whether it was private
Each line starts with ✓ (fine) or ✗ (needs attention, with the command to fix it).
pitview team
pitview team
Lists the teams you are in and says whether the repository you are in is shared, and with which team. The line is one of:
This repository (github.com/acme/app) is shared with Acme (listed by Acme).One of your teams lists it. If you chose the team, it saysyou choseinstead oflisted by.This repository (github.com/acme/app) is listed by more than one of your teams (Acme, Side project). Choose one: pitview team use <team name>Your work in this repository (github.com/acme/app) isn't shared yet: adel listed it for Acme. To share it, run: pitview team addA teammate listed it and you haven't said yes.This repository is not shared: none of your teams lists github.com/acme/app. To list it, run: pitview team add
Only a repository a team lists is shared. See Your team's repositories.
pitview team add
pitview team add
Lists the repository you are in with your team, so work in it is shared from now on. If you are in several teams, name one:
pitview team add Acme
It prints Your work in github.com/acme/app is now shared with Acme. Any member of the team can do this. It has the same effect as Add a repository in Settings. If a teammate already listed the repository (in a fork, any of its remotes), it is your yes to sharing your work there instead of a new listing; teammates are asked before their own work in a repository you list is shared.
pitview team remove
pitview team remove
pitview team remove Acme
Takes the repository you are in off the team's list: Removed github.com/acme/app from Acme: work in it is no longer shared. Only the team's owner, or whoever added the repository, can do this. Sessions already shared are kept but hidden from teammates, and the people who did the work still see their own. Adding the repository again brings them back. The owner can delete them with Remove… in Settings, which has a box for that.
pitview team use
If more than one of your teams lists a repository and you haven't chosen, nothing from it is shared until you choose:
pitview team use Side project
The name is the team's name as the dashboard shows it. Upper and lower case don't matter, and a name with spaces needs no quotes. You can only choose a team that lists the repository. The choice covers this repository only, applies to sessions that start afterwards (a session already running stays where it started), and is yours alone: it doesn't move a teammate's work.
pitview team use --clear
Removes your choice for this repository. See More than one team.
pitview private
pitview private
Stops sharing the most recent session in this repository and deletes what it already shared. Sharing stops on your laptop immediately. If the server can't be reached, the delete request is saved and retried until it succeeds; the command tells you which happened.
You can also say "keep this session private" to your agent.
pitview check
pitview check
Test-merges your committed HEAD with the pushed branch of each teammate who has a live session in this repository, and reports the files that would conflict. It uses git fetch and git merge-tree: nothing is checked out and none of your branches move.
It catches what file-overlap warnings can't: branches that started from different points, or changes to different files that still don't merge.
Limits: uncommitted work on either side is not included, and a teammate's branch must be pushed.
pitview hook and pitview mcp
pitview hook <tool> <event> is what the tools' hook entries run. It reads the tool's event from standard input, reports to the server, and prints the tool's expected reply. It always exits successfully: if anything goes wrong, the tool sees an empty reply and carries on.
pitview mcp runs the MCP server that gives agents the pitview tools. See What your agent sees and does.
A repository's .pitview.json
Optional, at the repository root:
{ "neverShare": ["secrets/**", "**/*.env"], "neverShareBranches": ["private/*"] }
Matching files are never reported, and sessions on matching branches are private. The file is read on your laptop only. See Privacy and data.
Files on your laptop
Everything the CLI keeps is in ~/.config/pitview (or the folder named by PITVIEW_HOME):
| File | What it holds |
|---|---|
credentials.json | the server address and your login token, readable only by you |
sessions/ | one small file per session: its tool, folder, whether it is private |
policy.json | the never-share patterns from the server, so they apply offline |
queue.jsonl | reports that couldn't be sent yet |
When the server can't be reached
- Hooks wait at most 1 second, then let the agent carry on.
- Reports of edits, turn ends and session ends are added to the queue and resent on a later hook call. Queued reports older than 24 hours are dropped.
- A queued
pitview privaterequest never expires and is sent before anything else. - The agent's tools reply
pitview is unreachable right now.
Environment variables
| Variable | Effect |
|---|---|
PITVIEW_SERVER | use this server address instead of the remembered one. Your login is only sent to the server you logged in to, so run pitview login against it first |
PITVIEW_HOME | keep the CLI's files here instead of ~/.config/pitview |
PITVIEW_INSTALL_DIR | where the installer puts the program |
PITVIEW_NO_NOTIFY=1 | no desktop notifications (Cursor) |
PITVIEW_GITHUB_CLIENT_ID | sign in with this GitHub app instead of the one the server names |