Skip to content

Quickstart

Install the CLI, sign in, and start your first session.

When you create a new Polygraph account, we recommend going through the built-in demo experience. It showcases the product and helps you get familiar with its features before you point it at your own repos.

Install the CLI with npm:

Terminal window
npm install -g polygraph@latest

Or with Homebrew:

Terminal window
brew install nrwl/tap/polygraph

Start with the interactive CLI. It guides you through sign-in, account selection, and session setup.

Terminal window
polygraph

Polygraph indexes every repo you have access to and stitches them into one graph. Your agent works against that graph instead of one repo at a time.

After sign-in, confirm the effective account before starting a session.

Terminal window
polygraph whoami

If you want to run the sign-in flow directly, use the auth command.

Terminal window
polygraph auth login

Polygraph uses an OAuth device flow for CLI sign-in. The CLI opens or prints a browser approval URL and code:

> polygraph auth login
* *
\ /
* ------ * - * Polygraph
/ \
* *
Opening your browser to authorize Polygraph CLI...
If your browser does not open, visit:
https://app.trypolygraph.com/profile/oauth?user_code=XXXX-YYYY
Code: XXXX-YYYY

Compare the code in your terminal with the code shown in the browser, then approve the request while signed in to Polygraph.

Work happens in sessions. Start one by running the CLI:

Terminal window
polygraph session start

Or by invoking the Polygraph skill within your existing agent session:

/polygraph create a session and add all repos that depend on this one

Pick the repos up front, or describe the task and let Polygraph find them. The list is just a starting point — it can grow as the work crosses repo boundaries.

A session isn't locked to the repos you started with. Prompt the agent to pull in another repo:

Please add vitejs/vite repo to this session.

Whatever you can read, your agent can read: any repo you have access to (organization or open source).

Terminal window
polygraph session list

Show details such as URL, folder, and status for a session.

Terminal window
polygraph session show <session-id>

Pick a workflow that matches what you want to do.