Open source · MIT licensed · Windows

The open source AI coding agent

NightCode reads, writes and edits your code, runs commands, and connects to external tools through MCP. Bring your own API keys and pick from 100+ providers.

Free and open source. Windows today, Linux and desktop app next.

NightCode home screen with prompt box, model picker and permission mode

Use any model you already pay for

Add your own keys for hosted models, or point NightCode at a local server. No middleman and no markup.

100+ providersGoogle GeminiGroqOpenRouterOpenCode ZenCloudflare Workers AILocal servers

Everything an agent needs to ship code

A fast chat interface on top of a Go backend that does real work in your workspace.

Watch every step the agent takes

Tool calls stream into a collapsible timeline, with the exact input and result for each one. Nothing happens out of sight.

  • Live streaming responses
  • Inspect inputs and outputs per tool
  • Cancel a run at any time
Tool timeline showing an Opened app call with its JSON input and result

Files become artifacts

Documents and code the agent creates land in a side panel. Preview them, copy them, or download everything in one click.

  • Syntax-highlighted code
  • Markdown rendering
  • Download one or all
Artifacts panel listing a generated prd.md document beside the chat

Switch models mid-flow

Pick the model per message from the prompt box, and choose how much freedom the agent gets: read only, auto, or full access.

  • Read Only, Auto and Full Access modes
  • Models grouped by provider
  • Per-model client caching
Model picker listing Google and OpenCode Zen models

A workspace for every project

Each workspace is a sandboxed folder. Add instructions, context files and a Git remote so the agent starts every chat already briefed.

  • Sandboxed paths with symlink protection
  • Custom instructions and skills
  • Git status and diff built in
Workspace page with Git, Instructions and Context panels

Extend it with MCP connectors

Plug in any Model Context Protocol server. NightCode ships a Windows control connector that can open apps, type, scroll and take screenshots.

  • Add, toggle and remove connectors in the UI
  • 12 Windows control tools included
  • Works over standard stdio
Connectors page showing an active MCP server

Undo any change

File writes and edits store reversal data, so you can roll back what the agent did in one click.

Nine built-in tools

read_file, write_file, edit_file, grep, glob, list_dir, shell, git_status and git_diff.

Smart context budget

A 128K token budget with history compaction keeps long sessions inside the model's window.

From prompt to finished change

NightCode runs a reason-and-act loop until the job is done, up to 20 iterations per turn.

You describe it

Type a task, attach files, or reference them with @.

Context is built

Instructions, file tree and Git status are added to the prompt.

Tools run

The model calls tools in parallel inside your sandboxed workspace.

You review

Read the result, open artifacts, or undo the changes.

Local-first, and getting wider

Your code stays in your workspace and your keys stay in your own environment file.

Available

Web UI for Windows

Go backend plus React interface, launched with a single script.

Coming soon

Terminal UI

Use the same agent straight from your terminal.

Coming soon

Desktop app

A packaged app for Windows and Linux.

GoSQLiteReact 19TypeScriptViteTailwind CSS 4shadcn/uiMCPServer-Sent Events

Questions, answered

Is NightCode free?

Yes. It is open source under the MIT license. You only pay your model provider, if your chosen model is paid.

Does my code leave my computer?

NightCode runs locally and works inside your workspace folder. When you use a hosted model, the prompt and the files the agent reads are sent to that provider. Use a local model server to keep everything on your machine.

What does bring your own key mean?

You add API keys for the providers you want in a local environment file. NightCode never routes requests through a service of ours.

Which platforms are supported?

Windows today. A terminal UI and a desktop app for Windows and Linux are planned.

Can the agent damage my files?

File access is sandboxed to the workspace, a Read Only mode is available, and writes and edits can be reversed from the chat.

How do I add tools?

Open Connectors, add an MCP server command, and its tools become available to the agent right away.

Start building with NightCode

Clone the repo, add a key, and run the launcher.

Get it on GitHub