AdapterGit (agit) — A TUI-free Git implementation that never hangs. Designed for automation, scripting, CI/CD, and shared computer environments.
- AI agents get stuck when Git opens a TUI editor
- Installing Git on every school lab machine is tedious
- Git commands unexpectedly launch interactive interfaces in scripts
- Native Git behaves unpredictably in non-TTY environments
agit solves all of these.
- Zero TUI blocking — safe for AI agents
- Structured JSON output, machine-readable
- Automatic
[AI-committed]tagging - Dangerous operation guards to prevent AI misoperations
agit ships in two editions. Both implement Git core logic natively from scratch in Rust with zero external Git dependencies:
| Full Edition | Lite Edition | |
|---|---|---|
| Format | Installable application package | Single-file portable binary |
| Installation | One-click installer (.msi / .deb / .dmg) | Download and run, no install needed |
| Size | ~20MB installer | ~10MB single file |
| Use case | Personal dev machines, enterprise deployment | AI agents, CI/CD, temporary environments, USB drives |
| System integration | PATH registration, context menu, file associations | Zero footprint, no system traces |
| Git core | Native Rust implementation | Native Rust implementation |
Both editions share the same native Rust Git core (SHA-1, zlib, Blob/Tree/Commit objects, refs, index, network protocols) — only the distribution format differs.
- Automatically skips all editors
- Intelligently converts interactive commands
- Non-TTY friendly
- Zero-configuration in CI/CD environments
- Works with existing Git repositories and workflows
- Supports a common subset of Git commands
- Gradual replacement of
gitcommands - Transparent fallback mechanism
# Linux / macOS
curl -L https://github.com/bit-torch/AdapterGit/releases/latest/download/agit-lite-x86_64-unknown-linux-musl -o agit
chmod +x agit
./agit --help
# Run directly — no installation required
./agit init# Linux (.deb)
curl -LO https://github.com/bit-torch/AdapterGit/releases/latest/download/agit_0.1.0_amd64.deb
sudo dpkg -i agit_0.1.0_amd64.deb
# macOS (.dmg) — download and double-click to install
# Windows (.msi) — download and run the installer wizard# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Build agit
git clone https://github.com/bit-torch/AdapterGit.git
cd agit
cargo build --release
# Static build (recommended)
cargo build --release --target x86_64-unknown-linux-muslagit init
agit add .
agit commit -m "feat: add new feature"
agit push origin main# AI invocation — never stuck in an editor
agit commit --ai "fix: login bug"
# Structured JSON output
{
"status": "success",
"command": "commit",
"commit_hash": "abc123def456",
"message": "fix: login bug\n\n[AI-committed]",
"timestamp": "2024-01-01T00:00:00Z"
}# Anywhere, no installation needed
cd /tmp/some-project
/path/to/agit add -A
/path/to/agit commit -m "work from public computer"# Temporarily replace git
alias git=agit
# Or only for specific scenarios
alias gai='agit --ai'# Via cargo
cargo install agit --features lite
# Or download the single binary directly
curl -L https://github.com/bit-torch/AdapterGit/releases/latest/download/agit-lite -o agit
chmod +x agit
sudo mv agit /usr/local/bin/ # optional, add to PATH# Via cargo
cargo install agit
# Linux (deb)
sudo dpkg -i agit_0.1.0_amd64.deb
# Linux (rpm)
sudo rpm -i agit-0.1.0-1.x86_64.rpm
# macOS — download .dmg and double-click, or use Homebrew:
brew install bit-torch/tap/agit
# Windows — download .msi installer, or use winget:
winget install bit-torch.agit- Download the appropriate release from GitHub Releases
- Lite:
chmod +x agitand run directly - Full: run the installer or add execute permission and move to a PATH directory
| Feature | agit Full | agit Lite | Native Git |
|---|---|---|---|
| AI-safe (no TUI hang) | Yes | Yes | No |
| Distribution | Installer (.msi/.deb/.dmg) | Single binary (~10MB) | Full installation required |
| Single-file portable | No (requires install) | Yes | No |
| System integration | PATH / context menu / file associations | Zero footprint | Full integration |
| Structured output | JSON / YAML | JSON / YAML | Plain text only |
| Zero-config run | Yes | Yes | No (requires git config) |
| Native Git core | Pure Rust | Pure Rust | C |
| Interactive operations | Not supported | Not supported | Full support |
| Scenario | Recommended Edition |
|---|---|
| Personal dev machine daily use | Full |
| Enterprise batch deployment | Full |
| AI Agent / automation scripts | Lite |
| CI/CD pipelines | Lite |
| Docker containers | Lite |
| USB drive / public computers | Lite |
| Context menu integration needed | Full |
| Quick use in temporary environments | Lite |
agit is purpose-built for AI agents:
agit commit --ai "fix login issue"
# Commit message automatically includes: [AI-committed]# agit automatically converts these dangerous commands
git commit -> agit commit -m "[AI] auto-commit"
git rebase -i -> agit rebase --no-edit
git add -p -> agit add -A
git mergetool -> Rejectedagit log --json
agit status --json
agit diff --json┌─────────────────────────────────────────┐
│ AI Agent / Script │
└─────────────────┬───────────────────────┘
│ JSON / Structured Output
┌─────────────────▼───────────────────────┐
│ agit (Adapter Layer) │
│ ┌───────────────────────────────────┐ │
│ │ TUI Elimination │ Portability │ AI Safety │ │
│ └─────────────────┬─────────────────┘ │
└─────────────────┬───────────────────────┘
│ Pure Rust Native Implementation
┌─────────────────▼───────────────────────┐
│ Native Git Core (Pure Rust) │
│ ┌───────────────────────────────────┐ │
│ │ Object Store │ Refs │ Diff Algorithm │ │
│ │ Pack Files │ Protocol │ Index System │ │
│ └───────────────────────────────────┘ │
└─────────────────┬───────────────────────┘
│ Unified Core → Dual Distribution
┌─────────────────▼───────────────────────┐
│ Distribution Layer │
│ ┌─────────────────┬─────────────────┐ │
│ │ Full Edition │ Lite Edition │ │
│ │ .msi/.deb/.dmg │ Single Binary │ │
│ │ Installer │ Download & Run │ │
│ └─────────────────┴─────────────────┘ │
└─────────────────────────────────────────┘
Full and Lite share the same native Rust Git core — only the distribution format differs.
init— Initialize a repositoryadd— Stage filescommit— Commit changespush/pull— Remote operationsstatus— Show working tree statuslog— Show commit historyclone— Clone a repository
branch— Branch managementcheckout— Switch branchesmerge— Merge branchesstash— Stash changes
rebase -i(interactive rebase)add -p(interactive patching)git mergetool(merge tool)- All other TUI-interactive commands
# Force AI mode
export AGIT_AI_MODE=1
# Set output format
export AGIT_OUTPUT_FORMAT=json # json, yaml, text
# Disable color
export AGIT_NO_COLOR=1~/.config/agit/config.toml
[ai]
auto_tag = true
tag_format = "suffix" # prefix, suffix, trailer
[output]
format = "json"
color = true
[safety]
prevent_force_push = true
max_commit_length = 100- name: Checkout with agit
uses: bit-torch/agit-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}COPY --from=ghcr.io/bit-torch/AdapterGit:latest /agit /usr/local/bin/
RUN agit clone https://github.com/user/repo.gitimport subprocess
result = subprocess.run(
["agit", "commit", "--ai", "Auto-commit by AI"],
capture_output=True,
text=True
)
print(result.stdout) # JSON outputContributions are welcome! agit is open source and we appreciate all forms of contribution.
# 1. Fork and clone the repository
git clone https://github.com/bit-torch/AdapterGit.git
cd agit
# 2. Install Rust
rustup toolchain install stable
# 3. Build
cargo build
# 4. Run tests
cargo testagit follows Conventional Commits:
feat:— New featurefix:— Bug fixdocs:— Documentation updatetest:— Test relatedrefactor:— Code refactoring
agit/
├── src/
│ ├── cli/ # Command-line parsing
│ ├── git/ # Git core functionality
│ ├── ai/ # AI mode implementation
│ ├── output/ # Output formatting
│ └── utils/ # Utility functions
├── tests/ # Integration tests
└── examples/ # Usage examples
This project is licensed under Apache-2.0.
- Fully native implementation — Git core protocols and algorithms implemented from scratch in Rust, with zero external Git library dependencies
- Inspired by GitButler and gitui
- Thanks to every developer who has been frustrated by Git on shared machines
Found a bug or have an idea?
A Git tool designed for the AI era — never hang, ready out of the box.