gitkraft-core 0.8.8

Shared core logic for GitKraft — domain models, git operations, repository management
Documentation

⚡ GitKraft

A Git IDE written entirely in Rust — desktop GUI & terminal UI

Crates.io docs.rs License: MIT


GitKraft ships two front-ends from a single Rust workspace:

Binary Use case
gitkraft Desktop GUI — mouse, drag-to-resize panes, commit graph
gitkraft-tui Terminal UI — keyboard-driven, great for SSH & headless machines

Preview

Terminal UI

TUI Demo TUI Welcome TUI Themes TUI Tabs

Features

  • Branch management — create, checkout, delete, rename (local & remote)
  • Commit log with graph — canvas DAG in GUI, box-drawing in TUI
  • Diff viewer — working-dir, staged, and per-commit diffs with coloured hunks
  • Staging area — stage/unstage files or all at once, discard changes
  • Commit creation — write a message and commit from the IDE
  • Stash management — save, pop, drop with optional messages
  • Multi-tab — open multiple repos in tabs (GUI & TUI), sessions persisted
  • Remote operations — fetch, push, pull, remote branch checkout/delete
  • Context menus (GUI) — right-click for checkout, rebase, merge, reset, revert, tag, copy SHA
  • UI zoom (GUI) — Ctrl+/- to scale 50%–200%, persisted
  • Directory browser (TUI) — press o to browse and open repos
  • 27 colour themes — Dracula, Nord, Catppuccin, Tokyo Night, Kanagawa, and more
  • Virtual scrolling — smooth performance with large histories
  • Two-phase diff loading — file list appears instantly, diffs load per-file
  • Draggable pane dividers (GUI) — layout saved automatically
  • Persisted settings — theme, layout, recent repos, open tabs

Installation

# Desktop GUI
cargo install gitkraft

# Terminal UI
cargo install gitkraft-tui

Or download pre-built binaries from the Releases page.

Keyboard Shortcuts

TUI

Key Action
←/→ Switch panes
↑/↓ Navigate within pane
j/k Vim-style navigation
h/l Switch files in diff
Enter Load diff / view file
s/u Stage / unstage file
S/U Stage / unstage all
c Commit
d Discard (press twice)
z/Z Stash save / pop
o Browse & open repo
N/W New tab / close tab
]/[ Next / previous tab
p Pull (rebase) from origin
P Push to origin
F Force push (--force-with-lease)
m Merge selected branch into HEAD
R Rebase onto selected branch
e Revert selected commit
x Reset soft to selected commit
X Reset hard to selected commit
r/f Refresh / fetch
T/O Theme / options
q Quit

GUI

Key Action
Ctrl/Cmd + + Zoom in
Ctrl/Cmd + - Zoom out
Ctrl/Cmd + 0 Reset zoom

Right-click branches or commits for the full context menu.

Building from Source

git clone https://github.com/sorinirimies/gitkraft.git
cd gitkraft
cargo build --release

# Run
cargo run --release -p gitkraft       # GUI
cargo run --release -p gitkraft-tui   # TUI
cargo run --release -p gitkraft-tui -- /path/to/repo

Prerequisites: Rust 1.80+, C compiler, cmake, pkg-config (Linux), libssl-dev.

Themes

27 built-in themes, persisted per-user and shared between GUI and TUI:

Default · Grape · Ocean · Sunset · Forest · Rose · Mono · Neon · Dracula · Nord · Solarized Dark/Light · Gruvbox Dark/Light · Catppuccin Latte/Frappé/Macchiato/Mocha · Tokyo Night/Storm/Light · Kanagawa Wave/Dragon/Lotus · Moonfly · Nightfly · Oxocarbon

Development

just build            # build workspace
just run              # run GUI
just run-tui          # run TUI
just test             # run all tests
just check-all        # fmt + clippy + test + nu tests
just release 0.6.0    # bump, tag, push (runs all checks)
just push-all         # push to GitHub + Gitea
just install-tools    # install git-cliff + nushell

CI runs on both GitHub Actions and Gitea Actions with automated nightly dependency updates.

Architecture

gitkraft-gui ──┐
               ├──▶ gitkraft-core ──▶ git2, redb, chrono, serde
gitkraft-tui ──┘

The GUI follows The Elm Architecture (State → View → Message → Update). Both front-ends are thin wrappers around gitkraft-core.

Contributing

  1. Fork → branch → make changes → ensure just check-all passes → PR

License

MIT


Made with 🦀 by Sorin Irimies