Code assistant in a single Rust binary
cargo install, set an OpenRouter key, start working. 7 tools the LLM calls directly (read, write, edit, grep, glob, bash, patch). 30+ slash commands with zero latency. Multi-model. Session persistence. Event-sourced.
Each layer builds on the previous. j/k to navigate, enter to expand.
$ cargo install --git https://github.com/uprootiny/hyle $ export OPENROUTER_API_KEY=sk-or-... $ hyle doctor ✓ API key configured ✓ OpenRouter reachable ✓ State directory ready
Type a prompt, get a streaming response. Switch models with /model. Resume sessions across restarts. Free models via OpenRouter.
> explain the borrow checker error on line 47 The value `connection` is moved into the async block... > /model deepseek/deepseek-chat-v3-0324:free Switched to deepseek-chat-v3 (free)
The LLM emits tool calls, hyle executes them. Atomic writes with backup rotation. Recursive grep across directories. Compilation verification.
[read] src/routes/upload.rs (247 lines) [grep] "rate_limit" in src/ (3 matches) [edit] src/routes/upload.rs: +4 -1 lines [bash] cargo check ✓ compiles
Multi-step execution with 16-message context cap and summarization. Intent detection prevents idle narration. Works best on bounded tasks; complex runs still need supervision.
$ hyle --task "add error handling to parse()" iter 1: [read] src/lib.rs iter 2: [edit] src/lib.rs (+12 -3) iter 3: [bash] cargo test ✓ 3 iterations, all tests pass
Every agent run emits structured events to JSONL. UX metrics track responsiveness, smoothness, and autonomy. Token usage and cost tracked per session.
> /cost Session: a3f7c2d Tokens in: 47,832 ($0.024) Tokens out: 12,441 ($0.037) $ cat ~/.local/share/hyle/run_a3f7c2d.jsonl {"event":"tool_call","tool":"read",...}
13-tier recentering system detects agent drift (over-architecting, hallucinating APIs, ignoring tests) and injects corrective nudges. Automatic symptom classifier picks the tier.
$ hyle smoke ✓ recenter-list 4 prompts loaded ✓ recenter-auto classifier: tier 3 > /recenter auto [tier 3: Test-First Nudge] Run the existing tests before changing more code.
Define scenario files with phased prompt injection. Triggers fire on iteration count, elapsed time, or output patterns. The runner nudges the agent through workflows without manual intervention.
scenario.json
{ "phases": [
{ "trigger": "Immediate",
"prompt": "Read the codebase structure first" },
{ "trigger": { "AfterIterations": 3 },
"prompt": "Now run the test suite" },
{ "trigger": { "OnPattern": "test.*fail" },
"prompt": "Fix failing tests before proceeding" }
]}
Honest inventory. Green = solid. Yellow = works but has rough edges.
read, write, edit, grep, glob, bash, patch. The LLM emits tool calls, hyle runs them. Atomic writes with backup rotation. Recursive grep. Compilation verification.
Run locally, zero latency, no API call. /build /test /diff /commit /status /cost /grep /doctor /recenter and more.
35+ free models. Switch mid-session with /model. DeepSeek, Qwen, Llama, Claude, GPT-4. Fuzzy search picker.
Destructive command blocking. Permission system (deny/ask/auto per tool category). Atomic writes never corrupt files.
Multi-step autonomous execution. Context window capped at 16 messages with summarization. Intent detection prevents idle narration. Best on bounded tasks.
13-tier recentering prompt system. Detects when the agent drifts and injects corrective nudges. From gentle taps to hard resets. /recenter auto.
Click to expand and see the actual prompts
You're integrating with Stripe's API and need to deserialize webhook payloads. Instead of manually transcribing JSON into Rust structs, paste a sample response and get types with proper serde attributes, Option<T> for nullable fields, and chrono DateTime handling.
Rust's async lifetime errors are cryptic. "Lifetime may not live long enough" pointing at trait bounds you didn't write. Paste the error, hyle reads the file, understands ownership flow, and applies the fix.
You've written the parser, now you need tests. Point hyle at the module and it analyzes the public API, identifies edge cases, and generates a test file that exercises the paths that matter.
Security boilerplate is tedious. hyle reads your route handlers, creates JWT validation middleware with proper error responses, adds extractor types, and wires everything together.
You know what you want the UI to look like. Describe it in words and hyle generates a complete Leptos component with signals, derived state, event handlers, and CSS.
That Python prototype is now a bottleneck. hyle understands Python idioms and maps them to Rust: dict comprehensions become iterators, context managers become RAII, exceptions become Result.
Describe an entity's fields and hyle generates the complete vertical slice: SQLx migrations, model structs with validation, CRUD handlers, integration tests, and OpenAPI documentation. All following your existing patterns.
The file that started as "temporary" is now 2000 lines. hyle analyzes the dependency graph, identifies natural module boundaries, extracts code into proper structure, fixes imports, and verifies compilation.
Your monitoring alerts on a panic. Paste the stack trace, hyle correlates with source, identifies the failing unwrap, explains why, fixes error handling, and adds a regression test.
Paste a design doc and hyle implements incrementally - writing code, running tests after each step, proceeding only when they pass. Great for well-specified features.
cargo install --git https://github.com/uprootiny/hyle