Skip to main content

Jupyter notebook plugin to generate code with AI

Project description

💫 ncoder

Version GitHub last commit GitHub issues

ncoder is an open-source AI coding agent that integrates with Jupyter Notebooks. This project uses the OpenAI API client to connect to any OpenAI-compatible endpoint and enable collaborative coding with AI.

ncoder provides a base Docker image that supports coding with OpenCode in server mode, a quantized Qwen3-Coder 30B model for lightweight local inference and/or any other txtai process.

Quickstart

Install the Jupyter Notebook extension on your local machine.

pip install ncoder

ncoder provides a default server as a Docker image. Run one of the following.

# DEFAULT: Run with opencode backend, sends data to `opencode serve` endpoint
docker run -p 8000:8000 --gpus all --rm -it neuml/ncoder-server

# ALTERNATIVE 1: Run with qwen3-coder, keeps all data local
docker run -p 8000:8000 -e CONFIG=qwen3-coder.yml -gpus all --rm -it neuml/ncoder-server

# ALTERNATIVE 2: Run with a custom txtai workflow
docker run -p 8000:8000 -v config:/config -e CONFIG=/config/config.yml --gpus all --rm -it neuml/ncoder-server

Jupyter Notebooks can be created in Visual Studio Code or your preferred notebook platform. Add the following two sections to test.

# Load ncoder extension
%load_ext ncoder
# Test it out
%ncoder Write a Python Hello World Example

An example notebook is also available.

If you already have a LLM API you'd like to integrate with, it's simply a matter of setting the correct environment variables.

%env OPENAI_BASE_URL=LLM API URL (e.g. https://api.openai.com/v1)
%env OPENAI_API_KEY=api-key
%env API_MODEL=gpt-5.2
%load_ext ncoder

Demo

The short video clip below gives a brief overview on how to use ncoder.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ncoder-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ncoder-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file ncoder-0.1.0.tar.gz.

File metadata

  • Download URL: ncoder-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.19

File hashes

Hashes for ncoder-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fb8991dc509609825ffed5e2a376dc3e596e80536a724a20f685cffb4b35c7da
MD5 ade0e647a9302a49a6137097a5b950fb
BLAKE2b-256 d138c123dfdb5ac0163284a01a37c803da9146a7f30f009b333ac03dfd4c48a0

See more details on using hashes here.

File details

Details for the file ncoder-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ncoder-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.19

File hashes

Hashes for ncoder-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 324980b3b1e1f3f739752fb585012162b6db0d9a2c1431e49b6232c18ffdbfb7
MD5 e05675532e4c20a7d5c5ba64588a4873
BLAKE2b-256 93ef236725871b76efe59c7487c67b28f3ec1dcc66b17770dd7fdd0169a61f01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page