This release is a pre-release and may not be stable for production use.
Zbook
Zbook is a fast, keyboard-first notebook for local work. It keeps the useful core of Jupyter—.ipynb files, IPython kernels, code and Markdown cells, rich outputs, and a workspace tree—inside a deliberately small interface with first-class uv and Codex integration.
Codex runs through the locally installed Codex CLI. It can use your existing CLI login and subscription; Zbook does not require a separate API key.
What is included
- A compact React and CodeMirror notebook editor with Python highlighting, Markdown rendering, multiple tabs, cell reordering, collapsible outputs,
#@titlecell headings, and optional Vim bindings. - A workspace-scoped file tree with create, rename, upload, delete, refresh, and external-change protection.
- One IPython kernel per open notebook, launched from a selectable
uvenvironment. - Live Jupyter widgets, including interactive Matplotlib figures through
ipympl. - Live package installation and removal without coupling the notebook environment to Zbook's own runtime.
- A persistent Codex panel with model and effort controls, account status, thread history, selected-line context, and direct notebook cell tools.
- Reviewable Codex edits: streamed red/green proposals stay separate from accepted notebook content until you apply, apply and run, or reject them.
Zbook intentionally does not include terminals, debuggers, dashboards, extension marketplaces, multi-user collaboration, or the rest of the JupyterLab surface area. It is a local, AI-guided notebook rather than a general IDE.
Quick start
Zbook requires Python 3.11 or newer and uv. Codex CLI is optional, but required for the assistant panel.
Install Zbook as an isolated tool:
uv tool install zbook
zbook check
Start it in the current directory:
zbook run
Or choose a workspace explicitly:
zbook run --workspace-dir /path/to/project
Zbook uses Jupyter's token authentication and normally opens a URL such as http://localhost:8888/zbook/?token=.... Common bind options are first-class:
zbook run --ip 127.0.0.1 --port 8890
Pass other Jupyter Server arguments after --:
zbook run --workspace-dir . -- --ServerApp.log_level=DEBUG
If the separator is omitted, Zbook warns and passes unknown arguments through for that launch. Prefer the explicit form so that a misspelled Zbook option cannot silently become a Jupyter option.
[!WARNING] Keep the default loopback address unless you intend to serve remote clients. A client that authenticates to Zbook can run notebook code, access the configured workspace, and invoke Codex. If you bind to
0.0.0.0, preserve Jupyter authentication and use a trusted network or SSH port forwarding.
Python environments
Zbook chooses the notebook environment in this order:
- An explicitly supplied
--ZbookApp.venv. - A usable
.venvin the workspace. - A temporary
uvenvironment under the platform temporary directory, removed when Zbook exits.
To choose an environment at launch, use the Jupyter passthrough:
zbook run -- --ZbookApp.venv=/path/to/project/.venv
The environment control at the bottom of the workspace pane can switch among detected uv environments, accept a path, and install or uninstall packages live. Each notebook owns its kernel, so changing tabs does not accidentally reuse another notebook's execution state.
Interactive controls use the standard Jupyter widget protocol. Core ipywidgets controls work when ipywidgets is installed in the selected environment. For a draggable Matplotlib figure or matplotlib.widgets.Slider, install ipympl in that environment and select the widget backend before creating the figure:
%matplotlib widget
import matplotlib.pyplot as plt
The normal inline backend intentionally remains static: creating a Slider while it is active produces a zoomable PNG, not an interactive canvas. Zbook bundles the core Jupyter controls and the matching ipympl frontend; outputs from other third-party widget libraries report a clear unsupported-module message instead of loading arbitrary JavaScript from the network.
Notebook workflow
The editor saves ordinary changes automatically and also exposes an explicit Save action. Dirty documents have local recovery snapshots. If a notebook changes on disk after it was opened, Zbook reports Changed on disk and will not overwrite the newer file without an explicit reload.
Navigation mode keeps common work off the mouse:
j/kor the arrow keys move between cells.Enteroriedits the selected cell.aoroinserts a code cell after the selection;Shift-Oinserts before it.dd, completed within 500 ms, deletes the selected cell.uundoes a structural edit; with Vim enabled,Ctrl-Rredoes it.cfocuses the Codex prompt.Escapereturns to the selected notebook cell after dismissing any open Codex popup.Ctrl-Enterruns in place,Shift-Enterruns and advances, andAlt-Enterruns and inserts.Ctrl/Cmd-Popens files;Shift-Ctrl/Cmd-Popens app commands;Ctrl/Cmd-Ssaves.
Vim bindings are opt-in from the lower-left status bar. The preference is stored in browser-local storage rather than a user configuration file. With Vim enabled, the editor has three layers: cell navigation, Vim normal, and Vim insert. Escape steps back one layer at a time.
Codex workflow
Codex is launched as an App Server subprocess in the workspace. Zbook supplies a short notebook-tool preamble and exposes cell reads, turn-scoped locks, proposal edits, structural edits, and capability discovery. The bridge uses a private authenticated WebSocket; filesystem or network operations outside Codex's granted scope still follow the CLI approval flow.
Source edits and newly created cells are proposals rather than immediate notebook writes. Codex locks relevant cells for the turn and streams small hunks into a read-only diff. Removed lines are red, inserted lines are green, and the accepted cell and its existing outputs remain unchanged.
When the turn ends, each proposal offers Apply, Apply & Run for code cells, and Reject. Review next moves through outstanding proposals in notebook order. Proposals survive a browser or app restart in IndexedDB; if the underlying notebook has changed, they become conflicted instead of overwriting newer content.
Deletion, type changes, and reordering use the atomic structural tool and retain an undo banner. Notebook reads return requested source once as compact numbered text (1|exact source) so Codex can address lines without receiving redundant notebook content.
Select one or more lines in a cell to reveal Ask Codex in the cell gutter. The selection appears as a removable, immutable quote above the prompt and is bounded before transmission.
Support and compatibility
Zbook's supported runtime, stable interfaces, security boundary, and intentionally unsupported features are documented in the support policy. Bugs and focused feature proposals are welcome in GitHub Issues.
Development
Development requires Python 3.11 or newer, uv, and Node.js 20.19 or newer. Codex CLI is only needed when testing the assistant integration.
git clone git@github.com:honglu2875/zbook.git
cd zbook
git switch -c my-change
uv sync --locked --dev
cd frontend
npm ci
npm run build
cd ..
The frontend build writes directly to src/zbook/static/, which is what the Python package serves. Commit those generated assets whenever frontend source changes. Run the checkout with:
uv run zbook check
uv run zbook run --workspace-dir /path/to/workspace
The local and CI verification commands are:
uv run ruff check .
uv run pytest -q
cd frontend
npm test
npm run build
npx playwright install chromium # first browser-test run only
npm run test:e2e
The Playwright suite uses one Chromium worker and a disposable workspace with a real Jupyter Server and IPython kernel. CI intentionally keeps one job and no browser or Python matrix so it remains useful on GitHub's free tier.
Architecture
React + CodeMirror 6
├─ Jupyter Contents API
├─ per-notebook Jupyter kernel WebSockets ── selected uv environment
├─ Zbook package API ── uv
└─ Zbook Codex WebSocket ── codex app-server (stdio JSONL)
└─ cell tools ── turn locks + persistent reviewable proposals
Jupyter Server ExtensionApp
├─ filesystem boundary: configured workspace
├─ kernel executable: selected environment's Python
└─ bundled production frontend
Python owns processes, filesystem boundaries, and Jupyter integration. TypeScript owns notebook interaction state and rendering. The notebook environment is deliberately separate from Zbook's environment so package changes cannot destabilize the server.
Releasing
Releases are built and published by .github/workflows/release.yml through PyPI Trusted Publishing. The PyPI publisher must match the honglu2875/zbook repository, the release.yml workflow, and the pypi GitHub environment.
For a release, move the entries in the changelog under the new version, update the sole package-version source, commit, and push the matching annotated tag:
uv version 1.0.0rc1
git add pyproject.toml uv.lock CHANGELOG.md
git commit -m "Release 1.0.0rc1"
git tag -a v1.0.0rc1 -m "zbook 1.0.0rc1"
git push origin main v1.0.0rc1
The release workflow verifies that tag and package versions match, rebuilds and compares the committed web client, runs tests, smoke-tests both distribution formats in isolated environments, and grants the publishing credential only to the final PyPI job. Published versions cannot be replaced.
License
Zbook is released under the MIT License. The bundled Inter and JetBrains Mono fonts remain under the SIL Open Font License 1.1; their notices ship with the frontend.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 zbook-1.0.0rc1.tar.gz.
File metadata
- Download URL: zbook-1.0.0rc1.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3632ca80556642174cd2b15c7a929f2bb6b3a650a7eb6b8daf0c083f19e71b3c
|
|
| MD5 |
0b8a3d6ce2d09d3962488c2fde7b44dc
|
|
| BLAKE2b-256 |
0086e93e6d041554f8755e8d3288c4f61cc5a641e23bc4ae0c1c901ebe7f2e46
|
Provenance
The following attestation bundles were made for zbook-1.0.0rc1.tar.gz:
Publisher:
release.yml on honglu2875/zbook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zbook-1.0.0rc1.tar.gz -
Subject digest:
3632ca80556642174cd2b15c7a929f2bb6b3a650a7eb6b8daf0c083f19e71b3c - Sigstore transparency entry: 2576444304
- Sigstore integration time:
-
Permalink:
honglu2875/zbook@e5a0f4c38a75f1dc354b13dc08ab303e0fcfee86 -
Branch / Tag:
refs/tags/v1.0.0rc1 - Owner: https://github.com/honglu2875
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e5a0f4c38a75f1dc354b13dc08ab303e0fcfee86 -
Trigger Event:
push
-
Statement type:
File details
Details for the file zbook-1.0.0rc1-py3-none-any.whl.
File metadata
- Download URL: zbook-1.0.0rc1-py3-none-any.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9e5e279caf7fa40dde18e6f640719c7847a390a7115451aba5f7cc51bcf24df
|
|
| MD5 |
a22acecb8a9debf98a1137be446f480c
|
|
| BLAKE2b-256 |
c00fd4e9e5203a41cf0fbf5d614dccea204c59572f0f9d4a40e046d7f188ec9f
|
Provenance
The following attestation bundles were made for zbook-1.0.0rc1-py3-none-any.whl:
Publisher:
release.yml on honglu2875/zbook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zbook-1.0.0rc1-py3-none-any.whl -
Subject digest:
b9e5e279caf7fa40dde18e6f640719c7847a390a7115451aba5f7cc51bcf24df - Sigstore transparency entry: 2576444532
- Sigstore integration time:
-
Permalink:
honglu2875/zbook@e5a0f4c38a75f1dc354b13dc08ab303e0fcfee86 -
Branch / Tag:
refs/tags/v1.0.0rc1 - Owner: https://github.com/honglu2875
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e5a0f4c38a75f1dc354b13dc08ab303e0fcfee86 -
Trigger Event:
push
-
Statement type: