Git stages files. rgit stages symbols.
Naming auth.go:ValidateToken commits that one function — doc comment,
attributes, body — and leaves every other edit in the file uncommitted. No line
numbers, no interactive hunk picking, no git add -p transcript to get wrong.
Anchors are resolved from a real syntax tree and cross-checked against a
language server, so they survive the edits that break line-based staging.
Underneath, rgit is git add <pathspec> && git commit at symbol granularity
and nothing more. Hooks run, filters apply, pre-staged work comes along, trailers
and signing work — because git does all of it. Two staging commands
(diff, commit), blame bounded to a symbol's own extent, log for its
patch-free history, context for one-call repository orientation, plus
meta subcommands (languages, doctor, completion, symbols); everything else
stays plain git.
Start with HUMANS.md to run it, or docs/INSTALL.md to build it.
- Symbol anchors, not line ranges —
FILE:NAMEaddresses a function, method, type, or const;@imports,@header, and@toplevelreach the regions no symbol owns. - Bare positionals —
rgit commit -m "…" auth.go:Validate package.jsonmixes symbols and paths, accepts every git pathspec form, and needs no flags. - Closed loop —
rgit diffemits exactly the anchorsrgit commitconsumes. - Verified extents — tree-sitter resolves, a language server cross-checks;
commithard-fails on a mismatch,diffreports it as a warning (docs/CODES.md). - Git semantics throughout — git's exit codes, git's pathspecs, git's hooks and config. Divergence is treated as a bug.
- Eleven grammars ship unconditionally, a twelfth (SQL) behind a build tag — see § Status below for the full list; anything else stages by path.
| Document | Contents |
|---|---|
| HUMANS.md | Run and use: quick start, behaviour, degraded mode |
| docs/INSTALL.md | Build, installer, cross builds, language servers, env vars, verify, uninstall |
| docs/USAGE.md | Commands, argument grammar, flags |
| docs/ANCHORS.md | Anchor syntax, extents, pseudo-anchors, special paths |
| docs/CODES.md | Exit codes and --porcelain record formats |
| docs/LIMITATIONS.md | What rgit does not do, and why |
| AGENTS.md | Internals, invariants, delegation boundary |
| CONTRIBUTING.md | Commits, tests, dependency policy |
| CHANGELOG.md | What changed in each release |
| SECURITY.md | Reporting a vulnerability, and what is in scope |
| specs/design.md | Design record and the measurements behind it |
Both staging commands are implemented for Go, TypeScript/JavaScript, Python, Markdown,
Shell, YAML, CSS, JSON, TOML, and HTML, plus SQL in a build with the rgit_sql tag,
with the language-server cross-check live for Go, TypeScript/TSX, Python,
Shell, YAML, JSON, CSS, Markdown, and HTML — TOML and SQL resolve with
tree-sitter alone. See specs/design.md
for what was measured, and docs/LIMITATIONS.md for
what rgit does not do.
MIT © Rethunk.Tech