# Pine docs

Pine lets everyone who works on the same GitHub repo see each other's AI coding sessions (Claude Code and Codex), live.

The rule is simple: **if you can read the repo on GitHub, you can see its sessions.** There are no separate teams or invites to manage. GitHub already knows who's on the project.

## 1. Set up your GitHub org (once, by an admin)

Install the **Pine MD** GitHub App on your org: [github.com/apps/pine-md](https://github.com/apps/pine-md). Pick all repos, or just the ones you want.

Pine only reads repo names and who has access. It never reads your code.

## 2. Install (everyone)

macOS and Linux:

```bash
curl -fsSL https://usepine.dev/install | bash
```

This installs `pine` and its short name `pn` into `~/.local/bin`, and turns on background sync. No sudo.

## 3. Log in with GitHub

```bash
pn login
```

A browser tab opens on github.com. Approve the code shown in your terminal and you're done.

## 4. Work like you normally do

Go into your clone of the repo and start your agent through Pine:

```bash
cd your-repo
pn          # Claude Code
pn codex    # Codex
```

That's it. The conversation shows up at [app.usepine.dev](https://app.usepine.dev) for everyone who can read the repo, as it happens.

What gets shared: your messages, the agent's replies, and a one-line summary of each tool call. Everything is also recorded on your own machine in `~/.pine/sessions`.

**Desktop apps, or plain `claude` / `codex`?** Those are shared too. The installer turns on background sync, so sessions from the Claude and Codex desktop apps show up within a few seconds. It starts by itself every time you log in, runs as you, and needs no sudo.

```bash
pn watch status        # is it running?
pn watch --uninstall   # turn it off (updates leave it off)
pn watch --install     # turn it back on
```

## 5. Hand a session to a teammate

Save the moment with a name:

```bash
pn checkpoint "login-fixed" -m "tests pass"
```

Your teammate runs this inside their clone of the same repo:

```bash
pn pull login-fixed
```

It prints one command that opens the conversation in their own Claude Code, so they continue where you stopped.

## 6. Switch between Codex and Claude Code

Inside the repo, run one of these:

```bash
pn handoff claude    # a Codex session → continue it in Claude Code
pn handoff codex     # a Claude Code session → continue it in Codex
```

Pick a session from the list (Enter picks the newest). It opens in the other agent with the whole conversation, ready to continue. It also shows up in `claude --resume` / `codex resume` and the desktop apps.

## Who can see what

- **Your sessions:** you always see them.
- **A teammate's session:** you see it if you can read its repo on GitHub right now. Lose repo access and you lose the sessions too.
- **Outside a GitHub repo:** sessions stay private to you.
- **Private, archive, delete:** open your session on app.usepine.dev and use the `⋯` menu. Private means only you see it. Delete removes it from Pine for everyone.

## Pause sharing

```bash
pn sync pause     # stop uploading
pn sync resume    # start again
pn whoami         # check what's happening
```

Only sessions started after `pn login` are shared. To share older ones too, run `pn sync --all` once. Recording on your machine keeps going either way.

## All commands

| Command | What it does |
|---|---|
| `pn` | Run Claude Code through Pine |
| `pn codex` | Run Codex through Pine |
| `pn login` / `pn logout` | Sign in or out with GitHub |
| `pn whoami` | Who you are and whether sharing is on |
| `pn checkpoint "name"` | Save this moment of the conversation |
| `pn checkpoints` | List your team's checkpoints |
| `pn pull <name>` | Continue a teammate's checkpoint here |
| `pn handoff claude` / `pn handoff codex` | Continue a session in the other agent |
| `pn open` | Open your latest session in the browser |
| `pn watch --install` | Turn background sharing back on (desktop apps included) |
| `pn sync --all` | Share older sessions too, once |
| `pn sync pause` / `pn sync resume` | Stop or restart sharing |
| `pn update` | Update to the latest version |

## Update or uninstall

```bash
pn update                                     # update
rm ~/.local/bin/pine ~/.local/bin/pn          # uninstall
```

## Help

Book a call: [cal.com/dheerajpai](https://cal.com/dheerajpai) · Source: [github.com/Leanmcp-Community/pine](https://github.com/Leanmcp-Community/pine)
