| Crates.io | hero_dev_tools |
| lib.rs | hero_dev_tools |
| version | 0.1.5 |
| created_at | 2025-12-27 19:41:22.010744+00 |
| updated_at | 2025-12-27 19:41:22.010744+00 |
| description | Hero Dev Tools - CLI tool for managing developer sessions with btrfs snapshots |
| homepage | |
| repository | https://github.com/youruser/hero_dev_tools |
| max_upload_size | |
| id | 2007713 |
| size | 158,852 |
A Rust CLI tool for managing developer sessions with btrfs snapshots, enabling isolated Claude coding environments.
Hero Dev Tools manages developer sessions where each session gets a btrfs snapshot of /code, allowing developers to make changes in isolation. Sessions are tied to system users named dev_${name}.
herodev init):
cargo build -p hero_dev_tools --release
# Binary will be at target/release/hero-dev-tools
Run init to check and install all dependencies:
# Interactive mode - will prompt before installing
hero-dev-tools init
# Force mode - automatically install everything without prompts
hero-dev-tools -f init
# Specify btrfs image size (default: 50GB)
hero-dev-tools init --size 100
-f, --force Force mode - automatically install/configure without prompts
# System setup and checks
hero-dev-tools init # Check system, prompt to install missing deps
hero-dev-tools -f init # Force install all missing deps without prompts
hero-dev-tools init --size 100 # Use 100GB for btrfs image
# Session management
hero-dev-tools sessions list # List all dev sessions
hero-dev-tools sessions create <name> # Create a new session
hero-dev-tools sessions delete <name> # Delete a session
hero-dev-tools sessions enter <name> # Enter session with shell
hero-dev-tools sessions enter <name> --repo <path> # Enter at specific repo
hero-dev-tools sessions enter <name> --repo <path> --claude # Enter with Claude Code
# Repository management
hero-dev-tools repos list # List git repos in /code
hero-dev-tools repos list --path /some/dir # List repos in specific directory
hero-dev-tools repos reorganize # Reorganize repos to match remote URL structure
hero-dev-tools repos reorganize --path /some/dir
# Changes management
hero-dev-tools changes list <session> # View changes in a session
hero-dev-tools changes push <session> --all -m "commit message" # Push all changes
Launch the interactive TUI menu:
hero-dev-tools
The hero-dev-tools init command performs the following:
System Checks
Package Installation (if missing)
apt-get updateBtrfs Setup (if /code not configured)
/var/lib/btrfs-code.img/code/etc/fstab for persistence/code/ # Root btrfs subvolume
├── .sessions/ # Session snapshots
│ └── dev_<name>/ # Individual session snapshot
├── ${serverhostname}/ # Server hostname (regular directory)
│ ├── ${orgname}/ # Organization (regular directory)
│ │ └── ${reponame}/ # Git repository (regular directory)
Session Creation: Creates a new Linux user dev_<name> and a btrfs snapshot of /code at /code/.sessions/dev_<name>
Isolation: Each session has its own copy of the codebase via copy-on-write btrfs snapshots
Mount Namespace: When entering a session, HeroDev uses Linux mount namespaces to bind-mount the session's snapshot to /code. This means inside the session, /code shows the session's isolated copy while the rest of the system sees the original /code
Changes Tracking: HeroDev can scan for git repositories with uncommitted changes within a session
Push Changes: Commit and push changes from session repos back to their remotes
Repository Reorganization: Move repositories to follow the /code/{server}/{org}/{repo} convention based on their git remote URLs
hero-dev-tools init installs all dependencies and configures btrfs-f flag to skip all prompts for scripted deploymentsApache-2.0