Bee is a task pipeline orchestration tool written in Rust. It lets you define tasks, connect them into pipelines with automatic dependency resolution, and run them in parallel or sequentially.
- Building
- Project Initialization
- Subsystems
- Directory Structure
- Managing Tasks
- Managing Pipelines
- Managing Rules
- Dependency Management
- Dependency Graph Visualization
- Backup System
- Cache Management
- Task Logs
- Project Status
- YAML File Formats
- Trigger System
- Full Configuration Example
Bee requires Rust (stable). Build with Cargo:
cargo build # debug build
cargo build --release # release build
cargo test # run testsThe binary is at target/debug/bee or target/release/bee.
The git commit hash of the source is embedded at build time. Show the installed version:
bee versionThis prints the git rev-parse HEAD hash recorded when the binary was built/installed (e.g. by bee update).
bee init also writes bee/README.md, bee/AGENTS.md, and bee/CLAUDE.md inside each project. Regenerate them from the built-in templates with:
bee docs updateInitialize bee in the current directory:
bee initThis creates the full directory structure and starter files:
bee/
├── tasks/
│ ├── build.yml # starter build task
│ └── test.yml # starter test task
├── pipelines/
│ └── main.yml # default pipeline (build -> test)
├── rules/ # (empty)
├── cache/ # trigger states and task run history
├── logs/ # per-task execution logs (<task>.log)
├── deps/ # installed dependencies
├── system/
│ ├── config.yml # master registry of all tasks/pipelines/rules
│ ├── init # initialization proof (hash)
│ ├── hash/
│ │ ├── init # SHA-256 of init file
│ │ └── config # SHA-256 of config.yml
│ └── backup/ # configuration snapshots
├── deps.yml # external dependency definitions
├── README.md # this file
└── .gitignore # ignores cache/deps/backup/hash
Bee detects when you run bee init inside an already-initialized bee project and proposes creating a subsystem — a lightweight, self-contained bee instance scoped to the current folder.
bee initBee walks up the directory tree, finds the nearest valid parent bee system, and asks:
Detected a parent bee system at '/path/to/parent'.
Create a subsystem of it in this directory? [Y/n]
Y(default) — creates a lightweight subsystem:- own
bee/tasks/,bee/pipelines/,bee/rules/— works independently - minimal
bee/system/(init,config.yml, hashes) bee/system/parent— relative pointer back to the parent system- registers itself in the parent's
bee/system/subsystems.yml
- own
n— creates a normal, fully independent bee project.
Flags:
bee init --yes # auto-accept subsystem creation (no prompt)
bee init --name auth # override subsystem name (default: current directory name)Within a subsystem the basic commands operate on the subsystem's own resources:
bee task, bee pipeline, bee rule, bee run, bee status, bee subsystem.
bee install, bee backup, and bee graph are not available in a subsystem.
bee subsystem list # in a subsystem: shows the parent + sibling subsystems (marks current)
# in a parent: lists registered subsystems
bee subsystem status # shows the link to the parent system and registration detailsA parent task can invoke a task or pipeline inside a subsystem, and tasks on either side can react to each other through trigger rules.
Parent calls a child task or pipeline:
bee subsystem run <subsystem> task <task>
bee subsystem run <subsystem> pipeline <pipeline>Run it from a parent task's run command to chain systems, e.g.:
name: build-all
run: bee subsystem run auth task build && bee subsystem run payments pipeline buildParent reacts to a subsystem — create a rule in the parent with one of:
bee rule modify on-child --trigger-type subtask_completed --trigger-param subsystem=auth --trigger-param task=build
bee rule modify on-child --trigger-type subtask_failed --trigger-param subsystem=auth --trigger-param task=build
bee rule modify on-child --trigger-type subtask_changed --trigger-param subsystem=auth --trigger-param task=build
bee rule modify on-child --trigger-type subsystem_changed --trigger-param subsystem=authSubsystem reacts to the parent — create a rule inside the subsystem:
bee rule modify after-parent --trigger-type parent_task_completed --trigger-param task=deploy
bee rule modify after-parent --trigger-type parent_task_failed --trigger-param task=deployThe state of each task lives in the owning system's bee/cache/triggers/, so subtask_*/subsystem_changed read the subsystem's cache from the parent, and parent_task_* reads the parent's cache from the subsystem.
The parent system stores bee/system/subsystems.yml (name, path, date, hash) and a tamper-detection hash in bee/system/hash/subsystems. The file is created on demand, so existing projects work without changes.
| Directory | Purpose |
|---|---|
tasks/ |
Task definitions (YAML). Each file defines a single task with a shell command and optional dependencies. |
pipelines/ |
Pipeline definitions (YAML). Each file lists tasks to run in order, respecting the dependency DAG. |
rules/ |
Trigger rules (YAML). Defines when tasks should run based on file changes, git state, other tasks, etc. |
cache/ |
Runtime cache data. Stores trigger states and task execution history. |
logs/ |
Task execution logs. Each task writes its stdout/stderr to bee/logs/<task>.log instead of the console. |
deps/ |
Installed dependencies. Tools and libraries fetched by bee install. |
system/ |
Internal metadata. Config registry, integrity hashes, and backup storage. |
system/hash/ |
Tamper-detection hashes for config and init files. |
system/backup/ |
Backup snapshots of tasks, pipelines, and rules. |
deps.yml |
Project dependencies — define external tools to install with bee install. |
system/config.yml— Master registry of all tasks, pipelines, and rules. Auto-managed bybee task/pipeline/rule create/delete. Do not edit manually.deps.yml— Dependency definitions (URL, git, or package manager).README.md— This file.
bee task create <name>Creates bee/tasks/<name>.yml with a default echo command.
bee task listbee task run <name>Runs the task directly, bypassing pipeline ordering. The trigger system still checks whether the task should execute.
bee task delete <name>name: compile
run: gcc -o main main.c && echo "Compiled!"
depends_on:
- setup| Field | Type | Description |
|---|---|---|
name |
string | Task name (must match filename) |
run |
string | Shell command to execute |
depends_on |
list[string] | Optional list of task names this task depends on |
Tasks without depends_on or with an empty list have no dependencies and run first.
bee pipeline create <name> [-t <task>...] [-p <pipeline>...]| Flag | Description |
|---|---|
-t <task> |
Add a task to the pipeline (repeatable) |
-p <pipeline> |
Add a subpipeline to invoke (repeatable) |
bee pipeline listbee pipeline run <name>Runs the full pipeline. The system automatically:
- Runs all subpipelines first (in order), recursively with cycle detection
- Builds a dependency graph (DAG) from task
depends_onfields - Performs topological sort
- Groups tasks into layers (parallel groups)
- Runs layers sequentially, tasks within a layer run in parallel (separate threads)
A pipeline can invoke other pipelines. When you run it, all subpipelines run first (in the order listed), then the pipeline's own tasks run through the normal DAG:
name: full
tasks:
- package
- deploy
pipelines:
- build
- testbee pipeline create build -t compile
bee pipeline create full -t package -p build
bee pipeline run fullSubpipelines run recursively (a subpipeline can itself have subpipelines). Cycles are
detected automatically, e.g. build -> ci -> build.
bee runbee pipeline delete <name>name: ci
tasks:
- compile
- test
- lint
- package
- deploy
pipelines:
- build # optional subpipelines, run before this pipeline's tasks| Field | Type | Description |
|---|---|---|
name |
string | Pipeline name |
tasks |
list[string] | List of task names (order doesn't matter — DAG sorts them) |
pipelines |
list[string] | Optional list of subpipelines invoked before this pipeline's tasks |
bee rule create <name> --task <task>Creates a manual rule (only runs when explicitly requested).
bee rule listbee rule delete <name>name: rebuild-on-source
task: compile
triggers:
- type: file_change
paths:
- src/**/*.c
- src/**/*.hBee can manage external dependencies (tools, libraries).
bee install listbee install add <name> --dep-type <type> --source <source> [--version <ver>] [--command <cmd>]Dependency types:
package— system package (requires--command, e.g.sudo apt-get install -y)url— download from URL (archive)git— clone a git repository
bee install runbee install remove <name>dependencies:
- name: jq
type: package
source: jq
command: "sudo apt-get install -y"
- name: shellcheck
type: url
source: https://github.com/koalaman/shellcheck/releases/download/v0.9.0/shellcheck-v0.9.0.linux.x86_64.tar.xz
version: v0.9.0bee graph all [format]bee graph pipeline <name> [format]Formats:
tree(default) — text treedot— GraphViz DOTmermaid— Mermaid diagram
Example (tree):
Pipeline: ci (5 tasks, 3 groups)
[1/3] compile (parallel)
[2/3] test, lint (parallel)
[3/3] package
[4/3] deploy
Example (mermaid):
graph LR;
compile-->test;
compile-->lint;
test-->package;
lint-->package;
package-->deploy;
bee backup createCopies current tasks, pipelines, rules, and config to bee/system/backup/<hash>. Automatically cleans old backups (max 20).
bee backup listbee backup restore <hash>bee cleanRemoves the entire bee/cache/ directory, resetting all trigger states and run history.
When a task runs, its output is not printed to the console (task outputs would interleave across parallel threads). Instead, every task writes its stdout/stderr to a log file:
bee/logs/<taskname>.log
The log file is overwritten on each run. On failure the log contains the exit code, stderr, and any stdout produced. The console only shows the task status lines (running, FAILED, SKIPPED, etc.).
cat bee/logs/compile.log # inspect what the compile task outputbee clean does not remove bee/logs/ — delete log files manually if you want to clear them.
bee statusDisplays:
- Number of pipelines, tasks, and rules
- Pipeline details (task order + cached/pending status)
- Count of cached tasks
Master registry — automatically updated by bee task/pipeline/rule create/delete:
tasks:
- compile
- test
- lint
pipelines:
- ci
- build-only
rules:
- compile
- testWARNING: Do not edit this file manually. Bee manages it automatically through commands.
Rules define when tasks should run. Without a rule, a task runs every time.
| Trigger | Description | Parameters |
|---|---|---|
manual |
Only on explicit request | — |
always |
Always run | — |
file_change |
Run when matching files change | paths — list of globs |
git_changed |
Run when git-tracked files change | paths — list of globs |
task_completed |
Run when another task succeeds | task — task name |
task_failed |
Run when another task fails | task — task name |
dependency_changed |
Run when upstream task changes | task — task name |
env_changed |
Run when environment variables change | vars — list of var names |
dependency_missing |
Run when a file/binary is missing | path — file path |
checksum_changed |
Run when file checksums change | paths — list of globs |
schedule |
Run on a cron schedule | cron — cron expression |
git_tag |
Run on git tags | pattern — optional pattern |
subtask_completed |
Run when a task in a subsystem succeeds | subsystem, task |
subtask_failed |
Run when a task in a subsystem fails | subsystem, task |
subtask_changed |
Run when a task in a subsystem changes state | subsystem, task |
parent_task_completed |
Run when a task in the parent system succeeds (in a subsystem) | task |
parent_task_failed |
Run when a task in the parent system fails (in a subsystem) | task |
subsystem_changed |
Run when any task state in a subsystem changes | subsystem |
# Auto-compile when sources change
name: auto-compile
task: compile
triggers:
- type: file_change
paths:
- src/**/*.rs
# Run test after compile succeeds
name: test-after-compile
task: test
triggers:
- type: task_completed
task: compile
# Deploy only manually
name: manual-deploy
task: deploy
triggers:
- type: manual
# Retry deploy when package fails
name: retry-deploy
task: deploy
triggers:
- type: task_failed
task: package
- type: manual
# Build when binary is missing
name: build-if-missing
task: compile
triggers:
- type: dependency_missing
path: target/release/myapp- When
bee task run <name>is called, the system checks all rules assigned to that task - If no rules exist → task always runs
- If rules exist → any trigger returning
truecauses the task to run - The
manualtrigger never returnstrueautomatically - Trigger states are cached in
bee/cache/triggers/ bee cleanresets all trigger states
bee initbee task create compile
bee task create test
bee task create lint
bee task create package
bee task create deploybee/tasks/compile.yml:
name: compile
run: cargo build --release
depends_on: []bee/tasks/test.yml:
name: test
run: cargo test
depends_on:
- compilebee/tasks/lint.yml:
name: lint
run: cargo clippy -- -D warnings
depends_on:
- compilebee/tasks/package.yml:
name: package
run: tar -czf release.tar.gz target/release/myapp
depends_on:
- test
- lintbee/tasks/deploy.yml:
name: deploy
run: scp release.tar.gz user@server:/opt/app/
depends_on:
- packagebee pipeline create cibee/pipelines/ci.yml:
name: ci
tasks:
- compile
- test
- lint
- package
- deploybee/rules/auto-compile.yml:
name: auto-compile
task: compile
triggers:
- type: file_change
paths:
- src/**/*.rsbee pipeline run ci # Run the full pipeline
bee task run deploy # Run a single task
bee graph pipeline ci # Show dependency graph
bee status # Show project statusBee stores SHA-256 hashes:
bee/system/init— initialization proofbee/system/hash/init— hash of init filebee/system/hash/config— hash of config.ymlbee/system/hash/deps— hash of deps.ymlbee/system/hash/subsystems— hash of the parent's subsystems registry
Each bee/system/hash/<file> entry has a companion bee/system/hash/<file>.bee containing the bee git hash (bee version) that created it, so future versions can tell which bee build produced each hash.
The system verifies integrity on every operation. If hashes don't match, bee returns "run bee init first".