Getting Started

Architecture

Pawan Architecture

Install

cargo install pawan

Or build from source:

git clone https://github.com/dirmacs/pawan && cd pawan
cargo install --path crates/pawan-cli

Setup

Set your NVIDIA NIM API key (free tier available at build.nvidia.com):

export NVIDIA_API_KEY=nvapi-...

Or create a .env file in your project:

NVIDIA_API_KEY=nvapi-...

Local Inference (Free, Optional)

The mlx provider runs a model locally on Mac via mlx_lm.server. No API key needed, $0/token. Optional — pawan defaults to Qwen3.5 122B on NVIDIA NIM.

The lancor provider runs llama.cpp models locally on any platform (Linux, Mac, Windows). Build with --features lancor and point it at a GGUF model file. No API key, $0/token.

provider = "mlx"
model = "mlx-community/Qwen3.5-9B-OptiQ-4bit"
base_url = "http://localhost:8080/v1"

Verify your setup:

pawan doctor

Initialize a project

cd your-project
pawan init

This creates:

First run

# Interactive TUI
pawan

# Or try a quick task
pawan explain src/main.rs

What's New in v0.5.5

TUI Reliability & Polish

Configuration

Priority: CLI flags > environment variables > pawan.toml > defaults

Environment variables

VariableDescription
PAWAN_MODELModel override (e.g., minimaxai/minimax-m2.5)
PAWAN_PROVIDERProvider: nvidia, ollama, openai, mlx, lancor
PAWAN_TEMPERATURETemperature (0.0-2.0)
PAWAN_MAX_TOKENSMax output tokens
PAWAN_MAX_ITERATIONSMax tool-calling iterations

pawan.toml

provider = "nvidia"
model = "qwen/qwen3.5-122b-a10b"
temperature = 0.6
max_tokens = 4096
max_tool_iterations = 20
thinking_budget = 0

# Opt-in: use ares-server's LLMClient + tool coordination primitives
# Requires building with --features ares
use_ares_backend = false

# Optional: link to an external skills repository (dstack-style)
# Overridden by PAWAN_SKILLS_REPO env var
skills_repo = "/opt/dirmacs-skills"

[cloud]
provider = "nvidia"
model = "minimaxai/minimax-m2.5"

[eruka]
enabled = true
url = "http://localhost:8081"

# MCP servers are auto-discovered from PATH at startup:
# - eruka-mcp (context memory)
# - daedra (web search)
# - deagle-mcp (code intelligence)
# Explicit entries override auto-discovery.
[mcp.daedra]
command = "daedra"
args = ["serve", "--transport", "stdio", "--quiet"]

Dirmacs stack integration

Pawan is built on top of the dirmacs Rust stack for maximum reuse:

Common workflows

Fix a broken build

pawan heal

AI-powered commit

# Stage all, generate message, confirm, commit
pawan commit -a

# Just preview the message
pawan commit --dry-run

# Skip confirmation
pawan commit -a -y

Code review

# Review all changes
pawan review

# Review only staged changes
pawan review --staged

Continuous healing

# Check every 10 seconds, auto-commit fixes
pawan watch --interval 10 --commit

Headless scripting

# Single prompt
pawan run "add error handling to the config parser"

# From file
pawan run -f task.md --timeout 300 --output json

Skill distillation

Distill completed sessions into reusable SKILL.md files that capture learned patterns:

# Run a task, then distill it
pawan task "set up CI with GitHub Actions"
pawan distill

# Distill a specific session
pawan distill -s abc123 -o ./skills

The generated skill can be loaded by any thulp-compatible agent, creating a learning loop: do the work once, distill it, reuse it.

Permissions

Control which tools require approval:

# In pawan.toml
[permissions]
bash = "prompt"       # ask before shell commands
git_commit = "prompt" # confirm before committing
write_file = "allow"  # auto-allow (default)

In TUI mode, prompt tools show an inline y/n dialog. In headless mode, prompt tools are denied for safety. Read-only bash commands are auto-allowed.