jtool 🧃
jtool is a tool for humans and LLM agents to interact with Juypyter notebooks and servers.
Features:
jtoolenables any operation in the Jupyter GUI to be performed using ajtoolcli commandjtoolenables LLM agents to read, write, and analyze jupyter notebooks (see usage by LLM agents)jtoolenables notebook-specific grep to search through notebooks' code, outputs, and markdownjtoolenables easy memory usage tracking of each Jupyter server, notebook, and variable
Installation
jtool is built in Rust but can be installed via cargo, uv, or pip
cargo install jtool
uv tool install jtool
pip install jtool
Alternatively, can just use uvx run jtool to run jtool without worrying about whether it has been installed.
Example Usage
# List Jupyter servers
jtool servers
# Execute notebook cells
jtool execute-cells notebook.ipynb
# Read cells
jtool read-cells notebook.ipynb 0:5
# Edit cells
jtool edit-cell notebook.ipynb 3 --content "print('hello')"
# Show help
jtool --help
Usage by LLM Agents
jtool is designed with LLM usage in mind
Compared to MCP-based solutions, CLI tools like jtool are more token-efficient, more composable, and have lower operational complexity. jtool is also fast and robust thanks to being written in rust.
Token Efficiency
--max-output-lines N- prevents output explosion from large cell outputs--fields- selective field extraction (only get what you need)--inputs-only/--outputs-only- filter noise--compactmodes for summaries
Composability
- CLI tools are much more composable than MCP servers
- calls to
jtoolcan be chained together in scripts or complex bash calls
Code Search and Understanding
jtool grep <regex>: finds code patterns across notebooksjtool errors: print failures without re-executionjtool imports: discover dependencies- summary - get quick notebook overview
Safe Execution Controls
--timeout SECONDS- prevent infinite loops--max-output-lines- limit output size- Cell-level granularity (execute specific cells, not whole notebook)
--streamfor real-time feedback
Documentation for LLM's
- See
agents/AGENTS.mdfor a general prompt for teaching LLM agents to usejtool. - See
agents/claude_skillsfor usage ofjtooldocumented as Claude skills. - See
agents/promptsfor example prompts for usingjtool.
Syntax
jtool can use special syntax to reference servers, notebooks, and cells.
Server References
Reference servers by full URL or port:
http://localhost:8888 # Full URL
8888 # Port only (implies localhost)
Notebook References
Multiple ways to reference notebooks:
path/to/notebook.ipynb # Full path with .ipynb
path/to/notebook # Path without .ipynb extension
notebook # Notebook name only (searches current directory)
8888:notebook # Server:notebook (by port)
8888:path/to/notebook # Server:path (by port)
@ # Most recently used/modified notebook
Cell References
Reference cells by index (0-based) or execution count:
# Single cell
3 # Cell at index 3
_5 # Cell with execution count 5
# Cell ranges (inclusive)
: # All cells
:5 # From start to index 5
10: # From index 10 to end
3:8 # From index 3 to 8
-3: # Last 3 cells to end
:-5 # From start to 5th from end
-10:-5 # From 10th from end to 5th from end
# Execution count ranges
_1:_10 # From execution count 1 to 10
_5: # From execution count 5 onwards
:_20 # Up to execution count 20
Common Options
Many commands support these options for output control:
--json # Output as JSON
--csv # Output as CSV
--fields field1,field2 # Select specific fields
--head N # Limit to first N items
--max-output-lines N # Limit cell output lines
--inputs-only # Show only cell inputs
--outputs-only # Show only cell outputs
--compact # Compact summary format
Command Reference
Server Management
servers- List all running Jupyter serversadd-server- Add manual server configurationkernels- List running kernelssessions- List active sessionsread-config- Read server configurationedit-config- Edit server configuration
Execution
execute-cells- Execute notebook cellsexecute-code- Execute code in a kernelkill- Kill a Jupyter serverrestart- Restart a kernelinterrupt- Interrupt a running kernel
Inspection
read-cells- Read cells from notebookinfo- Show notebook infosummary- Show comprehensive summaryerrors- Display error tracebacks
Editing
edit-cell- Edit cell contentinsert-cell- Insert new celldelete-cells- Delete cellsreorder-cells- Move cellstransfer-cells- Copy/move between notebooksclear-output- Clear cell outputs
Metadata
Release files for jtool 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jtool-0.2.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| jtool-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| jtool-0.2.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
Total release size: 14.9 MB
Release files / jtool-0.2.0-py3-none-win_amd64.whl
| Download URL | jtool-0.2.0-py3-none-win_amd64.whl |
|---|---|
| Size | 4.9 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a5e31cbdb330cf45e8d56999a582140b85ea5a1d3525a1ecabdda94f51f0fbf2
|
|
BLAKE2b-256 checksum How to use checksums |
93a0cbc0c52e10e48af0a1ecebec4b98a477e673f8d1e4ca2c2486f0574ba5b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.10.1
|
Release files / jtool-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | jtool-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 5.2 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
f1af6b34a3f96a3e401f7d6244b6cd7193977eeef005a6d866c6b762248c3a31
|
|
BLAKE2b-256 checksum How to use checksums |
6c01a15f3e37c9ee8f79721bf2889ece31a6be3cefc95ac56fe33214a605d9c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.10.1
|
Release files / jtool-0.2.0-py3-none-macosx_11_0_arm64.whl
| Download URL | jtool-0.2.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.8 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a3913915131bc747a69508ac6039276fdddfd77f5e32b5c50ff37778d1fe84d1
|
|
BLAKE2b-256 checksum How to use checksums |
21b2f2ae0c4103a4807eb6cb5eaff03c95d9fc67fa9d37acce810521b7019ca2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.10.1
|
Security for jtool 0.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.