| Crates.io | wtm |
| lib.rs | wtm |
| version | 0.3.1 |
| created_at | 2025-11-01 12:13:12.775946+00 |
| updated_at | 2025-11-03 13:22:19.245402+00 |
| description | CLI and TUI tooling for managing Git worktrees from a unified workspace. |
| homepage | https://github.com/tefla/wtm-worktree-manager |
| repository | https://github.com/tefla/wtm-worktree-manager |
| max_upload_size | |
| id | 1911946 |
| size | 287,943 |
WTM (WorkTree Manager) is a Rust CLI and TUI for working with Git worktrees. It keeps
local repositories organised under a dedicated .wtm workspace directory, lets you
spin up additional worktrees quickly, and exposes a terminal-based dashboard for
working across branches without leaving the keyboard.
wtm init prepares a .wtm directory with metadata and
default configuration.wtm worktree add/list/remove wraps common Git
worktree commands and keeps paths predictable.wtm without arguments launches an interactive dashboard
showing worktrees, embedded terminals, quick actions, and Jira ticket
suggestions.wtm gui launches a desktop interface for
managing worktrees, opening embedded PTY-backed terminal tabs, and triggering
quick actions with the mouse.acli), cached locally, and converted into branch-friendly
slugs.cargo install --path . # install locally
wtm init /path/to/repository # bootstrap .wtm scaffold
wtm worktree add feature/foo # create a new worktree
wtm # launch the dashboard
wtm gui # launch the experimental desktop GUI
The TUI expects the Atlassian CLI (acli) to be installed and authenticated when
fetching Jira issues.
The GUI provides a mouse-friendly interface backed by the same Git helpers as the TUI:
wtm worktree add).Run wtm gui inside a repository that already has .wtm initialised. The GUI
is implemented with egui/eframe; GPU drivers that satisfy wgpu are
required.
wtm init generates the following structure inside the target repository:
.wtm/
config.json # quick actions + misc configuration
terminals.json # persisted state for embedded terminals
workspaces/ # worktree directories managed by WTM (created as needed)
Because the .wtm directory holds environment-specific artefacts, it is excluded
from version control by default.
The codebase is organised around small, focused modules:
| Module | Responsibility |
|---|---|
src/tui/app/mod.rs |
Application state container and high-level orchestration for the dashboard. |
src/tui/app/ui.rs |
All rendering logic for the sidebar, main terminal view, overlays, and help panes. |
src/tui/app/input.rs |
Keyboard event handling, mode switching, and command execution. |
src/tui/app/workspace.rs |
Worktree/tab state management, quick-action selection, and removal prompts. |
src/tui/app/add_worktree.rs |
Jira-powered suggestion engine and form state when creating new worktrees. |
src/git |
Thin wrappers around Git CLI invocations. |
src/jira |
Cache-aware Jira ticket fetching via acli. |
src/commands |
Subcommands for the CLI entry point (initialisation, worktree management). |
Each module includes unit tests covering parsing and state transitions. To check overall coverage run:
cargo llvm-cov --summary-only
More detail can be found in docs/ARCHITECTURE.md and
future ideas live in docs/ROADMAP.md.
cargo fmt # format
cargo test # run unit + integration tests
The project targets stable Rust. Some commands (e.g. coverage) install additional toolchain components automatically when needed.
cargo fmt, cargo test, and cargo llvm-cov --summary-only run
cleanly.This project is released under the MIT licence. See Cargo.toml for details.