nitin-ai
v3.1.0
Published
Autonomous AI developer agent for your terminal. Plans, codes, tests, and learns your project.
Downloads
1,830
Maintainers
Readme
NITIN AI 🤖
An autonomous AI software developer for your terminal. NITIN AI thinks, plans, writes code, runs tests, and learns your project — so you don't have to repeat yourself.
███╗ ██╗██╗████████╗██╗███╗ ██╗
████╗ ██║██║╚══██╔══╝██║████╗ ██║
██╔██╗ ██║██║ ██║ ██║██╔██╗ ██║
██║╚██╗██║██║ ██║ ██║██║╚██╗██║
██║ ╚████║██║ ██║ ██║██║ ╚████║
╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝What makes it different
Most AI coding tools read your entire codebase on every prompt. NITIN AI builds a knowledge graph of your project — functions, classes, imports, dependencies — and only loads the files actually relevant to your task. This makes it fast, cheap, and accurate on large codebases.
Requirements
- Node.js 20+
- A Gemini API key (free at aistudio.google.com)
- A Groq API key (free at console.groq.com) (fallback)
Installation
git clone https://github.com/you/nitin-ai
cd nitin-ai
npm install
cp .env.example .env # fill in your API keys
npm link # makes `nitin` available globallyQuick start
cd your-project
nitin init # scan project, build knowledge graph (~1-2 min)
nitin do "add a /health endpoint"
nitin do "fix the login bug"
nitin do "write tests for the auth module"
nitin # interactive REPLCommands
| Command | Description |
|---|---|
| nitin | Interactive REPL mode |
| nitin do "<task>" | One-shot autonomous task |
| nitin init | Scan project and build knowledge graph |
| nitin update | Refresh graph after manual changes |
| nitin status | Show API quota and graph stats |
| nitin undo | Rollback last change (git stash + graph restore) |
| nitin config list | Show all settings |
| nitin config set <key> <value> | Change a setting |
REPL commands
Inside nitin interactive mode:
| Command | Description |
|---|---|
| /model gemini | Force Gemini 2.0 Flash |
| /model groq | Force Groq Llama 3.3 70B |
| /model auto | Auto-select (default) |
| /status | Show quota |
| /help | Show commands |
| /exit | Quit |
Configuration
nitin config set model auto # auto | gemini | groq
nitin config set auto_test true # run tests after every change
nitin config set auto_review false # review before applying changes
nitin config set temperature 0.7 # LLM creativity (0-1)
nitin config set log_level debug # debug | info | warn | errorHow it works
User task
│
▼
[Classify intent]
│
├── feature → feature-workflow (design → write → test → heal)
├── bugfix → bugfix-workflow (diagnose → fix → verify)
├── refactor → refactor-workflow (surgical edits → verify)
├── test → test-workflow (generate + heal tests)
├── review → review-workflow (structured code review)
└── other → generic ReAct loop
│
[Query graph] ← only loads relevant files
│
[Plan steps] ← LLM produces JSON plan
│
[Execute + Reflect] ← tools + self-healing
│
[Verify tests]
│
[Update graph]Project structure
nitin-ai/
├── bin/nitin.js # CLI entry point
├── src/
│ ├── core/ # ReAct agent loop
│ ├── graph/ # Knowledge graph (graphology)
│ ├── llm/ # Gemini + Groq clients, smart router
│ ├── tools/ # file, shell, test tools
│ ├── workflows/ # feature / bugfix / refactor / test / review
│ ├── embeddings/ # chunker, embedder, vector store (pure-JS)
│ ├── ui/ # renderer, diff viewer, progress
│ ├── commands/ # config, undo
│ ├── safety/ # command filter (BLOCKED / CONFIRM / SAFE)
│ └── utils/ # logger, tokenizer, config-loader, errors
└── .nitin/ # Created in your project
├── graph.json # Knowledge graph
├── embeddings.json # Vector embeddings
├── quota.json # API usage tracking
├── config.json # Project settings
└── checkpoints/ # Graph snapshots for undoLLM routing
- Primary: Gemini 2.0 Flash — 1500 req/day, 1M tokens/day (free)
- Fallback: Groq Llama 3.3 70B — 30 req/min (free)
- Auto-switches on rate limit or quota exhaustion
- Quota persisted to
.nitin/quota.json, resets at UTC midnight - Manual override:
nitin config set model groq
Safety
Every shell command is classified before execution:
- BLOCKED: fork bombs,
rm -rf /, raw device writes — never run - CONFIRM:
sudo,rm,git push --force, SQL DROP — always prompts - SAFE: reads, searches,
npm test— auto-approved
File edits show a coloured diff and ask for approval before writing.
Running tests
npm test # run all tests
npx vitest run # same
npx vitest # watch modeLicense
MIT
