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
- Directory Structure
- Managing Tasks
- Managing Pipelines
- Managing Rules
- Dependency Management
- Dependency Graph Visualization
- Backup System
- Cache Management
- 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.
Initialize 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
├── 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
| 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. |
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>Creates an empty bee/pipelines/<name>.yml.
bee pipeline listbee pipeline run <name>Runs the full pipeline. The system automatically:
- 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)
bee runbee pipeline delete <name>name: ci
tasks:
- compile
- test
- lint
- package
- deploy| Field | Type | Description |
|---|---|---|
name |
string | Pipeline name |
tasks |
list[string] | List of task names (order doesn't matter — DAG sorts them) |
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.
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 |
# 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.yml
The system verifies integrity on every operation. If hashes don't match, bee returns "run bee init first".