Thanks for your interest in contributing to NeMoCode. This guide covers how to set up a development environment, make changes, and submit pull requests.
- Python 3.11 or later
- uv or pip for package management
- An NVIDIA API key from build.nvidia.com (for live testing)
git clone https://github.com/Hmbown/NeMoCode.git
cd NeMoCode
pip install -e ".[dev]"Set your API key:
export NVIDIA_API_KEY="nvapi-..."Or use the built-in setup wizard:
nemo setup- Create a branch from
main - Make your changes
- Run checks (see below)
- Open a pull request
ruff check src/ tests/ # Lint
ruff format src/ tests/ # Format
pytest tests/ -q # TestsInstall pre-commit hooks to run checks automatically:
pip install pre-commit
pre-commit install- Formatter: ruff (configured in
pyproject.toml) - Lint rules: E, F, I, W, UP, B
- Line length: 100
- Imports: sorted isort-style (ruff handles this)
- Type hints: use modern
X | Ysyntax, notUnion[X, Y] - Docstrings: Google style on all public functions and classes
- SPDX headers: all
.pyfiles must start with:# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: MIT
- Tests live in
tests/mirroring thesrc/nemocode/structure - Use
pytest-asynciofor async tests (auto mode is configured) - Mock all external API calls (httpx) — no real network calls in tests
- Keep tests fast (< 30s total)
src/nemocode/
cli/ # CLI commands, TUI, rendering
config/ # Configuration schema and loading
core/ # Core engine (scheduler, sessions, context)
providers/ # NIM API providers (chat, embeddings, rerank)
skills/ # Built-in skills (commit, review)
tools/ # Tool registry and implementations
workflows/ # High-level agent orchestration
- Create a function in
src/nemocode/tools/with the@tooldecorator - Add parameters with type hints (JSON Schema is auto-generated)
- Return a JSON string with results or error
- Register it in
tools/__init__.pyif not auto-discovered
from nemocode.tools import tool
@tool(description="One-line description shown to the model")
def my_tool(arg: str, count: int = 1) -> str:
"""My tool does something useful.
arg: The input string to process
count: Number of times to process
"""
return json.dumps({"result": arg * count})Create a markdown file in your project or config directory:
---
name: my-agent
role: executor
tools: [read_file, edit_file, bash_exec]
---
You are a specialized agent for...
(custom system prompt here)Use conventional commits:
feat(tools): add my_tool for XYZ
fix(scheduler): resolve race condition in session save
docs(readme): update installation instructions
refactor(providers): extract base class for chat providers
test(core): add session persistence roundtrip test
- PRs must reference an existing issue
- All checks must pass (lint, format, tests)
- Keep PRs focused — one logical change per PR
- Include tests for new functionality
- Update docstrings for any changed public APIs
Per AGENTS.md:
- Prefer native NVIDIA Nemotron models over Llama-Nemotron variants
- Do not introduce Llama-based models as coding backends
- For Nano 4B, use Nemotron 3 Nano 4B family (
nvidia/NVIDIA-Nemotron-3-Nano-4B-BF16)
Open a discussion on GitHub.