██████╗ ██╗ ██╗ ██╗ ██╔══██╗ ██║ ██║ ╚═╝ ██║ ██║ ███████║ ██╗ ██║ ██║ ██╔══██║ ██║ ██████╔╝ ██║ ██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚═╝
Get DHI running on your machine in minutes
DHI works on macOS and Linux and requires Go 1.26+, Ollama with qwen2.5:1.5b (default), plus rg, jq, and curl. ddgr + agent-browser power web_search/fetch_url; s-search powers site_search.
curl -fsSL https://raw.githubusercontent.com/hrhrprasath/dhi/dhi/install.sh | shgo install github.com/hrhrprasath/dhi/cmd/dhi@latestgit clone https://github.com/hrhrprasath/dhi.git
cd dhi && go build -o build/dhi ./cmd/dhi
./build/dhiOn first launch, DHI auto-populates ~/.dhi/ with default config, pipeline definitions, and scripts. Ensure Ollama is running with your chosen model — DHI checks health on startup (● READY).
A fundamentally different approach to AI integration
Built for Qwen 1B/3B via Ollama — runs entirely on your machine. No API costs, no data leaving your laptop, sub-second classification on a Mac Mini M4. Privacy-first by default.
Three-layer architecture: Intent (LLM classifies input → strict JSON) → Execute (deterministic Go pipelines, zero AI) → Synthesize (LLM formats response). AI is used only where it adds value.
Agents are autonomous — AI decides what to do and does it. MCP is a protocol for tool exposure. DHI is a harness: AI classifies intent, but deterministic Go code executes — you stay in control.
The AI suggests and classifies; it never executes actions directly. All pipelines are pure Go code or auditable bash scripts. Predictable, debuggable, testable. You decide what runs.
Write a bash script once, add 4 lines to pipelines.yaml, and it’s a new action. No AI retraining, no framework changes. Pipelines can be internal (Go) or external (YAML-defined with script references).
Weighted pipeline associations (weight 0.8) with keyword learning and confidence calibration. Correct/incorrect feedback loops improve classification over time without cloud retraining.
Topics are like opencode conversations or ChatGPT threads — they persist history, can be named, searched, forked, and resumed across restarts. Sessions are ephemeral interaction flows within a topic — like a single opencode task or a ChatGPT response turn. Topics live in ~/.dhi/data/topics/; sessions exist only in memory.
User Input → Task Queue → LLM ClassifyQwen via Ollama → Execute PipelineDeterministic Go / Bash → LLM SynthesizeSummary for user → Output
Head-to-head comparison
| Dimension | DHI Harness | AI Agent | MCP |
|---|---|---|---|
| Who executes? | ● Deterministic Go code | ● AI decides & executes | ● Protocol, no execution |
| AI scope | Classify + synthesize only | Full autonomy | Tool definition |
| Extensibility | ● YAML + scripts | ● Depends on framework | ● Server-based |
| Debuggability | ● Full (Go tests + logs) | ● Non-deterministic | ● Depends on server |
| Local-first | ● 100% local, 1B-3B models | ● Usually cloud | ● Protocol-agnostic |
Navigate the terminal UI, run commands, and manage your AI harness
Type a command in the input bar → DHI classifies your intent via local LLM → executes the appropriate pipeline → displays the result. All without leaving the terminal.
Press /help (or /? / :h) then Enter to open the help popup — it lists every slash command and keybinding.
Type these in the input bar and press Enter:
| Command | Description |
|---|---|
/help, /?, :h
|
Open the help popup |
/todo
|
Open todo list (active / done tabs) |
/schedule
|
Open scheduled tasks (active / completed tabs) |
/rss
|
Open RSS reader |
/rss add <url>
|
Add a new RSS feed source |
/topic, /topics
|
Browse and switch conversation topics |
/model, /models
|
Browse and switch AI models |
/log, /logs, /l
|
Open log viewer |
/new
|
Create a new conversation topic |
/fork
|
Fork the current topic into a new one |
/resume
|
Switch back to the previous topic |
/good
|
Rate the last response positively (trains the model) |
/bad
|
Rate the last response negatively |
/quit, /q, :q
|
Exit DHI |
Type / followed by a few characters — matching commands appear below the input. Press Tab to cycle through suggestions, Enter to confirm.
/rss opens the built-in feed reader. Add sources with /rss add <feed-url> — they are stored as OPML in ~/.dhi/data/rss/feed.opml (override with DHI_RSS_OPML_PATH), so you can import an existing reader export by replacing that file. Feeds refresh in the background while DHI runs.
Three tabs (← / → to switch):
| Tab | Contents |
|---|---|
| AI CURATED | LLM summary of the latest entries — press s to refresh |
| RAW | Every entry across all feeds |
| BOOKMARKS | Entries you saved with B |
Keys inside the reader: ↑ / ↓ navigate, Enter opens the entry URL in your browser, B toggles a bookmark, R removes a feed source, s refreshes the AI summary (or fetches the entry into a topic), Esc closes.
YouTube noise is filtered via ~/.dhi/config.yaml:
rss:
skip_shorts: trueInput without a / prefix is sent to the LLM classifier. DHI automatically detects your intent and runs the matching pipeline:
“search for latest AI news” → runs web_search “add buy milk to my todo” → runs todo “schedule meeting at 3pm” → runs schedule
Open any popup then use:
| Key | Action |
|---|---|
↑ / ↓ |
Navigate items |
← / → |
Switch tabs (todo, schedule, RSS) |
Enter |
Confirm / open item URL |
R / r |
Remove selected item |
D / d |
Toggle done / undone |
B / b |
Toggle bookmark (RSS) |
Esc |
Close popup |
The story behind the name
DHI stands for Deterministic Harness Intelligence — a Terminal AI OS that keeps you in control. The acronym spells DHI in ASCII art on startup, and the name reflects the project’s philosophy: deterministic execution, harness pattern, and intelligence augmentation rather than replacement.
DHI is your command center: it listens, suggests, and executes your commands with precision.
Every action is defined in Go or bash — predictable, testable, auditable. No AI hallucination in execution.
A structured framework that wires intent to action. You wear the harness; the AI is your tool, not your replacement.
Local LLMs provide classification, conversation, and synthesis — working for you, not autonomously.
Built-in pipelines that ship with every install
ddgr + agent-browser with auto-summarization via LLM
Site-scoped search opened in your browser via s-search
Extract page content via agent-browser with LLM summarization
Open any link in the default browser, with unsafe-URL rejection
Full CRUD manager with persistent JSON storage
Natural language time parsing + cron-based recurring tasks
OPML feed reader with bookmarks, background refresh, and AI-curated summaries
Yahoo Finance lookup via curl/jq pipeline
Spotify search + playback (macOS via AppleScript, Linux via xdg-open)
Live CPU/RAM/GPU metrics with progress bars
Topic-managed chat with auto-summarization context
Extend DHI without touching Go code
~/.dhi/pipelines.yamlDefine new actions by adding to the YAML. Each pipeline has a name, action type, and optional weight for self-learning.
# ~/.dhi/pipelines.yaml
pipelines:
my_command:
action: bash
command: scripts/my_script {arg}
weight: 0.6
summarize: trueEach pipeline action has a type that determines how it executes:
| Type | What it does | Key fields |
|---|---|---|
bash |
Runs a shell script | script, command |
http |
Makes an HTTP request via curl | url, method, auth |
exec |
Runs a system command directly | command, args |
internal |
Calls a built-in Go handler | handler |
Examples of each type:
pipelines:
greet:
action: bash
script: scripts/greet {name}
check_api:
action: http
url: https://api.example.com/status
method: GET
summarize: true
deploy:
action: exec
command: /usr/local/bin/deploy
args: ["--env", "staging"]
todo:
action: internal
handler: todo~/.dhi/scripts/Bash scripts are referenced by pipeline actions. Drop a new script in ~/.dhi/scripts/ and wire it in pipelines.yaml.
#!/usr/bin/env bash
# ~/.dhi/scripts/my_script
QUERY="$1"
curl -s "https://api.example.com/search?q=$QUERY" | jq '.'~/.dhi/config.yamlSwitch AI providers, models, or adjust generation parameters. Ollama is the default; any OpenAI-compatible endpoint works via the ai: block (keys use ${VAR} environment expansion):
# ~/.dhi/config.yaml
ai:
provider: ollama
base_url: http://localhost:11434/v1
model: qwen2.5:1.5b
max_tokens: 4096
temperature: 0.7# Groq
ai:
provider: groq
base_url: https://api.groq.com/openai/v1
api_key: ${GROQ_API_KEY}
model: llama-3.1-70b-versatile
# OpenRouter
ai:
provider: openrouter
base_url: https://openrouter.ai/api/v1
api_key: ${OPENROUTER_API_KEY}
model: anthropic/claude-sonnet-4