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

# 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

# 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

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.2.0.tar.gz (3.7 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.2.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ncoder-0.2.0.tar.gz
Algorithm Hash digest
SHA256 465bdf37e819c89062c21e3f7ea98bf6bec86c8d7805914630d706150066f3bf
MD5 3d11276a276da0f2085e4113b8492460
BLAKE2b-256 2972f60415107326d5cd311bb66718e31bc349cefb03bc2a2383cafdef0afdec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ncoder-0.2.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ffd2ee265feb267ccae70d4e4ad4a2df3832528e2c2d8056d8d8148dc1e17752
MD5 03c31701acae3854fd7944e0625ecf37
BLAKE2b-256 5d839b70f317a5d58dda2fd9a6bf429d154a91a535db6276e05b6218969293e2

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