regent-vcs/re_gent
A local, hook-driven Go CLI that traces AI coding edits back to prompts.
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
re_gent is a hook-driven Go CLI with an entry point at cmd/rgt. A captured tool-using turn becomes a content-addressed Step that links to its predecessor and records a workspace snapshot, tool arguments and results, a session ID, and a timestamp. Steps form a DAG; separate session refs let the histories advance independently and share common ancestors.
The project-local .regent/ directory separates BLAKE3-addressed objects in objects/, session pointers in refs/, a SQLite query index in index.db, and settings in config.toml. SQLite runs in-process through modernc.org/sqlite; Cobra handles commands, go-toml/v2 supports configuration, and go-diff provides Myers diffs. Agent events arrive through hooks rather than a common model API.
Key Capabilities & Differentiators
Use rgt log to find a change in the timeline, rgt blame <file>:<line> to connect a line to a recorded prompt, and rgt show <step-hash> to see the associated diff, tool activity, and conversation. rgt log supports session filtering, graph output, and JSON; rgt sessions lists sessions separately. Recorded conversation history survives /compact and /clear.
Capture covers Claude Code, OpenAI Codex CLI, and OpenCode, with Pi added in v1.1.0. The compatibility boundary is the agent integration, not the underlying model family: Cursor, Cline, and Continue are planned rather than supported. The separate VS Code extension brings line annotations, hover context, and a session timeline into the editor, but still depends on the CLI.
Trade-offs & Limitations
Git remains the source of truth for commits and shared code history. re_gent adds visibility at a different granularity: it records work before it reaches a commit and ties recorded edits to prompts and tool calls. Per-session refs, compare-and-swap ref updates, and ACID transactions protect the audit bookkeeping; they do not prevent two agents from editing the same file. Use separate workspaces if write isolation matters.
Content addressing reduces storage for identical snapshots or blobs, but changing files, transcripts, and tool output still accumulate. Hook coverage determines what can be attributed. Treat .regent/ as sensitive project data, and verify what .regentignore excludes rather than assuming that file ignore rules also redact prompts or tool results.
Hardware & Deployment Guide
Install rgt through Homebrew on macOS or Linux, download a release binary, or run go install github.com/regent-vcs/regent/cmd/rgt@latest. For a source build, the module declares Go 1.23.0 and the build target is ./cmd/rgt. Run rgt init in each project to initialize .regent/ and configure hooks for the chosen agent.
The audit layer uses local files and embedded SQLite: there is no separate database server or GPU requirement. That local footprint does not mean the coding agent or its model runs offline. Release v1.0.0 integrated OpenCode and made hook initialization idempotent; v1.1.0 added rgt init --agent pi, rgt pi-hook, and the npm:@regent-vcs/pi-extension integration, as well as JSON output for rgt sessions.
.regent/objects/ uses BLAKE3 content addressing to deduplicate identical content; .regent/index.db provides an embedded SQLite query index.rgt blame <file>:<line> finds the recorded Step behind a line; rgt show <step-hash> opens the diff, tool details, and conversation context.rgt log supports --session, --graph, and --json; v1.1.0 adds JSON output for rgt sessions.rgt.Developers using a supported coding agent who need to investigate regressions, review intermediate edits, or understand a change before committing it to Git.
Your agent has no supported integration, or your primary need is shared version control, workspace isolation, or centralized audit retention and access controls.
Quick Start & Installation
# Install via Homebrew (macOS/Linux) brew tap regent-vcs/tap brew install regent # Or via Go go install github.com/regent-vcs/regent/cmd/rgt@latest # Initialize in your project cd your-project rgt init # Work with Claude Code, Codex, or OpenCode normally — activity is tracked automatically # See what happened rgt log rgt blame src/file.go:42 rgt show <step-hash>
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| re_gent ★ | 808 | +2 | Go | Apache-2.0 | A local, hook-driven Go CLI that traces AI coding edits back to prompts. |
| Codewhale | 41.2k | +38 | Rust | MIT | Rust coding agent with swappable models, sandboxed execution, and turn receipts |
| gemini-cli | 109.6k | +376 | TypeScript | Apache-2.0 | A Node.js terminal agent for enterprise Gemini coding workflows and MCP tools |
| oh-my-pi | 40.5k | +483 | TypeScript | MIT | A Bun/Rust terminal agent for model-flexible coding with LSP and editor integrat |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/regent-vcs/re_gent.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about re_gent
How does an agent turn become a queryable record?
rgt init in the project to configure hooks for a supported agent. A captured tool-using turn becomes a Step with a parent pointer, workspace snapshot, tool context, and session ID. The session ref tracks the latest Step, and SQLite indexes the history for queries.Does re_gent need a GPU, and what drives its resource use?
Can we use or redistribute it commercially and keep the audit data on our own machines?
.regent/ independently: it can contain source snapshots, prompts, and tool arguments or results.What does re_gent provide that Git history and blame do not?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy