fairpeer

module
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2026 License: MIT

README ยถ

fairpeer

English ย ยทย  ็ฎ€ไฝ“ไธญๆ–‡ ย ยทย  User Guide ย ยทย  Architecture Spec

Version 0.1.5 CI license GitHub stars


Universal Multi-Vendor AI Coding Assistant + Office Automation Platform.

Connect to 18 vendors (11 direct + 7 Coding Plan aggregators), 300+ models.
Built-in Word/Excel/PPT office automation capabilities.
Single static Go binary, zero runtime dependencies, seamless cross-platform coverage.


What is fairpeer?

fairpeer is a universal AI coding assistant that supports 11 direct vendors and 7 Coding Plan aggregator platforms, providing complete office automation capabilities.

Core Features

  • ๐ŸŒ Multi-Vendor Support โ€” 18 vendors, unified configuration management
  • ๐Ÿ’ป Code Editing โ€” 5 editing strategies + 5-level fuzzy matching + checkpoint rollback
  • ๐Ÿ“„ Office Automation โ€” Full Word/Excel/PPT support
  • ๐Ÿง  Smart Memory โ€” Two-layer long-term memory + Dream agent + RAG knowledge base
  • ๐ŸŽฏ Task Orchestration โ€” Auto-plan + Goal mode + Expert teams
  • ๐Ÿ”ง Plugin System โ€” Markdown Skill + MCP plugins
  • ๐Ÿ“ท Screenshot Solver โ€” One-hotkey exam assistant, AI reads screen and answers

๐Ÿš€ Quick Start

Installation

# macOS / Linux
curl -fsSL https://fairpeer.dev/install.sh | bash

# Windows (PowerShell)
irm https://fairpeer.dev/install.ps1 | iex

# Or download from GitHub Releases
# https://github.com/zzycxz/fairpeer/releases

Configuration

# Initialize configuration
fairpeer setup

# Or manually edit config file
vim ~/.config/fairpeer/fairpeer.toml

Run

# Start interactive chat
fairpeer

# Execute a single task
fairpeer run "Help me write a Hello World"

# Start desktop app
fairpeer-desktop

๐ŸŒ Supported Vendors

Direct Vendors (11)

Vendor Base URL Default Model
Qwen https://dashscope.aliyuncs.com/compatible-mode/v1 qwen3.7-max
DeepSeek https://api.deepseek.com deepseek-v4-pro
Volcengine https://ark.cn-beijing.volces.com/api/v3 doubao-seed-evolving
Zhipu AI https://open.bigmodel.cn/api/paas/v4 glm-5.2
MiniMax https://api.minimaxi.com/v1 minimax-m3
Moonshot https://api.moonshot.cn/v1 kimi-k3
MiMo https://api.xiaomimimo.com/v1 mimo-v2.5-pro
StepFun https://api.stepfun.com/v1 step-3.7-flash
iFlytek MaaS https://spark-api-open.xf-yun.com/v1 glm-5.2
Anthropic https://api.anthropic.com claude-sonnet-5
OpenAI https://api.openai.com/v1 gpt-5.6-terra

Coding Plan Aggregators (7)

Platform Base URL Description
Qwen Coding https://coding.dashscope.aliyuncs.com/v1 Aggregates qwen/kimi/glm/minimax
Zhipu GLM Coding https://open.bigmodel.cn/api/coding/paas/v4 GLM series
Volcengine Coding https://ark.cn-beijing.volces.com/api/coding/v3 Aggregates doubao/deepseek/kimi
Baidu Qianfan https://qianfan.baidubce.com/v2/coding Aggregates ernie/glm/kimi/deepseek
Tencent TokenHub https://api.lkeap.cloud.tencent.com/coding/v1 Aggregates deepseek/glm/kimi/minimax
StepFun Step Plan https://api.stepfun.com/step_plan/v1 step series
iFlytek MaaS Coding https://maas-token-api.cn-huabei-1.xf-yun.com/v2 Unified model ID

๐Ÿ“„ Office Automation

Word Documents

# Create Word document
fairpeer run "Create a project report.docx with title, paragraphs and tables"

# Insert images
fairpeer run "Insert logo.png into report.docx"

# Generate table of contents
fairpeer run "Generate table of contents for report.docx"

Excel Spreadsheets

# Create Excel spreadsheet
fairpeer run "Create sales_data.xlsx with months and sales"

# Add charts
fairpeer run "Add bar chart to sales_data.xlsx"

# Add conditional formatting
fairpeer run "Add conditional formatting to sales column in sales_data.xlsx"

PowerPoint Presentations

# Create PPT
fairpeer run "Create a presentation about AI"

# Use template
fairpeer run "Create PPT using template, topic is digital transformation"

# Add animation
fairpeer run "Add fade-in animation to PPT"

๐Ÿง  Smart Memory System

Long-term Memory

FairPeer supports two-layer long-term memory:

  1. Document Layer โ€” fairpeer.md file, automatically loaded into context
  2. Auto Memory โ€” Dream agent automatically consolidates knowledge

RAG Knowledge Base

# Import documents
fairpeer run "Import this PDF into knowledge base"

# Search knowledge base
fairpeer run "Search for authentication system knowledge"

# Answer questions using knowledge base
fairpeer run "Answer this technical question using knowledge base"

๐ŸŽฏ Task Orchestration

Auto-plan (Automatic Planning)

# Complex tasks automatically trigger planning
fairpeer run "Refactor authentication module, add JWT support, write unit tests"
# โ†’ Auto plan โ†’ User approval โ†’ Execute

Goal (Goal Mode)

# Autonomous execution until completion
fairpeer goal "Fix all TypeScript errors"
# โ†’ Autonomous work โ†’ Detect blockers โ†’ Complete/Report

Expert Teams

# Multi-expert collaboration
fairpeer team review "Review this PR"
# โ†’ Security expert + Performance expert + Architecture expert โ†’ Comprehensive report

๐Ÿ”ง Plugin System

Skills

# List available skills
fairpeer skill list

# Install skill
fairpeer skill install code-review

# Create custom skill
fairpeer skill new my-skill

MCP Plugins

# fairpeer.toml
[[plugins]]
name = "my-mcp-server"
type = "stdio"
command = "node"
args = ["server.js"]

โš™๏ธ Configuration

Config File Locations

~/.config/fairpeer/fairpeer.toml    # Global config
./fairpeer.toml                     # Project config
./.env                              # Environment variables

Configuration Example

# Default model
default_model = "deepseek/deepseek-v4-pro"

# Provider configuration
[[providers]]
name = "deepseek"
kind = "openai"
base_url = "https://api.deepseek.com"
api_key_env = "DEEPSEEK_API_KEY"
default = "deepseek-v4-pro"
fast_model = "deepseek-v4-flash"
context_window = 1000000

# Context management
[agent]
soft_compact_ratio = 0.5
compact_ratio = 0.8
compact_force_ratio = 0.9

# Office automation
[cowork]
vlm_model = "openai/gpt-4o"
screenshot_vlm_model = "openai/gpt-4o"

๐Ÿ› ๏ธ Development

Build

# Clone repository
git clone https://github.com/zzycxz/fairpeer.git
cd fairpeer

# Install dependencies
go mod download

# Build CLI
go build -o fairpeer ./cmd/fairpeer

# Build desktop app
cd desktop
wails build

Test

# Run all tests
go test ./...

# Run specific tests
go test ./internal/config/...

๐Ÿ“š Documentation

Reference Content
User Guide Permissions, sandbox, MCP plugins, slash commands, @ syntax, Plan mode
Architecture Spec Engineering contract: system architecture, registry mechanism, data types
Features Complete feature panorama, architecture diagram, capability matrix
Office Automation Word/Excel/PPT automation, email integration, calendar tasks
RAG Knowledge Base Document import, knowledge graph, entity extraction, semantic search
Expert Teams Multi-model collaboration, team configuration, collaboration modes
Contributing Developer guide: how to add new tools, providers, and bot channels
Changelog Historical release records and feature iterations

๐Ÿ’ฐ Sponsorship

If you find FairPeer useful, please consider sponsoring us. Your support will be used for:

  • ๐Ÿค– Token purchases for development and testing
  • ๐Ÿš€ Feature development and maintenance
  • ๐Ÿ“š Documentation improvements

PayPal

PayPal

Alipay

Alipay QR Code

๐Ÿค Contributing

Contributions are welcome! Please see CONTRIBUTING.md.


๐Ÿ“„ License

MIT License - see LICENSE



FairPeer โ€” The most powerful universal multi-vendor AI coding assistant!

Directories ยถ

Path Synopsis
benchmarks
context-maintenance-e2e command
Drives the context-maintenance E2E scenarios against a real LLM API: seed โ†’ (idle past cache TTL) โ†’ resume A/B-compares cold-restart miss tokens with and without pruning.
Drives the context-maintenance E2E scenarios against a real LLM API: seed โ†’ (idle past cache TTL) โ†’ resume A/B-compares cold-restart miss tokens with and without pruning.
cmd
cua-replay command
Command cua-replay is a debugging tool for the CUA (Computer-Use Agent) vision loop.
Command cua-replay is a debugging tool for the CUA (Computer-Use Agent) vision loop.
e2ebench command
e2ebench runs the committed e2e task suite against a real provider and emits a markdown + JSON report (accuracy, cache-hit rate, token use, cost) for a PR.
e2ebench runs the committed e2e task suite against a real provider and emits a markdown + JSON report (accuracy, cache-hit rate, token use, cost) for a PR.
fairpeer command
Command fairpeer is a config- and plugin-driven coding agent CLI.
Command fairpeer is a config- and plugin-driven coding agent CLI.
fairpeer-plugin-example command
Command fairpeer-plugin-example is a reference fairpeer plugin: a minimal MCP stdio server speaking newline-delimited JSON-RPC 2.0 on stdin/stdout.
Command fairpeer-plugin-example is a reference fairpeer plugin: a minimal MCP stdio server speaking newline-delimited JSON-RPC 2.0 on stdin/stdout.
desktop module
internal
acp
Package acp implements the Agent Client Protocol (https://agentclientprotocol.com) transport: a stdio JSON-RPC 2.0 agent that editors and other host clients speak to drive fairpeer.
Package acp implements the Agent Client Protocol (https://agentclientprotocol.com) transport: a stdio JSON-RPC 2.0 agent that editors and other host clients speak to drive fairpeer.
agent
Package agent wires a Provider, a tool Registry, and a Session into the harness loop that drives a coding task to completion.
Package agent wires a Provider, a tool Registry, and a Session into the harness loop that drives a coding task to completion.
agent/testutil
Package testutil provides reusable test helpers for the agent package.
Package testutil provides reusable test helpers for the agent package.
apihelper
Package apihelper provides a small set of shared HTTP helpers reused by the scheduler LLM time-parser, the RAG ask path, and the RAG extractor.
Package apihelper provides a small set of shared HTTP helpers reused by the scheduler LLM time-parser, the RAG ask path, and the RAG extractor.
assets
Package assets embeds the built-in, cross-platform skill payloads that fairpeer ships with its binary.
Package assets embeds the built-in, cross-platform skill payloads that fairpeer ships with its binary.
boot
Package boot assembles a ready-to-drive control.Controller from configuration: it loads config, resolves the model(s), builds the tool registry (built-ins + plugins), wires the permission gate, and constructs the executor.
Package boot assembles a ready-to-drive control.Controller from configuration: it loads config, resolves the model(s), builds the tool registry (built-ins + plugins), wires the permission gate, and constructs the executor.
bot
Package bot ๅฎž็Žฐ fairpeer ๅคšๆธ ้“ IM bot ๆถˆๆฏ็ฝ‘ๅ…ณ๏ผŒๆ”ฏๆŒ QQใ€้ฃžไนฆใ€ๅพฎไฟกใ€Telegramใ€‚
Package bot ๅฎž็Žฐ fairpeer ๅคšๆธ ้“ IM bot ๆถˆๆฏ็ฝ‘ๅ…ณ๏ผŒๆ”ฏๆŒ QQใ€้ฃžไนฆใ€ๅพฎไฟกใ€Telegramใ€‚
bot/feishu
Package feishu ๅฎž็Žฐ้ฃžไนฆ่‡ชๅปบๅบ”็”จ Bot ้€‚้…ๅ™จใ€‚
Package feishu ๅฎž็Žฐ้ฃžไนฆ่‡ชๅปบๅบ”็”จ Bot ้€‚้…ๅ™จใ€‚
bot/qq
Package qq ๅฎž็Žฐ QQ ๅฎ˜ๆ–น Bot API v2 ้€‚้…ๅ™จใ€‚
Package qq ๅฎž็Žฐ QQ ๅฎ˜ๆ–น Bot API v2 ้€‚้…ๅ™จใ€‚
bot/telegram
Package telegram ๅฎž็Žฐ Telegram Bot API ้€‚้…ๅ™จใ€‚
Package telegram ๅฎž็Žฐ Telegram Bot API ้€‚้…ๅ™จใ€‚
bot/weixin
Package weixin ๅฎž็Žฐๅพฎไฟก iLink Bot ้€‚้…ๅ™จใ€‚
Package weixin ๅฎž็Žฐๅพฎไฟก iLink Bot ้€‚้…ๅ™จใ€‚
browserlaunch
Package browserlaunch launches a system-installed Chromium-based browser (Chrome / Edge / Brave / Chromium) with a CDP remote-debugging endpoint and exposes the resulting websocket URL so a driver โ€” the Python browser-use sidecar, or chromedp elsewhere โ€” can attach to the very same browser instead of each driver spawning its own.
Package browserlaunch launches a system-installed Chromium-based browser (Chrome / Edge / Brave / Chromium) with a CDP remote-debugging endpoint and exposes the resulting websocket URL so a driver โ€” the Python browser-use sidecar, or chromedp elsewhere โ€” can attach to the very same browser instead of each driver spawning its own.
browseruse
Package browseruse is the Go client for the Python browser-use sidecar (browseruse_server.py).
Package browseruse is the Go client for the Python browser-use sidecar (browseruse_server.py).
builtinmcp
Package builtinmcp defines MCP servers that ship with fairpeer without requiring user configuration.
Package builtinmcp defines MCP servers that ship with fairpeer without requiring user configuration.
calendar
Package calendar provides a local SQLite-backed calendar for FairPeer.
Package calendar provides a local SQLite-backed calendar for FairPeer.
checkpoint
Package checkpoint is fairpeer's snapshot-based edit safety net.
Package checkpoint is fairpeer's snapshot-based edit safety net.
cli
Package cli implements fairpeer's command-line entry: subcommand routing, flag parsing, assembly from config, and exit codes.
Package cli implements fairpeer's command-line entry: subcommand routing, flag parsing, assembly from config, and exit codes.
codegraph
Package codegraph integrates the CodeGraph code-intelligence engine (https://github.com/colbymchenry/codegraph) as a built-in MCP server.
Package codegraph integrates the CodeGraph code-intelligence engine (https://github.com/colbymchenry/codegraph) as a built-in MCP server.
command
Package command loads custom slash commands from Markdown files.
Package command loads custom slash commands from Markdown files.
compose
Package compose implements fairpeer's structured development workflow: after a plan is approved, a multi-task feature runs through Implement โ†’ Verify โ†’ (Review) with bounded retries, instead of a single execution turn that never validates the result.
Package compose implements fairpeer's structured development workflow: after a plan is approved, a multi-task feature runs through Implement โ†’ Verify โ†’ (Review) with bounded retries, instead of a single execution turn that never validates the result.
config
Package config loads fairpeer's runtime configuration from TOML.
Package config loads fairpeer's runtime configuration from TOML.
control
Package control is the transport-agnostic session driver.
Package control is the transport-agnostic session driver.
diff
Package diff computes a line-level diff between two versions of a file and renders it as a unified diff, with added/removed line counts.
Package diff computes a line-level diff between two versions of a file and renders it as a unified diff, with added/removed line counts.
docconv
Package docconv centralizes the external Python-script document-conversion helpers (markitdown via doc_converter.py, and PDF OCR via ocr_pdf.py) that were previously duplicated across three packages (rag, tool/builtin, control).
Package docconv centralizes the external Python-script document-conversion helpers (markitdown via doc_converter.py, and PDF OCR via ocr_pdf.py) that were previously duplicated across three packages (rag, tool/builtin, control).
doctor
Package doctor collects local, redacted diagnostics for issue reports.
Package doctor collects local, redacted diagnostics for issue reports.
event
Package event defines the typed event stream the agent emits as it runs a turn, and the Sink it emits to.
Package event defines the typed event stream the agent emits as it runs a turn, and the Sink it emits to.
fileutil/encoding
Package encoding detects and converts file encodings for the built-in file tools.
Package encoding detects and converts file encodings for the built-in file tools.
frontmatter
Package frontmatter provides a minimal, dependency-free parser for the ---fenced "key: value" blocks that prefix skill, command, and memory files.
Package frontmatter provides a minimal, dependency-free parser for the ---fenced "key: value" blocks that prefix skill, command, and memory files.
hook
Package hook runs user-configured shell-command hooks around the agent loop: PreToolUse / PostToolUse fire around each tool call, UserPromptSubmit before a turn, Stop after it.
Package hook runs user-configured shell-command hooks around the agent loop: PreToolUse / PostToolUse fire around each tool call, UserPromptSubmit before a turn, Stop after it.
i18n
Package i18n holds the CLI's translatable strings and a small detection helper.
Package i18n holds the CLI's translatable strings and a small detection helper.
installsource
Package installsource implements the `install_source` tool: a two-phase installer for fairpeer skills and MCP servers.
Package installsource implements the `install_source` tool: a two-phase installer for fairpeer skills and MCP servers.
jobs
Package jobs is the session-scoped background-job registry behind the agent's background tools (bash run_in_background, task run_in_background) and the bash_output / kill_shell / wait tools.
Package jobs is the session-scoped background-job registry behind the agent's background tools (bash run_in_background, task run_in_background) and the bash_output / kill_shell / wait tools.
lsp
Package lsp is a minimal Language Server Protocol client: it spawns a language server per language on demand, syncs queried documents from disk, and adapts a few read-only capabilities (definition, references, hover, diagnostics) to the tool.Tool interface.
Package lsp is a minimal Language Server Protocol client: it spawns a language server per language on demand, syncs queried documents from disk, and adapts a few read-only capabilities (definition, references, hover, diagnostics) to the tool.Tool interface.
memory
Package memory implements fairpeer's persistent memory.
Package memory implements fairpeer's persistent memory.
netclient
Package netclient builds HTTP clients and proxy resolvers that share fairpeer's user-facing proxy settings.
Package netclient builds HTTP clients and proxy resolvers that share fairpeer's user-facing proxy settings.
outputstyle
Package outputstyle adds a selectable "output style" โ€” a block of persona / tone instructions appended to (or replacing) the system prompt โ€” so the user can shift how the agent communicates without rewriting the system prompt.
Package outputstyle adds a selectable "output style" โ€” a block of persona / tone instructions appended to (or replacing) the system prompt โ€” so the user can shift how the agent communicates without rewriting the system prompt.
permission
Package permission decides, per tool call, whether to allow it, deny it, or ask the user first.
Package permission decides, per tool call, whether to allow it, deny it, or ask the user first.
plugin
Package-internal cache for MCP handshake results.
Package-internal cache for MCP handshake results.
ppttemplate
Package ppttemplate provides PPT template rendering utilities.
Package ppttemplate provides PPT template rendering utilities.
provider
Package provider defines the model-backend abstraction and a registry mapping a provider "kind" to a factory.
Package provider defines the model-backend abstraction and a registry mapping a provider "kind" to a factory.
provider/anthropic
Package anthropic implements the Anthropic Messages API provider (POST /v1/messages, SSE streaming) with a hand-written net/http client โ€” no SDK.
Package anthropic implements the Anthropic Messages API provider (POST /v1/messages, SSE streaming) with a hand-written net/http client โ€” no SDK.
provider/openai
Package openai implements the OpenAI-compatible /chat/completions provider.
Package openai implements the OpenAI-compatible /chat/completions provider.
rag
Package rag implements a knowledge-base store for the coWork profile: import documents, chunk them, and search them.
Package rag implements a knowledge-base store for the coWork profile: import documents, chunk them, and search them.
sandbox
Package sandbox wraps a shell command in an OS-level jail so the model's `bash` calls are confined: it may read freely but write only inside the workspace (plus temp and toolchain caches) and reach the network only when allowed.
Package sandbox wraps a shell command in an OS-level jail so the model's `bash` calls are confined: it may read freely but write only inside the workspace (plus temp and toolchain caches) and reach the network only when allowed.
scheduler
Package scheduler is a persistent, session-independent task scheduler for the coWork profile.
Package scheduler is a persistent, session-independent task scheduler for the coWork profile.
serve
Package serve exposes a control.Controller over HTTP: the typed event stream as Server-Sent Events, and the commands as small JSON POST endpoints.
Package serve exposes a control.Controller over HTTP: the typed event stream as Server-Sent Events, and the commands as small JSON POST endpoints.
skill
Package skill loads invokable playbooks ("skills") from Markdown files.
Package skill loads invokable playbooks ("skills") from Markdown files.
sysproxy
Package sysproxy resolves the OS-level proxy (Windows system/PAC settings) for a target URL.
Package sysproxy resolves the OS-level proxy (Windows system/PAC settings) for a target URL.
tool
Package tool defines the Tool abstraction and a Registry.
Package tool defines the Tool abstraction and a Registry.
tool/builtin
Package builtin provides fairpeer's compile-time built-in tools.
Package builtin provides fairpeer's compile-time built-in tools.
validation
Package validation provides pre-write syntax validation for the editor tools (write_file/edit_file/multi_edit).
Package validation provides pre-write syntax validation for the editor tools (write_file/edit_file/multi_edit).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL