Getting Started with Nehanda CLI
Install and configure Nehanda CLI, then connect it to a provider and run your first agent session.
Requirements
- Node.js v22.0.0 or higher
- A terminal emulator (macOS Terminal, iTerm2, Windows Terminal, etc.)
- An LLM provider (see Providers for options)
1. Installation
git clone https://github.com/AsobaCloud/nehanda-cli.git
cd nehanda-cli
npm install
2. First Launch
npm start
This launches the interactive Ink TUI. On first run, the engine initializes the SQLite database at ~/.config/nehanda/ona-session.db and creates all tables.
You’ll see the REPL prompt:
❯
3. Connect a Provider
Nehanda CLI works out of the box with multiple providers. Choose one:
Option A: Nehanda Cloud (Default)
The CLI defaults to https://nehanda-ml.asoba.co/v1. If an API key is required:
❯ /key
New Nehanda API key: <your-key>
✓ Key saved.
Option B: Anthropic Claude
Set your API key as an environment variable, then switch provider:
export ANTHROPIC_API_KEY=sk-ant-...
❯ /config set model_config.provider claude_code_subscription
❯ /config set model_config.model_id claude-sonnet-4-20250514
Option C: LM Studio (Local)
- Download LM Studio and load a model
- Start the local server (default port 1234 or 8000)
- Switch provider:
❯ /config set model_config.provider lm_studio_local
❯ /model
Option D: Ollama (Local or Remote)
# Local Ollama
ollama serve # starts on port 11434
❯ /config set model_config.provider ollama
❯ /config set model_config.base_url http://localhost:11434/v1
❯ /model llama3
For a remote Ollama instance on your LAN:
❯ /config set model_config.provider ollama
❯ /config set model_config.base_url http://my-server.local:11434/v1
❯ /model deepseek-coder-v2:latest
Option E: Any OpenAI-Compatible API
export OPENAI_API_KEY=sk-...
❯ /config set model_config.provider openai_compatible
❯ /config set model_config.base_url https://your-endpoint.com/v1
❯ /model your-model-name
4. Your First Session
Once connected, type a task:
❯ Read package.json and summarize the project
The engine will:
- Send your message to the provider
- The model will call the
Readtool - The permission gate may ask for confirmation (press
y) - The tool result is returned to the model
- The model responds with a summary
Try the SDLC Workflow
For a more structured workflow, try a task that triggers the full SDLC:
❯ Add input validation to the username field
The engine will ask: Use SDLC workflow (plan → implement → test)? [Y/n]
Press Enter (or y) to start the governed workflow:
- Explore — The model reads relevant files
- Planning — The model writes a plan (you approve or reject)
- Implement — The model makes code changes
- Test — The model runs tests and mandatory safety checks
See SDLC Workflow for the full walkthrough.
5. Useful First Commands
❯ /help # Show all commands
❯ /model # List available models
❯ /config # Show current settings
❯ /mcp status # Check MCP server status
❯ /clear # Reset conversation
❯ /exit # Quit
6. Optional: Configure MCP Servers
Add external tool servers by creating mcp.json in your project root:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
}
}
}
Verify with /mcp list. See MCP Integration for the full guide.
7. Optional: Settings File
Create .ona/settings.json in your project root for project-specific configuration:
{
"model_config": {
"provider": "claude_code_subscription",
"model_id": "claude-sonnet-4-20250514"
},
"permissions": {
"defaultMode": "acceptEdits"
}
}
See Configuration for the full schema.
Next Steps
- Architecture — Understand the 5-layer system design
- Engine & Turn Loop — How a request flows through the system
- SDLC Workflow — The 6-phase state machine in detail
- Built-in Tools — All 21 tools documented
- Permissions — Configure the permission gate
- Providers — Multi-provider setup guide