> hyle

Rust-native autonomous code assistant

A single binary that reads your codebase, understands what you want, and executes file operations and shell commands until the job is done. No JavaScript runtime, no electron wrapper, no daemon. Just cargo install and start building.

~/code/axum-sessions
Redis session storage

Core capabilities

What makes hyle different from chat-based assistants

Agentic execution loop

Unlike chat interfaces that show you code to copy-paste, hyle executes tools directly. It reads files, writes changes, runs your build, checks the output, and iterates until the task is complete.

> add rate limiting to the /api/upload endpoint [read] src/routes/upload.rs (247 lines) [read] src/middleware/mod.rs (89 lines) [write] src/middleware/rate_limit.rs (63 lines) [patch] src/routes/upload.rs (+4 -1 lines) [bash] cargo check Done. Token bucket at 100 req/min

35+ free models via OpenRouter

Access DeepSeek-V3, Qwen 32B, Mistral, Llama at zero cost. Or use Claude, GPT-4 when you need maximum capability. Switch models mid-session with /model.

$ hyle --free [Using deepseek/deepseek-chat-v3-0324:free] > /models --free Free models: deepseek/deepseek-chat-v3-0324:free qwen/qwen-2.5-coder-32b-instruct:free meta-llama/llama-3.3-70b-instruct:free

Session persistence

Close your terminal, reboot, come back next week. Your conversation history, tool results, and context are preserved. Just run hyle again to continue.

$ hyle [Resumed session a3f7c2d from 3 days ago] [Context: OAuth2 flow for stripe-webhooks] > where were we? We created src/auth/oauth.rs with the provider config. Next: callback handler...

Guardrails and safety

Dangerous commands like rm -rf are blocked before execution. File writes are atomic with automatic backups. Rate limits handled with exponential backoff.

> clean up the build artifacts [BLOCKED] rm -rf / matches dangerous pattern Refusing. Be more specific. > delete the ./target directory [bash] rm -rf ./target Removed ./target (1.2 GB freed)

Instant slash commands

20+ commands that execute locally with zero latency. /build /test /diff /commit - no API calls needed.

> /status Modified: src/lib.rs, src/parser.rs Staged: tests/integration.rs > /diff src/lib.rs - let result = parse(input)?; + let result = parse(input) + .map_err(|e| anyhow!("Parse: {}", e))?;

Cost and context telemetry

Always know what you're spending. Token counts, latency traces, and context budget visible in the UI.

> /cost Session: a3f7c2d Tokens in: 47,832 ($0.024) Tokens out: 12,441 ($0.037) Total cost: $0.061 Context: 62,441 / 128,000 (48.8%)

Real-world examples

Click to expand and see the actual prompts

📝
Stripe webhook types from JSON
Paste API response, get serde structs
painless

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.

~/code/payment-service
> generate rust types from this stripe webhook: {"id":"evt_1abc","type":"payment_intent.succeeded", "data":{"object":{"id":"pi_xyz","amount":2000, "currency":"usd","customer":"cus_123"}}} [write] src/stripe/types.rs (89 lines) [bash] cargo check Compiles successfully
🔧
Fix async lifetime errors
Compiler error in, working code out
painless

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.

~/code/realtime-sync
> fix this: error[E0597]: `connection` does not live long enough --> src/ws/handler.rs:47:23 [read] src/ws/handler.rs The spawn requires 'static. Clone the Arc. [patch] src/ws/handler.rs cargo check: ok
🧪
Generate tests from implementation
Comprehensive coverage, edge cases included
painless

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.

~/code/markdown-compiler
> write tests for src/parser/inline.rs [read] src/parser/inline.rs (312 lines) [write] tests/parser_inline_tests.rs (247 lines) Generated for: parse_emphasis - 6 tests (nested, unmatched) parse_link - 8 tests (inline, reference) parse_code_span - 4 tests [bash] cargo test parser_inline 23 tests passed
🔒
Add JWT auth to all routes
Middleware, extractors, error handling
painless

Security boilerplate is tedious. hyle reads your route handlers, creates JWT validation middleware with proper error responses, adds extractor types, and wires everything together.

~/code/inventory-api
> add JWT auth to src/routes/*, return 401 for invalid [read] src/routes/*.rs (4 files) [write] src/middleware/auth.rs (78 lines) [write] src/auth/claims.rs (34 lines) [patch] src/routes/mod.rs (+12 lines) [patch] Cargo.toml (jsonwebtoken = "9") [bash] cargo test 47 tests passed
🎨
Description to Leptos component
Reactive state, event handlers, CSS
creative

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.

~/code/file-manager
> create file browser component: - tree view left (collapsible folders) - file preview right - breadcrumb nav top - keyboard nav (j/k, enter to open) [write] src/components/file_browser.rs [write] src/components/file_browser.css Created with: - RwSignal<Vec<TreeNode>> for tree - create_effect for keyboard - Accessible ARIA attributes [bash] trunk serve http://localhost:8080
🔄
Port Python to Rust
Idiomatic translation, not transliteration
creative

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.

~/code/image-processor
> port to rust with tokio: async def process_batch(paths): async with aiofiles.open("log.txt", "a") as log: for path in paths: try: img = Image.open(path) results[path.stem] = analyze(img) except Exception as e: await log.write(f"Failed: {e}\n") [write] src/processor.rs (67 lines) [bash] cargo clippy No warnings
🚀
Entity to full CRUD stack
Migrations, handlers, tests, OpenAPI
impressive

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.

~/code/saas-platform
> create entity: Subscription - id: UUID - user_id: UUID (foreign key) - plan: enum (free, pro, enterprise) - status: enum (active, cancelled, past_due) - current_period_end: DateTime - stripe_subscription_id: Option<String> [write] migrations/20260110_subscriptions.sql [write] src/models/subscription.rs [write] src/handlers/subscriptions.rs [write] tests/subscriptions_test.rs [bash] sqlx migrate run && cargo test 12 tests passed. 5 files, 847 lines.
🔄
Split 2000-line monolith
Modules, imports, Cargo.toml updates
impressive

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.

~/code/event-sourcing
> src/event_store.rs is 2000 lines, split into modules [read] src/event_store.rs (2,147 lines) Found 6 clusters: Storage (412) - Projection (387) - Snapshot (234) Subscription (298) - Aggregate (456) - Types (360) [mkdir] src/event_store/ [write] src/event_store/mod.rs [write] src/event_store/{storage,projection,...}.rs [delete] src/event_store.rs [bash] cargo test All 89 tests pass
🐛
Debug production panic
Stack trace to root cause to fix
impressive

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.

~/code/trading-engine
> sentry shows this, fix it: panicked at 'called `Option::unwrap()` on `None`', src/orderbook/matching.rs:142:35 [read] src/orderbook/matching.rs Line 142: let price = self.best_bid.unwrap(); Panics when orderbook empty (no bids). [patch] src/orderbook/matching.rs - let price = self.best_bid.unwrap(); + let Some(price) = self.best_bid else { + return Err(MatchError::NoLiquidity); + }; [write] tests/orderbook_edge_cases.rs (+1 test) 34 tests passed
📑
Spec to implementation
Step-by-step with tests after each
impressive

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.

~/code/rate-limiter
> implement, test after each step: ## Token Bucket Rate Limiter - Configurable capacity and refill rate - Thread-safe (Arc<RateLimiter>) - Returns remaining tokens on check - Multiple named buckets - Async-compatible Step 1/5: Core TokenBucket [write] src/bucket.rs 4 tests passed Step 2/5: Atomic refill [patch] src/bucket.rs 6 tests passed ...steps 3-5... All 34 tests pass. Docs generated.
View on GitHub cargo install --git https://github.com/uprootiny/hyle
~
Default Composable Velocity Reliable Depth Playful Observable Community Independent Learning Control Secure Flow