AI Agent CLI for indexing, searching, and researching data sources from the terminal.
Nia CLI gives AI coding agents (Claude Code, Codex, Cursor, etc.) a fast, local-first way to search codebases, the web, and GitHub repositories. Designed as a tool that agents can call via exec/subprocess — no cloud dependency, MIT licensed.
- 🔍 Local Index — Index any directory into SQLite FTS5 for instant full-text search
- 🌐 Web Search — Search DuckDuckGo directly from the terminal
- 📦 GitHub Repos — Clone and index public GitHub repositories
- 🔬 Research Mode — Combine local + web sources for autonomous research
- 🤖 Agent-Ready — Designed as a tool for AI coding agents to call
# Clone and build
git clone https://github.com/ZSeven-W/nia-cli.git
cd nia-cli
bun install
bun run build
# Install globally
ln -s "$(pwd)/dist/index.js" /usr/local/bin/nia# Index a project
nia index ~/projects/myapp
# Search indexed code
nia search "authentication middleware"
# Web search
nia web "latest OpenTelemetry collector changes"
# Index a GitHub repo
nia repo index vercel/ai
# Research a topic
nia research "RAG evaluation frameworks"
# Auth (for optional cloud features)
nia auth login nia_your_api_key| Command | Description |
|---|---|
nia index <path> |
Index a local directory for searching |
nia search <query> |
Search indexed files (FTS5) |
nia web <query> |
Search the web via DuckDuckGo |
nia repo index <o/r> |
Index a GitHub repository |
nia repo list |
List indexed repositories |
nia research <topic> |
Run autonomous research |
nia auth login <key> |
Store API key |
nia auth status |
Check auth configuration |
nia auth logout |
Clear API key |
- Runtime: Bun (TypeScript)
- Index Storage: SQLite FTS5 (
~/.cache/nia-cli/index.sqlite) - Config: JSON (
~/.config/nia-cli/config.json) - Binary: Self-contained via
bun build --target=bun
MIT