终端里的
AI 编程搭档
The AI coding partner
in your terminal

Rpi 是一个用 Rust 编写的终端 AI 编程助手:读代码、改文件、跑命令、管理会话,全都在你的终端里完成。项目源自 Pi Rpi is a terminal AI coding assistant written in Rust: it reads code, edits files, runs commands and manages sessions — all without leaving your terminal. The project originates from Pi.

curl -fsSL https://revpi.dev/install.sh | sh

x86_64 / aarch64,glibc 与 musl 自动识别(--musl 可强制);默认安装到 ~/.local/bin--prefix 可覆盖。 x86_64 / aarch64, glibc vs musl auto-detected (force with --musl); installs to ~/.local/bin by default, override with --prefix.

curl -fsSL https://revpi.dev/install.sh | sh

Apple silicon(aarch64);默认安装到 ~/.local/bin--prefix 可覆盖。 Apple silicon (aarch64); installs to ~/.local/bin by default, override with --prefix.

irm https://revpi.dev/install.ps1 | iex

x86_64,PowerShell;默认安装到 %LOCALAPPDATA%\Programs\rpi-Prefix 可覆盖。 x86_64, PowerShell; installs to %LOCALAPPDATA%\Programs\rpi by default, override with -Prefix.

全部平台下载后均做 SHA-256 完整性校验;GitHub 不可直连时自动回退官网镜像。也可从 GitHub Releases 手动下载,或从源码构建 Every download is SHA-256 integrity-checked on all platforms, with automatic fallback to the official-site mirror when GitHub is unreachable. You can also grab binaries manually from GitHub Releases or build from source.

MIT 开源MIT License Rust 单二进制Single Rust binary v0.1.0 38 家模型服务商38 model providers 插件可扩展Extensible
rpi — ~/develop/ai/rpi
ls crates/
rpi   rpi-agent   rpi-ai   rpi-tui   rpi-ext-host
分析一下本机的 CPU 和内存配置analyze this machine's CPU and memory
⠋ thinking… (level: high · 12s)
bashlscpu | grep -E 'Model name|Socket' && free -h
✓ 完成✓ Done · read / bash / edit 工具可用 · 16 轮上下文已压缩 · read / bash / edit tools available · 16 turns compacted
本机为 AMD Ryzen 7 8845HS(8 核 16 线程),内存 32 GB DDR5-5600(2×16 GB)。This machine runs an AMD Ryzen 7 8845HS (8 cores / 16 threads) with 32 GB DDR5-5600 (2×16 GB).
把这段分析写进 notes.md 并提交write this analysis into notes.md and commit it
edit notes.md · +12 −0 · git commit ✓

Features

为什么是 RpiWhy Rpi

一个趁手的终端编程助手该有的样子:启动快、看得懂你的项目、改得动你的代码,还能按你的习惯扩展。 Everything a handy terminal coding assistant should be: fast to start, aware of your project, able to change your code, and easy to extend.

Rust 单二进制Single Rust binary

编译产出是一个静态链接的可执行文件,不依赖 Node、Python 或任何运行时。拷到机器上就能跑,启动毫秒级。 Builds into one statically linked executable — no Node, no Python, no runtime at all. Copy it onto a machine and it just runs, with millisecond startup.

🖥️完整的终端体验A complete terminal UI

多轮对话、流式输出、代码语法高亮、斜杠命令、@ 模糊引用文件、会话树回看与分支——在终端里就是完整的工作台。 Multi-turn chat, streaming output, syntax highlighting, slash commands, @ fuzzy file references, and a session tree you can revisit and branch — a full workbench in your terminal.

🛠️真正能干活Gets real work done

内置读文件、改代码、执行命令等工具,长对话自动压缩上下文不中断;可以把会话导出成 HTML,或一键生成链接分享给同事。 Built-in tools for reading files, editing code and running commands, with automatic context compaction on long conversations. Export sessions to HTML or share them with a link.

☁️38 家模型服务商38 model providers

OpenAI、Anthropic、DeepSeek、Kimi、Google、Bedrock……开箱内置 38 家服务商的模型清单,填个 API Key 就能切换使用。 OpenAI, Anthropic, DeepSeek, Kimi, Google, Bedrock… model catalogs for 38 providers ship out of the box — add an API key and switch models anytime.

🔌插件可扩展Extensible with plugins

想用自己喜欢的语言写插件?Rpi 同时支持 WebAssembly 插件和原生动态库插件,挂载后无需重启即可热重载。 Write plugins in the language you like: Rpi supports both WebAssembly and native dynamic-library plugins, with hot reload — no restart required.

🔒隐私由你掌控Privacy under your control

不强制上传任何数据。模型目录、版本检查等网络请求都可以用环境变量逐项关闭,配置文件都在本机 ~/.rpi 目录下。 Nothing is uploaded unless you want it to be. Model catalog, version check and other requests can each be disabled via environment variables; all configuration stays local in ~/.rpi.

Quickstart

快速开始Quickstart

三分钟跑起来:一行命令安装,配上你的模型 Key,然后开始对话。 Up and running in three minutes: install with one command, add your model key, and start chatting.

1安装Install

# macOS / Linux
$ curl -fsSL https://revpi.dev/install.sh | sh

# Windows(PowerShell)
PS> irm https://revpi.dev/install.ps1 | iex
# macOS / Linux
$ curl -fsSL https://revpi.dev/install.sh | sh

# Windows (PowerShell)
PS> irm https://revpi.dev/install.ps1 | iex

也可以从源码构建:git clone https://github.com/revpidev/rpi.git && cd rpi && cargo build --release Or build from source: git clone https://github.com/revpidev/rpi.git && cd rpi && cargo build --release

2配置模型Configure a model

# 在 ~/.rpi/agent/models.json 里加入你的 Key(以 DeepSeek 为例)
{"providers": {"deepseek": {
  "apiKey": "DEEPSEEK_API_KEY",
  "models": [{"id": "deepseek-v4-flash"}]}}}
# Add your key in ~/.rpi/agent/models.json (DeepSeek example)
{"providers": {"deepseek": {
  "apiKey": "DEEPSEEK_API_KEY",
  "models": [{"id": "deepseek-v4-flash"}]}}}

3开始使用Start using it

$ rpi                        # 交互模式:边聊边改
$ rpi --print "重构这个函数"    # 一次性问答,适合脚本
$ rpi --rpc                  # RPC 模式:给其他程序调用
$ rpi                           # interactive: chat and edit
$ rpi --print "refactor this"   # one-shot, script-friendly
$ rpi --rpc                     # RPC mode for other programs

4(可选)关掉网络请求(Optional) Disable requests

# 不需要模型目录更新 / 版本检查时,逐项关闭:
$ export RPI_MODEL_CATALOG_URL=off
$ export RPI_VERSION_CHECK_URL=off
$ export RPI_TELEMETRY_URL=off
# Turn off catalog updates / version checks individually:
$ export RPI_MODEL_CATALOG_URL=off
$ export RPI_VERSION_CHECK_URL=off
$ export RPI_TELEMETRY_URL=off