内容
# ferrus
[](https://crates.io/crates/ferrus)
[](https://releases.rs/docs/1.95.0/)
[](https://github.com/ferrus-dev/ferrus/blob/main/LICENSE)
[](https://github.com/ferrus-dev/ferrus/actions/workflows/rust.yml)
[](https://github.com/ferrus-dev/ferrus/actions/workflows/publish.yml)
**Deterministic orchestration of AI agents for real software work.**
Ferrus turns coding agents into controlled, repeatable workers.
It runs a Supervisor -> Executor -> Reviewer loop over your repository as a **state machine**.
Tasks are planned, implemented, checked, and reviewed in a structured, restart-safe flow.
Native Nano also supports direct workspace conversations without a managed task.
Everything is explicit:
- Runtime state lives in SQLite; task context lives in scoped Markdown artifacts
- Optional repository graph facts live in a separate machine-local SQLite sidecar
- Task and run state survives agent process restarts
- Crashes are recoverable
- No hidden context
## Supported agents
Ferrus works with external coding agents and its built-in Nano runtime:
- **Codex**
- **Claude Code**
- **Qwen Code** (experimental)
- **goose** (experimental)
- **opencode** (experimental; Supervisor and Reviewer only)
- **Nano** (native Executor, [Supervisor authoring](docs/ferrus-nano/ferrus-nano-supervisor.md), [review/consultation](docs/ferrus-nano/ferrus-nano-review.md), and [standalone coding](docs/ferrus-nano/ferrus-nano-standalone.md); requires `nano-openai`; [setup](docs/ferrus-nano/ferrus-nano-launch.md))
Agents are treated as interchangeable workers -- ferrus provides the runtime, coordination, and state.
See the [agent adapter notes](docs/cli-and-runtime.md#agent-adapters) for limitations and configuration details.
> **Status**: ferrus is currently in alpha and not ready for production.
[Tutorial](https://ferrus.dev) | [Roadmap](https://github.com/ferrus-dev/ferrus/blob/main/docs/milestones.md)
---
## How it works
```
you
|
+-> ferrus HQ
|
+-> Supervisor (configured agent) -- plans tasks
| | exits after task created;
|
+-> Executor (configured agent) -- implements, checks, submits
| | runs headlessly
|
+-> Reviewer (configured agent) -- spawned automatically on submission
| exits after approve/reject; runs headlessly
```
HQ watches state transitions and spawns the right agent at the right time.
State is coordinated through `ferrus.db`, with human-readable task context under `.ferrus/tasks/` and `.ferrus/runs/`. If an agent crashes and restarts, Ferrus can recover its run and task lease without reconstructing state from Markdown files.
---
## Quick start
Install:
```sh
cargo install ferrus
# or on Linux/macOS:
curl -fsSL https://ferrus.dev/cli/install.sh | sh
```
```powershell
# or on Windows:
iwr https://ferrus.dev/cli/install.ps1 -useb | iex
```
For a smaller Cargo installation, use the same size profile as release assets:
```sh
cargo install ferrus --locked --profile dist
```
Prebuilt release archives include `ferrus` and `ferrus-nano`, with native context and external MCP support.
The installers copy both by default. To select one binary:
```sh
curl -fsSL https://ferrus.dev/cli/install.sh | sh -s -- --components ferrus
curl -fsSL https://ferrus.dev/cli/install.sh | sh -s -- --components nano
```
```powershell
& ([scriptblock]::Create((iwr https://ferrus.dev/cli/install.ps1 -useb).Content)) -Components ferrus
& ([scriptblock]::Create((iwr https://ferrus.dev/cli/install.ps1 -useb).Content)) -Components nano
```
Use `all` for both, or set `FERRUS_INSTALL_COMPONENTS=all|ferrus|nano`; an explicit parameter
takes precedence. Every mode downloads the same archive and retains unselected installed binaries.
Selecting `ferrus` keeps its compiled-in Nano support. Older releases without `ferrus-nano`
install only `ferrus` in `all` mode with a warning; `nano` mode fails if its binary is missing.
The Apple Silicon archive targets macOS 11.0 or newer (`MACOSX_DEPLOYMENT_TARGET=11.0`).
CI builds it on `macos-latest`, checks the packaged arm64 executable's deployment target and
SHA-256 checksum, and runs `--version`, `init`, and `doctor` with an isolated home and project.
Runtime smoke coverage uses the runner's macOS version; older macOS versions are not exercised.
Cargo installations use the smaller default feature set; to install Nano from crates.io, enable
both features explicitly:
```sh
cargo install ferrus --locked --profile dist --features nano-openai,nano-mcp
```
HQ update notifications are enabled by default. To omit the update-check HTTP/TLS client:
```sh
cargo install ferrus --locked --profile dist --no-default-features
```
See [build profiles and size measurements](docs/binary-size.md) for the tradeoffs.
Run:
```sh
ferrus init # scaffold ferrus.toml, .ferrus/, and ~/.ferrus project state
ferrus register --supervisor claude-code --executor codex # write agent configs and tool permissions
ferrus # enter HQ
```
Then type `/task` -- a supervisor spawns, you describe what you want, and the full loop runs automatically.
On Linux and macOS for `x86_64` and `aarch64`/`arm64`, `install.sh` installs selected binaries into `~/.local/bin` by default. On Windows, `install.ps1` uses `%LOCALAPPDATA%\ferrus\bin` by default. Release archives are verified with published SHA-256 checksums before installation. Set `FERRUS_INSTALL_DIR` to override the destination, or `FERRUS_INSTALL_VERSION=vX.Y.Z` to install a specific release tag.
---
## Core workflow
`ferrus` opens HQ. The main path is deliberately small:
```text
/task -> Supervisor defines work -> Executor implements and checks -> Reviewer approves or rejects
```
Tasks advance independently through SQLite-backed states. Git projects use isolated Executor worktrees;
non-Git projects run in the project directory with one Executor. Checks run before submission, and rejected
work resumes with review feedback. `/status`, `/tasks`, `/runs`, and `/events`
provide local inspection; `ferrus doctor` and `ferrus recover` handle consistency and interrupted work.
`ferrus-nano` runs headless requests or `--interactive` conversations in an unregistered Git or non-Git directory; see [standalone Nano](docs/ferrus-nano/ferrus-nano-standalone.md).
With Nano, `/executor` opens a direct workspace conversation without a queued task;
`/attach NAME` opens a running or historical managed conversation. See [interactive Nano](docs/ferrus-nano/ferrus-nano-interactive.md).
For standalone use, configure the provider and run `ferrus-nano --workspace /path/to/project --interactive`.
Standalone needs no Ferrus registration or task database; its final response is separate from managed submission.
The full HQ command list, state transitions, CLI reference, configuration example, graph commands, and runtime file
layout are in [docs/cli-and-runtime.md](docs/cli-and-runtime.md).
## Repository intelligence
Ferrus has two optional, independently revisioned local indexes:
- the repository graph for deterministic structural navigation and snapshot-aware snippets;
- project memory for approved outcomes, specification history, and bounded provenance.
Both use separate machine-local SQLite sidecars. They are read-only from agent retrieval tools, never replace
`ferrus.db`, and never become implicit prompt context. Task worktrees receive pinned graph baselines plus mutable
overlays; review uses a frozen submitted view. The same contracts also define a vendor-neutral path to distributed
storage and workers.
Start with [repository graph architecture](docs/repository_graph/repository-graph-architecture.md),
[project memory architecture](docs/project_memory/project-memory-architecture.md), and
[distributed indexing architecture](docs/repository_graph/distributed-indexing-architecture.md).
## Documentation
- [CLI, HQ, configuration, and runtime reference](docs/cli-and-runtime.md)
- [Roadmap and milestones](docs/milestones.md)
- [Repository graph retrieval](docs/repository_graph/repository-graph-retrieval.md)
- [Repository graph benchmarks](docs/repository_graph/repository-graph-benchmarks.md)
- [Repository graph evaluation](docs/repository_graph/repository-graph-evaluations.md)
- [Project memory operations](docs/project_memory/project-memory.md)
- [Project memory evaluation](docs/project_memory/project-memory-evaluations.md)
- [Semantic retrieval and embeddings](docs/repository_graph/semantic-retrieval.md)
- [Feature specifications](docs/specs/)
## Dogfooding
Ferrus is partially developed using its own orchestration workflow.
This repository is used to validate the Supervisor -> Executor -> Reviewer loop in real development scenarios.
---
## Getting involved
If you're interested in Ferrus:
- Try running it on your project
- Share feedback on the workflow (what breaks, what feels unnatural)
- Open issues with observations or ideas
At this stage, feedback on the model is more valuable than code contributions.
---
## Licence
Licensed under Apache 2.0.
连接信息
猜你喜欢
暂无推荐服务器