Fast Jupyter notebook management tool (Rust rewrite)
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jtool-0.2.0-py3-none-win_amd64.whl.
File metadata
- Download URL: jtool-0.2.0-py3-none-win_amd64.whl
- Upload date:
- Size: 4.9 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5e31cbdb330cf45e8d56999a582140b85ea5a1d3525a1ecabdda94f51f0fbf2
|
|
| MD5 |
30f0b7a1ac9df7045cc6495af1af7f53
|
|
| BLAKE2b-256 |
93a0cbc0c52e10e48af0a1ecebec4b98a477e673f8d1e4ca2c2486f0574ba5b7
|
File details
Details for the file jtool-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: jtool-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 5.2 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1af6b34a3f96a3e401f7d6244b6cd7193977eeef005a6d866c6b762248c3a31
|
|
| MD5 |
e71ea1e7d58ed70733d08332305269b4
|
|
| BLAKE2b-256 |
6c01a15f3e37c9ee8f79721bf2889ece31a6be3cefc95ac56fe33214a605d9c0
|
File details
Details for the file jtool-0.2.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: jtool-0.2.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 4.8 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3913915131bc747a69508ac6039276fdddfd77f5e32b5c50ff37778d1fe84d1
|
|
| MD5 |
7228623989f07ee2a4b046de0ff2f8f4
|
|
| BLAKE2b-256 |
21b2f2ae0c4103a4807eb6cb5eaff03c95d9fc67fa9d37acce810521b7019ca2
|