GitButler Code
Sign in Create an account

Social coding for the agentic age

Brought to you by the people who made GitHub 15 years ago, GitButler Code is a Git compatible forge, built for the agentic workflow. It is open source, fast, and built for the way that agents work for you.

Reimagine everything.

Create an account Add your domain

Finally, some space to yourself

gitbutler.com/code canonical, main moves only by integrating
Sschacon/code private, only schacon sees this
05b5e08
17f7f79
c335151
pull request 14
propose
orgs-page+6,529 −1,3352 commits
gj-rpc+2,822 −113 commits
Organizations are verified
Organizations aren't just weird user-like accounts and spaces can't be squatted.
Claim your organization's space with a DNS TXT record and host your projects there.
All your branches are private by default
Even for private projects, your team can't see your branches until you want to share them. Think of it like your local disk. Feel safe with your agents keeping all your work here.
Projects only have one branch
The main project just has one branch and it can't be written to directly. Every user has a fork and can only write to their and integrate when ready.

Actually social coding.

Share a branch with a peer or an agent and work on it together. You hear when they push, and when your work diverges, there's a clear way through.

Don't be afraid of accidental force-pushes or collaborating on branches together, ever again.

How sharing works
gj-rpcschacon/code Share
alice pushed 2 commitsgrit pull
Diverged. You and alice both changed src/rpc.rs. Your push was refused, so nothing is lost.
grit pull --rebase or Ask factory to resolve it

Forget merge queues.

Your coworkers and agents can do trunk-based development, even landing thousands of commits per minute, with post-merge and pre-deploy testing, verification and smart resolution and rollback.

maingitbutler.com/code
main

Check out the code, not the history.

grit checkout downloads one snapshot of main, cut down to the paths you need, and builds a normal Git repository around it. Commit as usual. grit checkin grafts your work back onto the real history.

git cloneevery commit, 12,188 of them237 MiB
grit checkoutmain, all 2,884 files~10 MiB
grit checkout libone slice, 1,344 files~5 MiB

gitbutler.com/grit, approximate sizes.

Slices

Name the parts of a project people work on. Slices live on main, versioned with the code they describe, so every checkout sees the same ones.

[slices.lib]
description = "The library everything builds on"
paths = ["grit-lib"]

[slices.server]
description = "Hosting: HTTP server and protocol"
paths = ["grit-http-server", "grit-protocol"]
$ grit checkout https://code.gitbutler.com/gitbutler.com/grit lib
✓ Checked out ~/lib on you/amber-brook
paths grit-lib
files 1,344 files
history one commit, standing for main

Monorepo first.

Keep every part of a project in one place, and work on just the part you need. Everyone checks out their own corner of the same project, and every change lands on the same main.

cli slice1,839 files
server slice412 files
protocol slice1,352 files
grit-cli
495 files
grit-lib
1,344 files
factory/sirocco-inflate +148 −13
grit-protocol
8 files
grit-utils
389 files
grit-http-server
15 files
content
240
docs
134
examples
100
site
78
scripts
32
test-support
22
gitbutler.com/grit is one project of 2,884 files. Each tile is a top-level folder. Slices take folders from anywhere in the project, and they can overlap.
Small checkouts of a big project
The cli slice is 1,839 files and the server slice is 412. Nobody waits on the parts they never open.
Give each agent its corner
An agent fixing the server sees the server, not the whole project. Less to read, less to get wrong.
One main, one history
Work from any slice goes back onto the real history, so a change that spans slices is still one pull request.

History as an API.

Ask the server your archaeology questions.

Better
It holds the whole history, so blame, log and graph walks are exact even from a one-commit checkout.
Faster
One request, and only the answer comes back. No 237 MiB clone to run git log.
At any scale
Built to answer across hundreds of millions of commits.
POST /.grit/rpc/gitbutler.com/grit/history
who changed grit-lib/src/blame.rs, latest 5
aeeb450fix: make blame_file paths repository-relativeOct 29
52f1fb9Look up single tree paths through Odb::tree_entry_at_pathOct 29
1469427Review: per-line encoding_lossy, restore dropped testsOct 28
5836a76Fix blame encoding_lossy and content_bytes for non-UTF-8 linesOct 28
4274a24Score copy candidates before blaming source filesOct 28

Agent first.

Hand your agent one prompt.

It installs Grit, reads the docs written for agents, and learns where its work goes: its own branches in your private space, proposed back when they're ready.

Prompt for your agent
You're working with code hosted on GitButler Code (https://code.gitbutler.com), which runs on Grit, a Git engine and command line written in Rust. Set yourself up first:

1. Run `grit --version`. If grit is missing, install it:
   curl -fsSL https://grit-scm.com/install | sh
2. Read https://grit-scm.com/llms.txt for an index of the Grit docs, then https://grit-scm.com/docs/agents/ for how to drive grit as an agent.
3. Save the grit skill so you remember it:
   mkdir -p .agents/skills/grit && grit skill > .agents/skills/grit/SKILL.md
4. Pass --markdown to every grit command. Read stdout for the result and check the exit code.

How GitButler Code works:
- Organizations are domains. Their canonical projects live at https://code.gitbutler.com/<domain>/<project>, and nobody pushes to them.
- My private space is https://code.gitbutler.com/<me>/<project>. Upstream's branches, usually just main, are read-only there. Put your work on a new branch and push it with:
  grit push <me>/<project> <branch>
- If you aren't logged in, ask me to run `grit login`. It opens a browser for me to approve.
- For part of a large project, check out a snapshot instead of cloning everything:
  grit checkout https://code.gitbutler.com/<domain>/<project> [slice]
  Commit as usual, then run `grit checkin` to put your commits back on the real history.
- When the branch is ready, give me the link to propose it:
  https://code.gitbutler.com/<me>/<project>/pulls/new/<branch>
  A member of the organization integrates it.

Git compatible, Grit supercharged.

GitButler Code runs on Grit, a rewrite of Git in Rust from the GitButler team. It reads the same repositories and speaks the same wire protocol, so every Git client you use today just works.

Visit grit-scm.com curl -fsSL https://grit-scm.com/install | sh
Speed
Performance comes first, measured against real git on large repositories.
Simplicity
A smaller, opinionated command line, with the legacy subcommands left behind.
Built for agents
Every command answers in plain text, --json or --markdown, so agents read results instead of scraping them.
Embeddable
grit-lib is a clean Rust library. Link Git into your own tools, the way GitButler Code does.

Own the domain, own the project.

Prove it with a TXT record and you're its first owner. Owners add members; members integrate. No domain yet? you.gitbutler.dev is already yours.

Add your domain
Name
_gitbutler-code.gitbutler.com
Type
TXT
Value
gitbutler-code-verification=<token>