How rohansx/workz works
workz is a Rust CLI that provisions agent-created Git worktrees so they can run independently. The principal workflow is setup/configuration, worktree creation, dependency and environment synchronization, then optional port/database/Compose isolation; run starts a dev server and preview reports live worktrees. The CLI also provides lifecycle, diagnostics, hook, and MCP capabilities. Edges reflect README-documented behavior and visible source references; unsampled command-handler details are not inferred.
Main entry points: main.rs Command dispatcher · isolation.rs Isolation setup · mcp.rs MCP server · doctor.rs Diagnostics
Components 16
CLI and integration
- CLI commands
src/cli.rs - Command dispatcher
src/main.rs - Hook recipes
src/hook.rs - MCP server
src/mcp.rs
Worktree provisioning
- Setup wizard
src/init.rs - Configuration
src/config.rs - Git worktrees
src/git.rs - Worktree sync
src/sync.rs
Environment isolation
- Isolation setup
src/isolation.rs - Port registry
src/isolation.rs
Runtime and operations
- Diagnostics
src/doctor.rs - Dev server runner
src/run.rs - Lifecycle and status
src/main.rs
Other components
- Developer or agent
- Editor or agent host
- Postgres or Docker
Connections 23
- Developer or agent → CLI commands: invokes
README.md - CLI commands → Command dispatcher: dispatches
README.md - Command dispatcher → Setup wizard: runs setup
README.md - Setup wizard → Configuration: writes config
src/init.rs - Command dispatcher → Git worktrees: creates worktree
README.md - Command dispatcher → Worktree sync: provisions worktree
README.md - Worktree sync → Configuration: reads settings
src/sync.rs - Command dispatcher → Isolation setup: sets isolation
README.md - Isolation setup → Configuration: reads settings
src/isolation.rs - Isolation setup → Port registry: tracks allocations
src/isolation.rs - Isolation setup → Postgres or Docker: creates or drops DB
README.md - Command dispatcher → Dev server runner: starts server
README.md - Dev server runner → Port registry: reads allocation
src/run.rs - Command dispatcher → Diagnostics: runs diagnostics
README.md - Diagnostics → Git worktrees: checks worktrees
src/doctor.rs - Diagnostics → Isolation setup: checks allocations
src/doctor.rs - Command dispatcher → Lifecycle and status: lists and cleans
README.md - Editor or agent host → Hook recipes: requests recipe
README.md - Hook recipes → Command dispatcher: configures hook
src/hook.rs - Editor or agent host → MCP server: sends requests
src/mcp.rs - MCP server → Git worktrees: lists worktrees
src/mcp.rs - MCP server → Worktree sync: provisions worktree
src/mcp.rs - MCP server → Isolation setup: sets isolation
src/mcp.rs