Skip to main content

jupyter-aiterminal

AI Terminal for JupyterLab. Mixed AI and Command cells in a notebook-like workspace, saved as .agentnb files.

What it does

  • AI cells send natural language to the Claude Agent SDK on the Jupyter server (Read / Write / Edit / Bash / Glob / Grep). Markdown in the reply is rendered.
  • Command cells run non-interactive bash with a persistent cwd and streaming output.
  • New workspaces appear in the file browser as Untitled.agentnb. Content autosaves. Closing the tab closes the document; a full Jupyter refresh only restores tabs that were still open.

It does not include a classic SSH terminal or interactive TUI (vim / ssh / full-screen apps).

Security warning

This extension gives the AI agent and every Command cell the ability to run arbitrary commands as the Jupyter server user. Treat access to it as equivalent to a shell on that machine.

  • The agent runs with permission_mode: bypassPermissions and holds Read, Write, Edit, Bash, Glob, and Grep. There is no per-command confirmation prompt.
  • Command cells execute arbitrary bash in a long-lived shell, as the user running Jupyter.
  • policy.py blocks apt/yum/dnf and curl | sh style installs. That is a guardrail against careless damage, not a sandbox — it does not constrain what the agent can do.
  • Any user who can authenticate to the Jupyter server can reach this extension.

Recommended precautions:

  • Never expose a Jupyter server running this extension to an untrusted network, and do not share an instance with people you would not give a shell.
  • Run it inside a container or VM you are willing to lose.
  • Keep Jupyter's own authentication enabled.

Requirements

  • Python 3.10+
  • JupyterLab 4.5 (4.x <5)
  • claude-agent-sdk
  • A claude CLI on the Jupyter server PATH
  • An Anthropic-compatible API (official Anthropic or a local relay)

Install

pip

pip install jupyter-aiterminal

Restart JupyterLab after install.

git

pip install "git+https://github.com/wangyusheng1985/jupyter-plugin-aiterminal.git"

from a local clone

git clone https://github.com/wangyusheng1985/jupyter-plugin-aiterminal.git
cd jupyter-plugin-aiterminal
pip install .

Uninstall:

pip uninstall jupyter-aiterminal

Configure

Open Settings → AI Terminal and set:

Setting Meaning
Base URL Anthropic-compatible API root, e.g. https://api.anthropic.com or a relay
Model Model id passed to the Agent SDK
API Token API key / token

All three are required. Empty values produce a config error that points back to Settings. Changing them takes effect the next time you open AI Terminal (a new WebSocket).

The token is stored in JupyterLab user settings on the server (~/.jupyter/lab/user-settings/jupyter-aiterminal/) and is visible in the Settings UI. Do not commit that file. The Agent WebSocket does not send the token to the browser.

Use

  1. Create an AI Terminal workspace with either entry point:
    • Open the Launcher → Other → AI Terminal to create it in the current file-browser directory.
    • In the left file browser, right-click a folder and choose AI Terminal to create it inside that folder. Right-clicking a file or blank listing space creates it in the current directory.
  2. A collision-safe Untitled.agentnb file is created and opened automatically.
  3. Type in a cell. Double-click the prompt (or use the toolbar) to switch AI / Command.
  4. Run with Shift+Enter (run and advance) or the toolbar Run button.
  5. Select text in a cell to show a copy icon at the pointer; click it to copy. Cmd/Ctrl+C / V / X / A work as usual. In command mode, dd deletes the cell.

Command cells share one bash session per tab, so cd persists. AI cells use the server-side Agent SDK, not that bash session.

Develop

jlpm install
jlpm test
jlpm typecheck
jlpm eslint
pytest
python -m build

License

BSD-3-Clause

Metadata

Release files for jupyter-aiterminal 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupyter-aiterminal 0.7.1
File Size Uploaded Provenance Actions
jupyter_aiterminal-0.7.1.tar.gz 418.9 kB With provenance Details for jupyter_aiterminal-0.7.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jupyter-aiterminal 0.7.1
File Interpreter ABI Platform Actions
jupyter_aiterminal-0.7.1-py3-none-any.whl Python 3 none any Details for jupyter_aiterminal-0.7.1-py3-none-any.whl

Total release size: 484.6 kB

Release files / jupyter_aiterminal-0.7.1.tar.gz

Download URL jupyter_aiterminal-0.7.1.tar.gz
Size 418.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ccde59d86ffc90a177a39719cb9b16616dd0f0814f85831eae127717aa908e1f
BLAKE2b-256 checksum
How to use checksums
01bffad9faf87db1c62f7fb972848fdab9bb6c415ee2b23fdbdb755ebb253a93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / jupyter_aiterminal-0.7.1-py3-none-any.whl

Download URL jupyter_aiterminal-0.7.1-py3-none-any.whl
Size 65.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39901239c5d396362237262313c5019381112b9149c25b684e183af71d36f351
BLAKE2b-256 checksum
How to use checksums
22c735b9c536c0b43125fea02b6c73c33551f55aff66607ccd462951939fff6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Security for jupyter-aiterminal 0.7.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jupyter_aiterminal-0.7.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page