# fk-peri-code
**Repository Path**: g-aicoder/fk-peri-code
## Basic Information
- **Project Name**: fk-peri-code
- **Description**: 13 MB binary, ~50 MB of RAM, 98% cache hits; 99% AI-generated, docs/superpowers/specs, mattpocock/skills, peri web
- **Primary Language**: Rust
- **License**: Apache-2.0
- **Default Branch**: main
- **Homepage**: https://github.com/KonghaYao/peri
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2026-07-02
- **Last Updated**: 2026-07-02
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Peri Code
**A Rust-built coding agent β fast, lean, Claude Code compatible, any LLM.**
[](https://opensource.org/licenses/Apache-2.0)
[](https://www.rust-lang.org/)
[](#install)
[](#why-peri)
[](https://github.com/konghayao/peri)
One **13 MB binary**, **~50 MB of RAM**, **98% cache hits**. Bring your own API key β DeepSeek, GLM, Qwen, or Anthropic, switch on the fly. Your existing Claude Code config works today, not eventually: skills, hooks, MCP, plugins, sub-agents. **Zero migration, zero lock-in.**
99% of the codebase was written by AI (DeepSeek & GLM-5.2), shipped by humans who decided *what* to build. The agent files its own bugs, fixes them, and writes the lessons back into the repo. More on that [below](#built-by-ai-published-by-human).
---
## Why Peri
- π¦ **Rust, not Node.js**
- 13 MB binary, ~50 MB RAM. Won't sneak up to 1 GB while you're not looking
- β‘ **95β99% cache hit rate**
- Frozen system prompt + boundary marker = near-zero wasted tokens
- π **Any LLM**
- Anthropic, OpenAI, DeepSeek, GLM, Qwen. Swap mid-session, no restart
- πͺ **Cross-platform**
- macOS, Linux, Windows β one binary. ConPTY-aware event handling, unified overlay textarea, cross-platform spawn
- π **Drop-in Claude Code compatible**
- Existing Claude Code config just works. Skills, hooks, MCP, plugins β zero migration
- π **Tool Search**
- The LLM only sees what it needs. ~14 core tools, rest discovered on demand β lean prompts, fat cache hits
- π **Streaming Markdown**
- Code blocks, tables, diffs β fully rendered as the agent types, not after
- π€ **Sub-agents & background agents**
- 7 built-in specialists (coder, explorer, code-reviewer, web-researcherβ¦). Fork work to the background and keep going
- ποΈ **Auto Compact**
- Hours-long sessions stay fast and cheap, automatically
- π¦ **agm**
- `agm install` any skill or agent. One lockfile, any tool
- π **Web Terminal (`peri web`)**
- Browser-based remote shell, one command. xterm.js + multi-pane split, auto open browser
- π§ **Built-in LSP & observability**
- Language-aware intelligence out of the box. Langfuse traces, token usage, cache monitor
---
## Architecture
Peri is not just a TUI. It's a layered platform where the **agent core** is decoupled from the **frontend** via the [Agent Client Protocol](https://agentclientprotocol.com). The same core powers three entry points:
```mermaid
graph TD
TUI["**peri-tui**
Terminal (ratatui)"]
IDE["**Zed / JetBrains**
IDE (ACP client)"]
STDIO["**Stdio**
Headless / CI / Cloud"]
TUI -->|MpscTransport| ACP
IDE -->|ACP Stdio| ACP
STDIO -->|ACP Stdio| ACP
ACP["**peri-acp** β ACP Server
session Β· executor Β· prompt Β· commands"]
ACP --> AGENT["**peri-agent**
ReAct loop Β· LLM adapter Β· tools Β· SQLite storage"]
ACP --> MW["**peri-middlewares**
18 middlewares: FS Β· HITL Β· SubAgent Β· Skills Β· MCP Β· Hooks Β· Compact"]
ACP --> LSP["**peri-lsp**
LSP client"]
AGENT -.->|telemetry| LF["**langfuse-client**"]
MW -.->|renders with| WIDGETS["**peri-widgets**
Markdown Β· code blocks Β· tables"]
```
**One core, three frontends.** Terminal users get `peri-tui`. IDE users connect via ACP (Zed today, more to come). Headless / CI / cloud scenarios use the Stdio transport. Change the agent logic once β every frontend benefits.
---
## Install
Binaries available for macOS (x86_64 / Apple Silicon), Linux (x86_64 / aarch64 / riscv64), and Windows (x86_64).
```bash
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/konghayao/peri/main/scripts/install.sh | bash
# Windows (PowerShell)
irm https://raw.githubusercontent.com/konghayao/peri/main/scripts/install.ps1 | iex
# start peri
peri
# self-update
peri update
```
First launch guides you through model and API key configuration β no config file editing required.
---
## Built by AI, Published by Human
Peri's code is 99% AI-generated, primarily by DeepSeek and GLM-5.2. The development workflow is a closed loop the agent drives itself:
| When you... | The loop kicks off |
|---|---|
| **Find a bug or tech debt** | `issue-create` β `systematic-debugging` β `writing-plans` β `subagent-driven-development` β `issue-archive` β update `CLAUDE.md` |
| **Want a new feature** | `grill-me` β `writing-plans` β `subagent-driven-development` |
| **Codebase getting messy** | `slop-cleaner` β `improve-codebase-architecture` β `writing-plans` β `subagent-driven-development` |
Each fix that reveals a non-obvious constraint gets written back into `CLAUDE.md` as a **TRAP** β a hard rule the agent follows on every subsequent iteration. The dozens of TRAPs in the repo weren't authored by humans; they were extracted by the agent at the scene of each bug. That's how quality compounds without human code review.
β Read the full story: [Nobody Coding](docs/blogs/ai-coding-paradigm/nobody-coding.md)
---
---
## Acknowledgments
- [Claude Code Best](https://github.com/claude-code-best/claude-code) β community support and feedback
- [Superpowers](https://github.com/obra/superpowers) & [Matt Pocock's Skills](https://github.com/mattpocock/skills) β the skill suites that drive Peri's AI engineering workflow
- [ACP](https://agentclientprotocol.com) β open protocol for agent-IDE communication
- [rmcp](https://github.com/anthropics/rmcp) β Rust MCP client library
- [Ratatui](https://ratatui.rs) & [Tokio](https://tokio.rs)
- [Langfuse](https://langfuse.com) β LLM observability
- [Zed](https://zed.dev) β first ACP-compatible IDE
## License
Apache 2.0