# Repository Briefing: regent-vcs/re_gent
> Source: https://repoforai.com/repo/regent-vcs/re_gent (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/regent-vcs/re_gent
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Go
- **License**: Apache-2.0
- **Engineering Health**: A (78/100 · Maintenance 31/35 · Adoption 13/25 · Releases 14/20 · License 20/20)
- **Latest Release**: v1.1.0 (2026-06-01) — https://github.com/regent-vcs/re_gent/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: CLI, Local AI
- **Momentum**: 808 ★ total (+0 24h / +2 7d) · 61 forks
- **Topics**: `ai-agent`, `claude-code`, `developer-tools`, `devtools`, `golang`, `version-control`
- **When to Use**: Best for: Developers using a supported coding agent who need to investigate regressions, review intermediate edits, or understand a change before committing it to Git. Skip if: Your agent has no supported integration, or your primary need is shared version control, workspace isolation, or centralized audit retention and access controls.

## Overview
```text
### Architecture & 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`.
```

## Key Capabilities
```text
- Capture: Agent hooks turn tool-using turns into Steps with a workspace snapshot and the tool calls behind it.
- Storage: `.regent/objects/` uses BLAKE3 content addressing to deduplicate identical content; `.regent/index.db` provides an embedded SQLite query index.
- Concurrency: Per-session refs, compare-and-swap updates, and ACID transactions protect history bookkeeping without isolating workspace writes.
- Provenance: `rgt blame <file>:<line>` finds the recorded Step behind a line; `rgt show <step-hash>` opens the diff, tool details, and conversation context.
- Automation: `rgt log` supports `--session`, `--graph`, and `--json`; v1.1.0 adds JSON output for `rgt sessions`.
- Editor integration: A separate VS Code extension shows inline blame and session timelines on top of an installed, initialized `rgt`.
```

## Quick Start / Clone
```bash
# 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>
```
