The Problem
Developers using plain Git must repeatedly run low‑level commands (rebase -i, cherry‑pick, etc.) to manage stacked or parallel work streams. The workflow is error‑prone and hard to automate, especially for AI‑assisted coding assistants that need a predictable, manipulable branch structure.
What This Does
GitButler replaces the native Git CLI with a GUI and a dedicated but CLI that expose stacked and parallel branches as first‑class objects. The desktop client lives under apps/desktop/ and is built with Tauri (Rust backend) and Svelte front‑end components. Core Rust code is declared in Cargo.toml and compiled into the Tauri runtime, while UI logic resides in files such as apps/desktop/src/components/branch/BranchCard.svelte and apps/desktop/src/components/commit/CommitMessageEditor.svelte. The CLI wrapper is defined in apps/desktop/src/lib.ts, exposing commands that invoke the same Rust services.
How To Use It
Setup
Install Rust toolchain (required by Cargo) rustup toolchain install stable
Install Node (used by the front‑end)
nvm install 20 && nvm use 20
Install desktop dependencies
cd apps/desktop npm ci # reads apps/desktop/package.json Build the Rust backend cargo build --release # uses Cargo.toml at repo root Run the Tauri dev server (GUI) npm run tauri dev Install the CLI globally (optional) cargo install --path . # installs the but binary
The Makefile defines a make dev target that runs the above steps; consult it for exact command names.
Configuration
Environment files are present in apps/desktop/ (.env.development, .env.production, .env.testing). They contain API keys for forge integrations (GitHub, GitLab, Gerrit). These files must be removed from version control and replaced with a local, secure method (e.g., .envrc or a secrets manager). The application reads them via dotenv at startup.
Running It
GUI: after npm run tauri dev, the desktop window launches automatically. Main entry point is apps/desktop/src/app.html, which loads the Svelte root component. CLI: the installed but binary provides sub‑commands such as but branch create, but commit amend, and but undo. Run but --help for the full list.
Real‑World Use
A CI pipeline can invoke the CLI to generate a stacked branch for an automated refactor:
In a CI job
git checkout main but branch create feature/refactor-xyz --stack base but commit amend -m "Apply AI‑generated refactor" but push origin feature/refactor-xyz
The resulting branch appears in the GitButler UI as a stacked node, ready for review.
Code Health & Issues
High – Secrets in repo – .env.development and .env.production contain credentials (apps/desktop/.env.). Must be scrubbed and added to .gitignore. Medium – Missing license file – No LICENSE present; repository only includes LICENSE.md which may not be recognized by tooling. Medium – Incomplete test coverage – Only 4 test files detected; core Rust logic and many Svelte components lack unit tests. Low – CI configuration gaps – GitHub Actions exist (.github/workflows/.yaml) but no explicit job for running Rust tests; only web/E2E tests are defined. Low – Dependency hygiene – Cargo.lock is committed (good for reproducibility), but no automated Dependabot updates for Rust crates; only dependabot.yml targets npm.
Overall, the repo compiles cleanly and the CI pipeline builds the desktop app, indicating a functional baseline.
The Bottom Line
GitButler delivers a practical UI/CLI layer that simplifies branch stacking and commit manipulation, useful for teams integrating AI tools into their Git workflow. The codebase is functional but requires cleanup of exposed secrets, a proper license, and broader test coverage before production adoption. Suitable for organizations comfortable managing Rust/Tauri builds and willing to address the identified security hygiene gaps.