PyNote
JupyterLab 4 · Notebook 7

PyNote

Claude, docked into your Jupyter sidebar.

Talk to Claude about the notebook you're actually working on. When it proposes a code change, type apply — the cell updates in place. No dialog, no tab juggling, no key pasted into the browser.

$pip install jupyter-pynote
View source on GitHub →
PyNoteexploration.ipynb
user
Plot the last column against the index.
assistant
I'll use matplotlib and pull the last column off the DataFrame you imported in cell 2.
Add a plot cell after cell 2
insert after cell 74a1…
import matplotlib.pyplot as plt
plt.plot(df.index, df.iloc[:, -1])
plt.show()
Type apply to accept, cancel to discard.
user
apply
✅ Applied 1 change
Ask Claude about the notebook…
Send

Structured edits

Claude uses tool-use to emit edits against stable cell ids, not brittle indices. Apply is a single atomic transaction — one undo reverts the whole batch.

Key stays server-side

Your Anthropic key lives in your Jupyter process. Never pasted into a form, never stored in Lab settings, never bundled into the pip package.

No dialogs

Confirm or cancel by typing in chat. The panel shows a compact preview and waits. No popups interrupting your flow.

1Install

Add it to your existing Jupyter

PyNote is a regular pip package. It includes the Python server extension and the pre-built JupyterLab / Notebook 7 frontend. No Node required, no jupyter labextension install.

$pip install jupyter-pynote

Works with JupyterLab 4+ and Notebook 7+. Python 3.9+.

2Configure

Your key stays on your machine

PyNote reads your Anthropic key from the Jupyter server process. It is never typed into the browser, never stored in Lab settings, never sent anywhere except Anthropic's API. Pick one of the two options below.

One line in ~/.pynote/.env

Recommended

Persistent across shells. PyNote auto-loads this file at startup.

$mkdir -p ~/.pynoteecho 'ANTHROPIC_API_KEY=sk-ant-...' > ~/.pynote/.envchmod 600 ~/.pynote/.env

Export in your shell

If you prefer ~/.zshrc, direnv, or per-venv activation scripts.

$export ANTHROPIC_API_KEY=sk-ant-...

Get a key from console.anthropic.com/settings/keys. PyNote bills to your own Anthropic account — there is no middleman.

3Use

Launch and open the sidebar

Start Jupyter as you normally would.

$jupyter lab
  • Click the PyNote tab in the right sidebar, or press Cmd+Shift+C and run Open PyNote panel.
  • Ask Claude anything about the current notebook. It sees every cell's source (not outputs) as context.
  • When Claude proposes edits, type apply to accept, cancel to discard, or keep chatting to iterate.

What leaves your machine?

Sent to Anthropic

  • Each cell's source and stable id (the context Claude needs).
  • Your chat messages.

Never sent anywhere

  • Cell outputs — plots, stdout, runtime errors stay local.
  • The notebook file itself. Only in-memory cell sources.
  • Your API key. Only ever sent to Anthropic as an auth header.