docs/commands/tasks.md
List and discover project tasks from:
flow.toml ([[tasks]]).ai/tasks/*.mbt (AI MoonBit tasks)You can run tasks directly with f <task>.
f tasks
f tasks list
f tasks dupes
f tasks init-ai
f tasks build-ai ai:flow/dev-check
f tasks run-ai ai:flow/dev-check
f tasks run-ai --daemon ai:flow/dev-check
f tasks daemon start
f tasks daemon status
f tasks daemon stop
f ai-taskd-launchd-install
f ai-taskd-launchd-status
cargo build --release -p ai-taskd-client --bin ai-taskd-client
./target/release/ai-taskd-client ai:flow/dev-check
f install-ai-fast-client
f fast ai:flow/dev-check
f bench-ai-runtime --iterations 80 --warmup 10
f bench-ffi-boundary --iters 10000000
f bench-ffi-boundary --iters 10000000 --native-opt
Initialize a starter MoonBit task:
f tasks init-ai
This creates:
.ai/tasks/starter.mbt
Run it:
f starter
f ai:starter
Add more tasks as .mbt files under .ai/tasks/ and run by name or selector:
f release-flow
f ai:project/release-flow
moon build --target native --release once per content hash~/Library/Caches/flow/ai-tasks/...f tasks run-ai --no-cache ... (or FLOW_AI_TASK_RUNTIME=moon-run) to force direct moon run.FLOW_AI_TASK_MODE=release for release builds (--release).FLOW_AI_TASK_MODE=js to run with JS target.f tasks daemon runs a lightweight local ai-taskd over Unix socket for warm repeated runs.cargo build --release -p ai-taskd-client --bin ai-taskd-client
./target/release/ai-taskd-client ai:<selector>f install-ai-fast-client then use fai ai:<selector>f startup for hot-loop calls.fai supports:
--protocol msgpack|json (msgpack default)--timings (server-side phase timings)--batch-stdin (pooled burst mode in one client process)f ai-taskd-launchd-installf ai-taskd-launchd-statusf ai-taskd-launchd-logsFLOW_AI_TASK_FAST_CLIENT=1 (typically together with FLOW_AI_TASK_DAEMON=1).f will auto-prefer fast client dispatch for AI tasks tagged fast, latency, hot, or hotkey.FLOW_AI_TASK_FAST_SELECTORS (comma-separated patterns, supports * prefix/suffix).FLOW_AI_TASK_FAST_CLIENT_BIN=/path/to/fai.f recipe still exists for legacy compatibility, but task-centric workflow is preferred.