# Use the Pactto CLI and create an API key

> The Pactto CLI lets Claude Code, Codex, scripts, and CI read and update your rooms from the terminal; create an API key in Account settings under API keys (CLI) (Pro plan), then follow the setup at pactto.com/cli.

Category: AI and integrations
Web page: https://www.pactto.com/help/pactto-cli
All guides: https://www.pactto.com/help.md

## What the Pactto CLI is

The Pactto CLI (`pactto`) gives coding agents such as Claude Code and Codex, and your own scripts, access to your Pactto rooms: transcripts, PDFs, docs, comments, and the canvas. With a write key it can also add notes, comments, and other items to the canvas. It signs in with an API key that you create in Pactto. Creating keys needs the **Pro** plan.

Full setup, commands, and example prompts: https://www.pactto.com/cli

## Create an API key

1. In Pactto, open your account menu (your avatar) and go to **API keys (CLI)**. You can also go straight to https://live.pactto.com/settings/api-keys.
2. Click **Create API key** (or **Create your first API key**).
3. Give it a name, for example the computer or tool that will use it.
4. Choose a scope:
   - **Read**: read transcriptions, PDFs, participants, and the canvas. Cannot change anything.
   - **Write**: read access plus changes to the canvas, such as creating notes, text, shapes, arrows, and comments, and moving, resizing, deleting, aligning, and distributing items.
5. Under allowed rooms, keep **All rooms** or pick **Specific rooms**.
6. Choose when it expires: 7 days, 30 days, 90 days, **Never**, or **Custom**.
7. Click **Create**.
8. Copy the token with **Copy**. It is shown only once. Tick **I have copied the token and stored it securely.** and click **Close**.

Then install the CLI and log in with the key as described at https://www.pactto.com/cli.

## Revoke a key

1. Open **API keys (CLI)** in your account settings.
2. Click **Revoke** on the key, then **Yes, revoke**.

This cannot be undone. Any tool using that key loses access right away.

## Good to know

- Without Pro, you see **Create tokens with a Pro plan** and an **Upgrade to Pro** button. Keys you created earlier keep working and you can still revoke them.
- The list shows each key's scope, allowed rooms, creation date, last use, expiry, and status (active, expired, or revoked).
- If you lose a token, revoke it and create a new one. Pactto cannot show it again.
- A key only reaches rooms you belong to, and only what your role in each room allows.
- Prefer a chat assistant like Claude or ChatGPT instead of a terminal? Use the Pactto MCP server.

## Related guides

- [Connect Claude or ChatGPT to Pactto (MCP server)](https://www.pactto.com/help/connect-ai-assistant-mcp.md): Add the Pactto MCP server URL (https://live.pactto.com/mcp) to Claude, ChatGPT, or another assistant as a custom connector, sign in, and click Allow; it needs the Pro plan.
- [Use the AI assistant in a room](https://www.pactto.com/help/ai-assistant.md): Click the AI Assistant button (sparkle icon, bottom right of the room) or Ask AI on a selected item, then type or dictate a question or instruction; the assistant answers from the room's content and can create notes, docs, images, comments, and more on the canvas.
- [Read the transcript and live captions of a meeting](https://www.pactto.com/help/transcripts.md): Pactto transcribes what each person says while their microphone is on; open the Live captions panel (the CC button at the bottom right of the room) to read the transcript, translate it, or show captions on screen.
- [Leave feedback with comments](https://www.pactto.com/help/comments.md): Click the Comment tool (or press K), then click an item or an empty spot on the canvas, type your feedback, and press Enter to post it.
