<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Huiyu</title>
    <description>The latest articles on DEV Community by Huiyu (@huiyu9144).</description>
    <link>https://dev.to/huiyu9144</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3964956%2F334e52ce-151c-40f5-9ca0-b96a27731f93.jpg</url>
      <title>DEV Community: Huiyu</title>
      <link>https://dev.to/huiyu9144</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/huiyu9144"/>
    <language>en</language>
    <item>
      <title>Huiyu Pi,AI coding agent, stripped to essentials.</title>
      <dc:creator>Huiyu</dc:creator>
      <pubDate>Tue, 02 Jun 2026 19:04:27 +0000</pubDate>
      <link>https://dev.to/huiyu9144/huiyu-piai-coding-agent-stripped-to-essentials-7jc</link>
      <guid>https://dev.to/huiyu9144/huiyu-piai-coding-agent-stripped-to-essentials-7jc</guid>
      <description>&lt;p&gt;Huiyu Pi&lt;br&gt;
&lt;a href="http://www.huiyu.ai" rel="noopener noreferrer"&gt;www.huiyu.ai&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🇨🇳 中文 · 🇯🇵 日本語 · 🇰🇷 한국어 · 🇪🇸 Español · 🇫🇷 Français · 🇩🇪 Deutsch · 🇧🇷 Português · 🇷🇺 Русский · 🇸🇦 العربية&lt;/p&gt;

&lt;p&gt;~80 tokens ~0.3s 90%+ cheaper Local License Stars Forks Issues Release&lt;/p&gt;

&lt;p&gt;AI coding agent, stripped to essentials.&lt;br&gt;
~80 tokens system prompt · ~0.3s first token · 4 basic tools · 100% local&lt;/p&gt;

&lt;p&gt;Huiyu Pi webUI, A local open-source Agent tool that lets you build your own Harness system from scratch. Built on Pi and pi-forge, compared to IDE tools like Codex and Claude Code, context is reduced to nearly 0 with massive speed improvements. Build cleanly without platform restrictions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fss2iqs7krvymhha2tj9m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fss2iqs7krvymhha2tj9m.png" alt=" " width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxl0cw9r8ddw9ir16706l.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxl0cw9r8ddw9ir16706l.jpg" alt=" " width="799" height="432"&gt;&lt;/a&gt;&lt;br&gt;
Huiyu Pi Screenshot&lt;br&gt;
Huiyu Pi Demo&lt;br&gt;
Session Management  Integrated Terminal&lt;br&gt;
File Browser + Editor   Git Integration&lt;br&gt;
Why ~80 Tokens?&lt;br&gt;
Most AI coding tools pack 15,000–28,000 tokens into every request — rules, tool definitions, role prompts, output formatting. The AI spends most of its attention reading boilerplate instead of solving your problem.&lt;/p&gt;

&lt;p&gt;Huiyu Pi takes the opposite approach: strip everything non-essential. 4 basic tools. Clean canvas. No baggage.&lt;/p&gt;

&lt;p&gt;Before (typical)    Huiyu Pi&lt;br&gt;
System prompt overhead  15K–28K tokens    ~80 tokens&lt;br&gt;
First token response    2–10 seconds  ~0.3 seconds&lt;br&gt;
Per-request cost    0.02–&lt;br&gt;
0.10+   90%+ cheaper&lt;br&gt;
Tool definitions    10–24+    4 essentials&lt;br&gt;
Client type Heavy desktop / Electron    Pure Web UI&lt;br&gt;
Data privacy    Cloud or hybrid 100% local&lt;br&gt;
Why Choose Huiyu Pi?&lt;br&gt;
Built on pi and pi-forge, fixing their lack of a frontend WebUI and clunky interaction details. Huiyu Pi is a browser-based webui for the pi coding agent — it's blazing fast and feels great to use — that's why I'm sharing it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faefjmrp8g5ygxou85kgv.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faefjmrp8g5ygxou85kgv.gif" alt=" " width="600" height="338"&gt;&lt;/a&gt;&lt;br&gt;
Advantage   Details&lt;br&gt;
⚡ Faster Performance  Default context and prompts compressed from ~20K tokens to near zero. AI response time is dramatically shorter.&lt;br&gt;
💰    Lower Token Consumption Most unused context stripped away, drastically reducing per-request API costs.&lt;br&gt;
🎯    Less Context, More Focus    Less context = AI stays focused on core instructions for more precise execution.&lt;br&gt;
🔒    Local Deployment = Safe Fully local — API keys and data never leave your machine. Zero data leak risk.&lt;br&gt;
🏗️ Build Your AI Empire    Build your own Harness and Agent from scratch. Full control, fully customizable.&lt;br&gt;
🛠️ Fixing the Original's Gaps  Fixes pi's lack of WebUI and pi-forge's interaction issues. Blazing fast, incredibly smooth.&lt;br&gt;
Quick Start&lt;br&gt;
npx huiyu-pi&lt;br&gt;
Open &lt;a href="http://localhost:9144" rel="noopener noreferrer"&gt;http://localhost:9144&lt;/a&gt; in your browser, go to Settings → Providers, enter your API key, and start chatting.&lt;/p&gt;

&lt;p&gt;Also available as global npm install, manual clone, or platform scripts — see Installation below.&lt;/p&gt;

&lt;p&gt;Features&lt;br&gt;
🔐 Self-hosted &amp;amp; Private&lt;br&gt;
Your code, API keys, and conversation history stay on your own machine. No cloud, no third party, no data leakage.&lt;/p&gt;

&lt;p&gt;🧠 Multi-LLM Support&lt;br&gt;
Works with Anthropic Claude, OpenAI GPT/o1/o3, DeepSeek, Google Gemini, Mistral, Groq, xAI, OpenRouter, and more — including local models.&lt;/p&gt;

&lt;p&gt;📁 Full File Management&lt;br&gt;
Built-in file browser with CodeMirror editor supporting 10+ languages. Create, edit, search files right in the browser.&lt;/p&gt;

&lt;p&gt;🖥️ Integrated Terminal&lt;br&gt;
Full terminal emulator via xterm.js + WebSocket. Multiple tabs, reconnect support, resizable layout.&lt;/p&gt;

&lt;p&gt;🔀 Git Integration&lt;br&gt;
View diffs, stage changes at hunk level, explore commit history with git-graph — all from the browser.&lt;/p&gt;

&lt;p&gt;🔌 MCP Protocol Support&lt;br&gt;
Connect external MCP servers and expose their tools to your coding agent. Supports both global and project-level configurations.&lt;/p&gt;

&lt;p&gt;📱 Mobile-friendly + PWA&lt;br&gt;
Responsive design works on iOS/Android. Install as a PWA for a native-like experience.&lt;/p&gt;

&lt;p&gt;🎨 Fully Customizable Theme&lt;br&gt;
Dark and light themes controlled by CSS variables. Create your own skin without rebuilding.&lt;/p&gt;

&lt;p&gt;Installation&lt;br&gt;
Prerequisites: Node.js ≥ 20 (download). Build tools required for terminal support: install Visual Studio Build Tools (Windows), xcode-select --install (macOS), or build-essential (Linux). The chat and file browser work without build tools — only the terminal tab requires them.&lt;/p&gt;

&lt;p&gt;Option A: npx (no install, runs once)&lt;br&gt;
npx huiyu-pi&lt;br&gt;
Downloads and runs the latest version. Subsequent npx huiyu-pi calls use the cached version. To force an update: npx huiyu-pi@latest.&lt;/p&gt;

&lt;p&gt;Option B: Global install (faster subsequent launches)&lt;br&gt;
npm install -g huiyu-pi&lt;br&gt;
huiyu-pi                    # start server&lt;br&gt;
huiyu-pi --help             # show all flags&lt;br&gt;
huiyu-pi --port 4000        # custom port&lt;br&gt;
huiyu-pi --workspace-path ~/Code  # custom workspace&lt;br&gt;
To update: npm update -g huiyu-pi. To uninstall: npm uninstall -g huiyu-pi.&lt;/p&gt;

&lt;p&gt;Option C: Platform scripts (clone + run)&lt;br&gt;
Clone the repo, then run the start script for your platform:&lt;/p&gt;

&lt;p&gt;Platform    Command&lt;br&gt;
Windows Double-click start.bat, or run in PowerShell: .\start.bat&lt;br&gt;
macOS / Linux   Open Terminal, cd into the repo, then bash start.sh&lt;br&gt;
The start script handles everything: npm install → build server → build client → start. First run takes a few minutes; subsequent runs are fast.&lt;/p&gt;

&lt;p&gt;LAN access (share on your local network):&lt;/p&gt;

&lt;p&gt;Platform    Command&lt;br&gt;
Windows .\start-lan.bat&lt;br&gt;
macOS / Linux   bash start-lan.sh&lt;br&gt;
Or via flag: huiyu-pi --host 0.0.0.0&lt;/p&gt;

&lt;p&gt;⚠️ Security: Binding to 0.0.0.0 exposes the agent's shell and filesystem to everyone on your network. Only use on trusted private networks.&lt;/p&gt;

&lt;p&gt;Option D: Manual (development)&lt;br&gt;
git clone &lt;a href="https://github.com/huiyu9144/Huiyu-Pi.git" rel="noopener noreferrer"&gt;https://github.com/huiyu9144/Huiyu-Pi.git&lt;/a&gt;&lt;br&gt;
cd Huiyu-Pi&lt;br&gt;
npm install          # install all dependencies (first time may take a few minutes)&lt;br&gt;
npm run dev          # start dev server with HMR (&lt;a href="http://localhost:9145" rel="noopener noreferrer"&gt;http://localhost:9145&lt;/a&gt;)&lt;br&gt;
For production builds:&lt;/p&gt;

&lt;p&gt;npm run build        # build server + client&lt;br&gt;
npm run start        # start production server on port 9144&lt;br&gt;
Option E: Docker (recommended for production)&lt;br&gt;
Pull from registry (no clone needed):&lt;/p&gt;

&lt;p&gt;docker run -d \&lt;br&gt;
  --name huiyu-pi \&lt;br&gt;
  -p 9144:9144 \&lt;br&gt;
  -v ~/.pi/agent:/home/pi/.pi/agent \&lt;br&gt;
  -v ~/.huiyu-pi:/home/pi/.huiyu-pi \&lt;br&gt;
  -v $(pwd)/workspace:/workspace \&lt;br&gt;
  ghcr.io/huiyu9144/huiyu-pi:latest&lt;br&gt;
Or build locally (for customization):&lt;/p&gt;

&lt;p&gt;git clone &lt;a href="https://github.com/huiyu9144/Huiyu-Pi.git" rel="noopener noreferrer"&gt;https://github.com/huiyu9144/Huiyu-Pi.git&lt;/a&gt;&lt;br&gt;
cd Huiyu-Pi/docker&lt;br&gt;
cp .env.example .env&lt;br&gt;
docker compose up -d --build&lt;br&gt;
Open &lt;a href="http://localhost:9144" rel="noopener noreferrer"&gt;http://localhost:9144&lt;/a&gt; in your browser.&lt;/p&gt;

&lt;p&gt;Custom UID/GID (fix permission issues on bind mounts):&lt;/p&gt;

&lt;p&gt;docker compose build --build-arg PUID=$(id -u) --build-arg PGID=$(id -g)&lt;br&gt;
docker compose up -d&lt;br&gt;
For detailed Docker configuration, see docker/README.md.&lt;/p&gt;

&lt;p&gt;API Key Setup&lt;br&gt;
Huiyu Pi manages provider API keys through the Settings UI and stores them in ~/.pi/agent/auth.json (shared with the pi CLI if installed). Keys are never exposed to the browser — the server holds them in memory and proxies all LLM requests.&lt;/p&gt;

&lt;p&gt;Via Settings UI (Recommended)&lt;br&gt;
Open &lt;a href="http://localhost:9144" rel="noopener noreferrer"&gt;http://localhost:9144&lt;/a&gt;&lt;br&gt;
Go to Settings → Providers&lt;br&gt;
Select your provider (Anthropic, OpenAI, DeepSeek, etc.)&lt;br&gt;
Paste your API key and save&lt;br&gt;
Supported providers&lt;br&gt;
Anthropic Claude, OpenAI GPT/o1/o3, DeepSeek, Google Gemini, Mistral, Groq, xAI, OpenRouter, and any OpenAI-compatible endpoint (vLLM, LiteLLM, Ollama, etc.).&lt;/p&gt;

&lt;p&gt;Custom OpenAI-compatible providers&lt;br&gt;
For self-hosted or third-party endpoints, create ~/.pi/agent/models.json:&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
  "custom-gateway": {&lt;br&gt;
    "protocol": "openai",&lt;br&gt;
    "url": "&lt;a href="http://localhost:11434/v1" rel="noopener noreferrer"&gt;http://localhost:11434/v1&lt;/a&gt;",&lt;br&gt;
    "models": ["qwen2.5-coder-32b"]&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
Then add the API key in Settings → Providers → custom-gateway.&lt;/p&gt;

&lt;p&gt;CLI flag (for scripts / CI)&lt;br&gt;
huiyu-pi --api-key @/path/to/api-key.txt&lt;br&gt;
The @ prefix reads the key from a file. Useful for CI pipelines and Docker secrets.&lt;/p&gt;

&lt;p&gt;Configuration&lt;br&gt;
All settings can be controlled via CLI flags, environment variables, or config files. CLI flags take priority over env vars, which take priority over config files.&lt;/p&gt;

&lt;p&gt;CLI flags&lt;br&gt;
Flag    Description Default&lt;br&gt;
--port  Server port 9144&lt;br&gt;
--host  Bind address    127.0.0.1&lt;br&gt;
--workspace-path    Root directory for projects ~/huiyu-pi-workspace&lt;br&gt;
--api-key   Static API key (&lt;a class="mentioned-user" href="https://dev.to/file"&gt;@file&lt;/a&gt; syntax supported) —&lt;br&gt;
--ui-password   Browser login password  —&lt;br&gt;
--jwt-secret    JWT signing key (auto-generated if unset)   —&lt;br&gt;
--log-level Log level: fatal error warn info debug trace    info&lt;br&gt;
--no-expose-docs    Hide Swagger UI from the browser    docs exposed&lt;br&gt;
--help  Show all flags  —&lt;br&gt;
Environment variables&lt;br&gt;
Variable    Description&lt;br&gt;
PORT    Server port&lt;br&gt;
HOST    Bind address (0.0.0.0 for LAN)&lt;br&gt;
WORKSPACE_PATH  Root directory for projects&lt;br&gt;
API_KEY Static API key&lt;br&gt;
UI_PASSWORD Browser login password&lt;br&gt;
JWT_SECRET  JWT signing key&lt;br&gt;
LOG_LEVEL   Log level&lt;br&gt;
EXPOSE_DOCS Set to false to hide Swagger UI&lt;br&gt;
FORGE_DATA_DIR  Override state directory (default ~/.huiyu-pi/)&lt;br&gt;
Config files&lt;br&gt;
File    Purpose&lt;br&gt;
~/.pi/agent/auth.json   Provider API keys (managed via Settings UI)&lt;br&gt;
~/.pi/agent/settings.json   Agent settings (model, thinking level, etc.)&lt;br&gt;
~/.pi/agent/models.json Custom OpenAI-compatible providers&lt;br&gt;
~/.huiyu-pi/mcp.json    Global MCP server configuration&lt;br&gt;
Customization&lt;br&gt;
The theme is controlled by CSS custom properties in packages/client/src/index.css:&lt;/p&gt;

&lt;p&gt;:root {&lt;br&gt;
  --bg-primary: #0a0a0a;&lt;br&gt;
  --accent: #60A5FA;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;html[data-theme="light"] {&lt;br&gt;
  --bg-primary: #ffffff;&lt;br&gt;
  --accent: #2563EB;&lt;br&gt;
}&lt;br&gt;
Tech Stack&lt;br&gt;
Layer   Technologies&lt;br&gt;
Frontend    React 19, TypeScript 6, Vite 8, Tailwind CSS v4, Zustand, CodeMirror 6&lt;br&gt;
Backend Fastify 5, WebSocket, SSE, JWT&lt;br&gt;
Terminal    xterm.js + node-pty&lt;br&gt;
Infrastructure  GitHub Actions CI/CD&lt;br&gt;
Community&lt;br&gt;
💬 Join our Discord&lt;br&gt;
⭐ Star us on GitHub&lt;br&gt;
🌐 Visit our Website&lt;br&gt;
Contributing&lt;br&gt;
We welcome contributions! See CONTRIBUTING.md for guidelines.&lt;/p&gt;

&lt;p&gt;Acknowledgments&lt;br&gt;
Built on top of two open-source projects:&lt;/p&gt;

&lt;p&gt;pi-forge by Devin Marks and contributors&lt;br&gt;
pi by earendil-works and contributors&lt;br&gt;
Author&lt;br&gt;
Follow the author on X (Twitter): @huiyu91444&lt;/p&gt;

&lt;p&gt;License&lt;br&gt;
MIT — see the upstream projects for their licenses:&lt;/p&gt;

&lt;p&gt;pi-forge&lt;br&gt;
pi&lt;br&gt;
Copyright (c) 2026 Huiyu Pi contributors Copyright (c) 2026 Devin Marks and pi-forge contributors Copyright (c) 2026 earendil-works and pi contributors&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>opensource</category>
      <category>programming</category>
    </item>
    <item>
      <title>I built Huiyu Pi — a self-hosted AI coding agent that starts at ~80 tokens.</title>
      <dc:creator>Huiyu</dc:creator>
      <pubDate>Tue, 02 Jun 2026 15:46:10 +0000</pubDate>
      <link>https://dev.to/huiyu9144/i-built-huiyu-pi-a-self-hosted-ai-coding-agent-that-starts-at-80-tokens-2jbe</link>
      <guid>https://dev.to/huiyu9144/i-built-huiyu-pi-a-self-hosted-ai-coding-agent-that-starts-at-80-tokens-2jbe</guid>
      <description>&lt;p&gt;I've been frustrated with AI coding tools that load 15K-28K tokens of system prompts before you can even ask a question. The AI spends most of its attention reading the manual, not solving your code.&lt;/p&gt;

&lt;p&gt;So I built Huiyu Pi — a self-hosted AI coding agent that starts at ~80 tokens.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Browser-based IDE (no heavy Electron app)&lt;/li&gt;
&lt;li&gt;~80 tokens system prompt (not 20K)&lt;/li&gt;
&lt;li&gt;~0.3s first token response&lt;/li&gt;
&lt;li&gt;90%+ cheaper per request&lt;/li&gt;
&lt;li&gt;100% local — your code, API keys, conversations never leave your machine&lt;/li&gt;
&lt;li&gt;Multi-LLM: Claude, GPT, DeepSeek, Gemini, Mistral, Groq, xAI, OpenRouter&lt;/li&gt;
&lt;li&gt;Built-in terminal, file editor, Git integration&lt;/li&gt;
&lt;li&gt;PWA support (works on mobile)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How to try:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;npx huiyu-pi&lt;/p&gt;

&lt;p&gt;Then open &lt;a href="http://localhost:9144" rel="noopener noreferrer"&gt;http://localhost:9144&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tech stack:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frontend: React 19, TypeScript, Vite, Tailwind CSS&lt;/li&gt;
&lt;li&gt;Backend: Fastify, WebSocket, SSE&lt;/li&gt;
&lt;li&gt;Terminal: xterm.js + node-pty&lt;/li&gt;
&lt;li&gt;License: MIT&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/huiyu9144/Huiyu-Pi" rel="noopener noreferrer"&gt;https://github.com/huiyu9144/Huiyu-Pi&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would love feedback from the self-hosted community!&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>llm</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
