____ _ _ _ _ | _ \ _ | | | | _ | | | | | | | | (_) | | | | (_) | |_| | | | | | | | | | | _ | | |_| | _ | |_| | _ | | | | |____/ (_) \___/ (_) |_| |_|
D.U.H. is a Universal Harness
One harness. Any model. Your machine.
D.U.H. is designed around a clean hexagonal kernel โ providers plug in at the edge, tools compose in the middle, and security wraps every layer.
Anthropic Claude, OpenAI API, ChatGPT Plus/Pro (Codex via OAuth), local Ollama, or a deterministic stub for CI. Switch providers at runtime โ same harness, any model.
3-layer pluggable security: 13 vulnerability scanners, taint-propagating UntrustedStr, HMAC-bound confirmation tokens, lethal trifecta check, macOS Seatbelt + Linux Landlock sandboxing.
45.7s average vs 63.2s for Claude Code on identical tasks with the same model. Direct Python process โ no Node.js runtime, no Ink TUI overhead. 100% success rate vs 67%.
Read, Write, Edit, MultiEdit, Bash, Glob, Grep, WebSearch, WebFetch, Task (subagents), Docker, Database, HTTP, GitHub, LSP, TestImpact, MemoryStore, NotebookEdit, and more.
Full Textual TUI, Rich-powered REPL with 21 slash commands including /connect (OAuth), /snapshot, /plan, /pr, /compact. Print mode for CI pipelines. SDK mode via NDJSON.
Implements the full NDJSON streaming protocol. Drop duh anywhere claude is expected โ same interface, any provider behind it. Verified end-to-end.
3 independent runs per tool, same model (Claude Haiku 4.5), same prompt, same task (FastAPI URL shortener from spec), fully isolated directories.
| Metric | D.U.H. (n=3) | Claude Code (n=2 successful) |
|---|---|---|
| Avg completion time | 45.7s | 63.2s |
| Success rate | 3/3 (100%) | 2/3 (67%) |
| Avg LOC generated | 419 | 273 |
| Avg tests generated | 18 | 10.5 |
| All tests pass (on success) | 3/3 โ | 2/2 โ |
| Self-correction behavior | Yes (detected & fixed Pydantic issue) | Minimal |
| Runtime / startup | Python (direct) | Node.js + Ink TUI |
Methodology: Same Anthropic API key, same model (Haiku 4.5), same prompt verbatim, same TASK.md, separate directories, fresh git repo per run, --max-turns 15 on both tools. D.U.H. advantage is architectural simplicity โ less startup overhead means more time for actual model interaction. See full benchmark report.
Three independent layers that address every published agent RCE in the 2024โ2026 CVE corpus. No other open-source AI coding agent comes close.
duh security scan ยท duh security initUntrustedStr tags every string by origin and propagates through all string opssuggest / auto-edit / full-autoD.U.H.'s kernel never imports a provider directly. Providers are adapters at the edge โ swap them without touching your workflow.
API key or /connect
GPT-4o, o1, o3
PKCE OAuth โ no API key
Local โ any pulled model
Deterministic CI testing
100+ models via proxy
# Install pip install duh-cli # Set your Anthropic key export ANTHROPIC_API_KEY=sk-ant-... # Run a task (print mode โ great for scripts) duh -p "fix the bug in auth.py" # Interactive REPL duh # Use a different model / provider duh --provider openai --model gpt-4o -p "refactor db.py" # Local model with Ollama duh --provider ollama --model qwen2.5-coder -p "write tests" # Run diagnostics duh doctor # Security scan (SARIF output) duh security scan