Who it is forA backend or desktop developer who wants streamed local responses in a Node or Rust tool.
The problemWaiting for a full reply feels slow; streaming locally needs an engine with a stream API.
The outcomeA Node or Rust program that streams replies from a local model and reports token counts.
What you need first
- Rust, Python (uv), Swift or TypeScript (pnpm)
- An Apple device to benefit from unified memory
- Disk space for the downloaded model
Steps
- For Node, run
pnpm add @trymirai/uzu@0.6.13; for Rust, add the Uzu git dependency to Cargo.toml - Create the engine and download the model as in the quick start
- In Rust, call reply_with_stream and handle the Replies and Error chunks
- Print the generated token count from the reply stats
- Run the bundled examples with
cargo tools exampleto compare
Prompt for your agent
Using trymirai/uzu, write a <Rust or TypeScript> CLI that streams a local reply to <prompt> and prints generated tokens, based on the README chat example.
Caveat. This card is written from the trymirai/uzu README, not from a test run by Deduped. Before you start, make sure you have Rust, Python, Swift or TypeScript. Check the repo for newer instructions before you rely on these steps.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for trymirai/uzu and "Stream local LLM replies in a Node or Rust app"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer