Skip to main content

Crate marver

Crate marver 

Source
Expand description

marver — a TUI workspace for running AI coding agents.

You describe a task; marver creates a git worktree per repo it touches, opens a tmux session in a directory holding them, and starts an agent there. Agents keep running after the interface closes. When one finishes or gets stuck it says so, and the diff is reviewed and committed from inside marver.

§How it fits together

Two processes share one SQLite database. daemon::Daemon owns the queue, receives the agent’s hooks, and keeps working while nothing is watching; the tui is disposable and holds nothing it cannot re-fetch. Store is the only place state lives, and it rejects any move the lifecycle disallows, so no other component has to remember the diagram.

Policy is kept separable from effect throughout, which is what makes the interesting parts drivable without a tmux server or a real agent: scheduler::Scheduler::plan decides what should start without starting anything, review::Reviewer works against any store, and scheduler::Launch is a trait, so the real launcher::Launcher can be swapped for something inert.

See ARCHITECTURE.md in the repository for the design and the reasoning behind each decision.

§Clocks and payloads

Nothing here reads the clock: every call that writes takes the time as an argument, which is what lets the state machine be tested at fixed instants. chrono and serde_json are re-exported for that reason — their types are unavoidable in this API, and a caller should not have to work out which version to match.

Re-exports§

pub use domain::BlockedKind;
pub use domain::Event;
pub use domain::Repo;
pub use domain::Task;
pub use domain::TaskRepo;
pub use domain::TaskState;
pub use scan::Scanner;
pub use scan::SyncOutcome;
pub use store::BlockedInfo;
pub use store::Store;
pub use store::Transition;
pub use tmux::ControlClient;
pub use tmux::Tmux;
pub use worktree::WorktreeManager;
pub use worktree::branch_name;
pub use chrono;
pub use serde_json;

Modules§

daemon
marverd: the process that outlives the TUI.
domain
Core domain types.
git
A thin wrapper over the git CLI.
hook
Receiving Claude Code lifecycle hooks and turning them into state changes.
launcher
Turning a queued task into a live agent.
notify
Desktop notifications for state changes worth interrupting someone over.
review
Reviewing and committing what an agent produced.
scan
Repo discovery: walk a root directory and find git repositories.
scheduler
Deciding which queued tasks may start.
store
SQLite-backed store. Owned by the daemon; the TUI reaches it as a client.
term
Terminal emulation for tmux panes.
tmux
tmux session lifecycle.
tui
The terminal interface.
worktree
Provisioning and teardown of the worktrees behind a task.