DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to stream local LLM replies in a Node or Rust app with Uzu

Use Uzu's TypeScript or Rust API to stream chat replies and count generated tokens.

Short answer: For Node, run pnpm add @trymirai/uzu@0.6.13; for Rust, add the Uzu git dependency to Cargo.toml; then 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. All steps.

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

  1. For Node, run pnpm add @trymirai/uzu@0.6.13; for Rust, add the Uzu git dependency to Cargo.toml
  2. Create the engine and download the model as in the quick start
  3. In Rust, call reply_with_stream and handle the Replies and Error chunks
  4. Print the generated token count from the reply stats
  5. Run the bundled examples with cargo tools example to 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

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer