crewman-zig is a local-first CLI task manager written in Zig and backed by SQLite.
This repository now has a functional MVP CLI.
- The CLI builds cleanly and the main CRUD / workflow commands are implemented.
- Database initialization now creates and upgrades the local SQLite schema on startup.
- Implemented commands:
project init,project list,project delete,task add,task list,task move,task delete,task assign,task depend,task deps,task run,crew add,crew list,crew delete,agent add,agent list,agent delete,board, andstats. task runcurrently passes a generated task prompt as the final CLI argument to the configured agent command and stores the captured stdout/stderr inagent_runs.
Core tables include:
projects(id, name, description, created_at)tasks(id, title, description, status, priority, project_id, crew_id, created_at)crews(id, name, type, description, created_at)agents(...)and supporting run / skill tables for future features
- Zig 0.15.x recommended
- System
sqlite3library available at build time
zig build
./zig-out/bin/crewman help
./zig-out/bin/crewman project init demo -d "Demo project"
./zig-out/bin/crewman task add "Implement parser" -p 1 -P 2
./zig-out/bin/crewman statsRun the full repository test suite with:
zig build testYou can still run the raw test target directly with zig test src/root.zig, but zig build test is the canonical entrypoint.
src/main.zig: CLI entrypoint and command routingsrc/commands.zig: command handlers and terminal outputsrc/db.zig: SQLite connection and prepared statement helperssrc/integration_test.zig: end-to-end repository tests using an isolated temporary SQLite databasesrc/models.zig: shared structs and enumssrc/root.zig: test entrypoint that imports the integration suitebuild.zig: executable build definitionPRD.md: product requirements and planned scope
The integration suite exercises the real command functions against a temporary database file instead of the repository-level .crewman.db. Current coverage includes:
- project creation
- task creation, status updates, and assignment
- dependency creation and cycle rejection
- agent creation and
task run - SQLite state verification for tasks, agents, runs, and skills
If you add new CLI features, extend src/integration_test.zig so the persisted database state is verified directly.
- Format changes with
zig fmt src/*.zig build.zig. - Ignore generated outputs in
zig-out/,.zig-cache/, and the local.crewman.db. - Keep CLI behavior and schema changes in sync;
db.init()is now the migration point for additive table and column changes. - Tests should call
db.setPath(...)or equivalent isolation helpers instead of reusing.crewman.db.
MIT. See the LICENSE file.