Skip to main content

jupyter-vibe-coding

A JupyterLab 4.x extension that adds AI-powered buttons to notebook cells

  • 💡 Explain – when a cell throws an error, click Explain to get a plain-language description of what went wrong, powered by an LLM via OpenAI's API.
  • 🔧 Fix – click Fix to automatically replace the erroneous cell code with an LLM-corrected version.
  • 🪄 Generate Code – a command (jupyter-vibe-coding:generate-code) is contributed to the Cell toolbar via jupyter.lab.toolbars; it opens a prompt dialog and replaces the current code cell with generated code.

Installation

pip install jupyter-vibe-coding

This installs both the Python server extension and the pre-built JupyterLab frontend extension.

You also need an OpenAI API key exported as an environment variable:

export OPENAI_API_KEY=sk-...

Alternatively, you can use environment variables to configure a different OpenAI-API compatible LLM server, including local installations using ollama:

# Preferred API key variable (falls back to OPENAI_API_KEY)
export JUPYTER_VIBE_CODING_API_KEY=sk-key...

# Optional custom OpenAI-compatible endpoint
export JUPYTER_VIBE_CODING_BASE_URL=http://localhost:11434/v1

# Optional model override (default: gpt-4o-mini)
export JUPYTER_VIBE_CODING_MODEL=gpt-oss:20b

Development install

The development install works on Windows, macOS, and Linux without requiring Administrator/Developer Mode privileges.

git clone https://github.com/haesleinhuepf/jupyter-vibe-coding.git
cd jupyter-vibe-coding

# 1. Install JupyterLab and build tools
pip install jupyterlab

# 2. Install JS dependencies
jlpm install

# 3. Build the frontend extension
jlpm run build

# 4. Install the Python package in editable mode
#    This also registers the server extension automatically.
pip install -e ".[test]"

After these steps, start JupyterLab normally:

jupyter lab

Verify both extensions are detected:

jupyter server extension list
jupyter labextension list

You should see jupyter_vibe_coding in the server list and jupyter-vibe-coding in the labextension list.

To pick up TypeScript source changes during development, rebuild and restart:

jlpm run build
jupyter lab

Usage

  1. Start JupyterLab: jupyter lab
  2. Open or create a Python notebook.
  3. Run a cell that contains an error – 💡 Explain and 🔧 Fix buttons appear below the output.
  4. Click 🪄 Generate Code in the Cell toolbar to open the prompt dialog.

Architecture

jupyter-vibe-coding/
├── src/
│   ├── index.ts      # JupyterLab plugin (frontend)
│   └── handler.ts    # Helper for calling the Jupyter server REST API
├── style/
│   └── index.css     # Button styles
├── jupyter_vibe_coding/
│   ├── __init__.py   # Server extension registration
│   ├── handlers.py   # Tornado handlers + LLM helper functions
│   └── tests/
│       └── test_handlers.py
├── package.json
├── tsconfig.json
└── pyproject.toml

API endpoints

Method Path Body Response
POST /jupyter-vibe-coding/explain {ename, evalue, traceback} {explanation}
POST /jupyter-vibe-coding/fix {code, ename, evalue, traceback} {fixed_code, fix_summary}
POST /jupyter-vibe-coding/generate {prompt} {code}

Running the tests

pip install -e ".[test]"
pytest jupyter_vibe_coding/tests/ -v

License

BSD 3-Clause – see LICENSE.

Metadata

Release files for jupyter-vibe-coding 0.1.4

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-vibe-coding 0.1.4
File Size Uploaded
jupyter_vibe_coding-0.1.4.tar.gz 2.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for jupyter-vibe-coding 0.1.4
File Interpreter ABI Platform
jupyter_vibe_coding-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 2.9 MB

Release files / jupyter_vibe_coding-0.1.4.tar.gz

Download URL jupyter_vibe_coding-0.1.4.tar.gz
Size 2.8 MB
Tags Source
SHA-256 checksum
How to use checksums
6db09284238098fff01429cf046fab8d17ed3bc9621599d4f370aaf4b3e5b16b
BLAKE2b-256 checksum
How to use checksums
6a2c089f4795b329fbc3761e5d48bbc0dc9a17542fbc09ed4d6d86e458c55d21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / jupyter_vibe_coding-0.1.4-py3-none-any.whl

Download URL jupyter_vibe_coding-0.1.4-py3-none-any.whl
Size 80.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8daf9f289d93a42571ec56f6d91c7cb18637d7973527953fcc38c3bdb8380814
BLAKE2b-256 checksum
How to use checksums
5377a6d104634a571b8f343e2d5631ddaf6fd2fd013c33061419f83628e97e02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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