Requirements
The npm package declares Node.js 16 or newer. Published package targets currently include Linux x64/ARM64, Windows x64/ARM64, and Android x64/ARM64.
node --version
npm --version
Install from npm
npm install -g midnight-coder
The global install makes the midnight-coder command available in your shell. Run it from the repository you want the agent to inspect.
cd /path/to/your/project
midnight-coder
Connect an AI model
For local inference, start your model server and open /provider_conf. Enter an endpoint such as 127.0.0.1:11434, then use /model to choose a detected model.
For Ollama-specific settings, including native context sizing, follow the Ollama coding agent guide.
Installation troubleshooting
Command not found
Confirm the npm global binary directory is on your shell's PATH, then reopen the terminal.
Provider not detected
Confirm the provider process is running, the address is reachable from the same machine, and its model-list endpoint returns at least one model.
Long sessions consume too much context
Set a context limit and use compaction. The context management guide explains the relevant commands.
Verified against midnight-coder on npm and the source repository.
Start a workspace session
Review the core runtime before connecting a local or hosted model provider.
Explore Midnight CoderConnect Ollama