@suchitraswain/nightcode-cli
v1.0.5
Published
Terminal AI coding agent — chat, plan, and edit local files via a hosted API. No API keys required.
Maintainers
Readme
NightCode CLI
A terminal AI coding agent. Chat, plan, and build inside your local project — files stay on your machine, AI runs through the hosted NightCode API.
Screenshots
Home

Chat session

Command menu

Install
Requirements: Bun 1.0+
bun install -g @suchitraswain/nightcode-cliQuick start
cd your-project
nightcode- Type
/login— sign in via browser (Clerk OAuth, one-time) - Type
/upgrade— buy credits if prompted - Start chatting — NightCode reads and edits files in your current directory
No .env file, no API keys, no repo clone. The CLI connects to the hosted API automatically.
Commands
| Command | Description |
|---------|-------------|
| /login | Sign in |
| /logout | Sign out |
| /new | New conversation |
| /sessions | Browse past sessions |
| /agents | Switch plan vs build mode |
| /models | Change AI model |
| /upgrade | Buy credits |
| /usage | Open billing portal |
| /theme | Change color theme |
Supported models
| Model | Provider |
|-------|----------|
| claude-opus-4-6 | Anthropic (default) |
| claude-sonnet-4-6 | Anthropic |
| claude-haiku-4-5 | Anthropic |
| gpt-5.4 | OpenAI |
| gpt-5.4-mini | OpenAI |
| gpt-5.4-nano | OpenAI |
How it works
Your terminal Hosted API Your files
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ nightcode │ ────► │ Railway API │ │ local git │
│ (OpenTUI) │ ◄──── │ + Anthropic │ │ project │
└─────────────┘ └──────────────┘ └─────────────┘
│ ▲
└──────── local file tools ────────────────┘- CLI runs on your machine and executes file tools locally
- API handles auth, billing, and AI requests — secrets never ship in the package
- Credits are metered per usage via Polar
Troubleshooting
Login fails — redirect URI mismatch
The maintainer must add https://nightcode-production.up.railway.app/auth/callback in the Clerk OAuth app settings.
nightcode: command not found
Ensure Bun’s global bin is on your PATH:
bun pm bin -gAPI unreachable
curl https://nightcode-production.up.railway.app/healthExpected: {"status":"ok"}
Links
- Repository: github.com/SuchitraSwain/nightcode
- Issues: github.com/SuchitraSwain/nightcode/issues
- API health: nightcode-production.up.railway.app/health
License
MIT © Suchitra Swain
