Noumena Code is an AI coding assistant that runs from your terminal. It can inspect a codebase, edit files, run commands, and help carry multi-step development workflows.
git clone https://github.com/noumena-network/code.git
cd code
bun install
bun run buildThe default build creates a native single-file ncode binary. The build command prints JSON with the exact binaryPath; on Linux x64 the default path is:
.tmp/packages/ncode-0.1.0-linux-x64/ncodeRun it directly:
.tmp/packages/ncode-0.1.0-linux-x64/ncode --helpThe canonical way to use Noumena-managed accounts is OAuth:
.tmp/packages/ncode-0.1.0-linux-x64/ncode auth loginComplete the browser OAuth flow. You can also start the app and run /login from inside the REPL.
Noumena API keys and BYOK are supported alternatives for automation and direct-provider workflows:
NOUMENA_API_KEY=... .tmp/packages/ncode-0.1.0-linux-x64/ncode
ANTHROPIC_API_KEY=... .tmp/packages/ncode-0.1.0-linux-x64/ncodeThe launcher also reads ~/.config/noumena/ncode/api_key by default. Service endpoints can be overridden for non-default infrastructure:
NOUMENA_BASE_URL=https://api.noumena.com
NOUMENA_PLATFORM_BASE_URL=https://api.noumena.com
NOUMENA_OAUTH_WEB_BASE_URL=https://code.noumena.comBuild requirements:
- Node.js 18 or newer
- Bun 1.3.10 or newer
- Rust and Cargo
Developer test requirements:
tmuxfor PTY/tmux integration tests- A normal interactive Unix-like terminal environment for wrapper and terminal-rendering contracts
Install Bun and Rust with their upstream installers:
curl -fsSL https://bun.sh/install | bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shAfter installing, open a new shell or ensure bun, cargo, and, for tests, tmux are on PATH.
The full Bun test suite is intentionally isolated: each *.test.* file runs in a fresh Bun process so global environment and auth caches cannot leak across files. This is slower than a single bun test process. Some PTY, tmux, native-package, and rendering-contract tests can take a long time and may build the native binary on demand.
bun run testFor focused work, run a single test file directly:
bun test src/path/to/file.test.tsIf you do not have tmux, install it before running the full suite; otherwise tmux-backed integration tests will fail or be skipped depending on the local environment.
bun run build is the preferred user build. It packages the CLI as a native binary and writes artifacts under .tmp/packages/:
binaryPath: native executablemanifestPath: package manifest and checksum metadatazipPath: distributable archive
The source bundle dist/cli.js is for development, not the preferred user-facing build artifact.
Choose a build mode before building; the mode is baked into the binary.
| Mode | Command | Intended use |
|---|---|---|
external |
bun run build:external |
Default OSS build. Public-safe gates, Noumena OAuth, Noumena API keys, and BYOK. |
noumena |
bun run build:noumena |
Noumena first-party/product build with Noumena compatibility features enabled. |
dev |
bun run build:dev |
Contributor/debug build that enables development/internal capability gates. |
internal |
bun run build:internal |
Internal compatibility spin for Noumena-controlled environments. |
Explicit package commands are also available:
bun run package:compiled:external -- --target bun-linux-x64
bun run package:compiled:noumena -- --target bun-linux-x64
bun run package:compiled:dev -- --target bun-linux-x64
bun run package:compiled:internal -- --target bun-linux-x64Supported single-executable targets are documented in OSS_BUILD.md.
For source-level development without packaging a native binary:
bun run build:source
./ncode --helpThis writes dist/cli.js and uses the ./ncode development launcher.
This repository is the standalone public source export of code/ from Noumena's internal monorepo. It intentionally excludes monorepo-only Buck/Sapling integration, generated build outputs, vendored dependencies, staging launchers, and internal planning/parity notes.
This export keeps the source needed to build and develop the public CLI:
src/TypeScript and React/Ink application sourcebuild/Bun build and packaging scriptsnative/Rust N-API modulesscripts/public install and utility scriptsdocs/public design notes
Excluded content includes node_modules, dist, .tmp, monorepo mlstore mirrors, Buck files, staging launchers, and internal launch/parity/reconstruction documents.
Apache-2.0. See LICENSE.