A git + Bitbucket DC CLI with a hook-based plugin system. Generic verbs, language-agnostic plugins via JSON-RPC over stdio.
bitgit is a Go CLI that wraps git and Bitbucket Data Center
operations behind generic verbs โ bitgit pr create, bitgit commit,
bitgit push, bitgit doctor โ and routes every action
through a plugin pipeline.
Plugins auto-attach based on git remote, project key, repo slug, or branch prefix. They can veto an operation (corp policy: "no force-push to release/*") or mutate it (auto-prepend Jira keys, inject reviewers, rewrite commit messages). Plugins speak JSON-RPC over stdio โ write them in any language.
Same command surface across every backend. bitgit pr create works the same way whether you're on Bitbucket DC, GitHub, or somewhere else.
pre-pr-create, pre-commit, pre-push, pre-pr-merge, post-pr-createโฆ plugins fire automatically.
JSON-RPC 2.0 over stdin/stdout. Write plugins in Go, Python, Node, Rust, bash โ anything that can read and write a line.
Match on remote host, project key, repo slug, branch prefix, or regex. The right plugins fire for the right repos automatically.
Pre-alpha โ under active development.
The CLI surface and plugin runtime are in place. Verbs are stubs while the Bitbucket DC integration is being built. Watch exisz/bitgit for v0.1.0.
brew install exisz/tap/bitgit
go install github.com/exisz/bitgit/cmd/bitgit@latest
Grab the right archive from GitHub Releases โ darwin/linux/windows ร arm64/amd64.
$ bitgit --help
$ bitgit doctor # sanity-check chassis + plugins
$ bitgit plugin list # plugins under ~/.bitgit/plugins/
$ bitgit pr create # (stub โ under development)
~50 lines in any language. Drop a plugin.toml + executable under ~/.bitgit/plugins/<name>/:
name = "corp-policy"
version = "1.0.0"
entrypoint = "./corp-policy"
hooks = ["pre-pr-create", "pre-pr-merge"]
[match]
remote_host = ["bitbucket.example.com"]
project_key = ["PLAT"]
Then the plugin reads JSON-RPC requests from stdin and writes responses to stdout. See the protocol spec for the wire format.
| Hook | Verb | Veto | Mutate |
|---|---|---|---|
pre-commit | bitgit commit | โ | โ |
pre-push | bitgit push | โ | โ |
pre-pr-create | bitgit pr create | โ | โ |
post-pr-create | bitgit pr create | โ | โ |
pre-pr-merge | bitgit pr merge | โ | โ |
post-pr-merge | bitgit pr merge | โ | โ |