Codebind
Codebind is an IPython extension that runs a model with one tool: an IPython cell executed in the active session. IPython owns execution, namespace, history, magics, tracebacks, and rich display; Codebind owns only conversation and model orchestration.
Installation
Run Codebind without installing it permanently:
uvx codebind
Or install it with any Python package installer:
pip install codebind
After installation, start ordinary IPython with the Codebind extension from any directory:
codebind
It opens standard IPython with chat, models, and Models in the user namespace. models loads provider values from $XDG_CONFIG_HOME/codebind/models.json, or ~/.config/codebind/models.json when XDG_CONFIG_HOME is unset. Keep that credential file readable only by its owner. All normal IPython command-line options remain available.
chat.send(
"Inspect this project and tell me what to implement first.",
models.chat("openai/gpt-5", reasoning_effort="medium"),
)
Codebind does not load files or construct a project prompt automatically. The user states what should be loaded as context. Pass instructions= to Session only when an application needs its own system instructions.
Jupyter
Start JupyterLab with Codebind from any directory without a permanent installation:
uvx --from jupyterlab --with codebind --with 'nbconvert[webpdf]' jupyter lab
Or install both packages into the same environment, then start JupyterLab normally:
pip install codebind jupyterlab
jupyter lab
Load Codebind in a notebook:
%load_ext codebind
Run that cell once so JupyterLab can connect to the extension, then use Codebind in later cells:
model = models.chat("openai/gpt-5")
await chat.asend("Inspect the current notebook state.", model)
After assigning model, click Question in the notebook toolbar to insert a Question cell. Write ordinary Markdown and press Shift+Enter; Codebind sends the cell through chat using the model variable, renders the question as Markdown, and inserts tool executions and the assistant response beneath it. Question cells are stored as standard Markdown cells with Codebind metadata, so other notebook frontends can still read them.
The Codebind package includes a prebuilt JupyterLab extension. In JupyterLab, each model-authored IPython execution becomes a genuine code cell with its native execution count and outputs, and the assistant response becomes a rendered Markdown cell. The cells are ordinary notebook content and are saved with the notebook.
Other IPython frontends use the standard MIME display protocol instead. They still receive syntax-highlighted code, assistant Markdown, stdout, tracebacks, rich results, and native IPython history without Codebind depending on their UI.
ChatGPT account login
Models Provider can start its OpenAI browser sign-in flow directly from IPython:
import webbrowser
models = Models()
authorization = await models.sign_in("openai")
webbrowser.open(authorization.url)
await authorization.complete()
chat.send(
"Inspect this project.",
models.chat("openai/gpt-5", authorization=authorization),
)
The authorization remains in memory for this session. Save provider values as a JSON object in Codebind's XDG configuration file and reload the extension to expose them through models.
OpenAI officially supports ChatGPT subscription sign-in for Codex clients. Models Provider reproduces that account-access boundary for this library; it is separate from the public, pay-as-you-go OpenAI API and may require compatibility updates when the Codex account protocol changes.
Release files for codebind 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| codebind-0.5.0.tar.gz | 61.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codebind-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 85.4 kB
Release files / codebind-0.5.0.tar.gz
| Download URL | codebind-0.5.0.tar.gz |
|---|---|
| Size | 61.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3b515d36a5ce5d55623ff76e291f62c5ce0cf59c4df05e1e832dac0157379e6
|
|
BLAKE2b-256 checksum How to use checksums |
291564ba7b1e4fd643f823fdb5eebec18d5647c546058db0cf8ef77be6af251c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","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}
|
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 21, 2026.
Transparency logRelease files / codebind-0.5.0-py3-none-any.whl
| Download URL | codebind-0.5.0-py3-none-any.whl |
|---|---|
| Size | 23.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df5cb11490947e2b0575806f56dcc627ea65fbdd62cd88aa4ab9dce82e08c850
|
|
BLAKE2b-256 checksum How to use checksums |
f6567ce82627df5ded1b1187be737a1baa1bfe7d4064b55edca28c5110414afb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","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}
|
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 21, 2026.
Transparency log