Auditstream
Open-source database audit trail engine written in Rust. Zero daemons, pooler-safe actors, and tamper-resistant diffs.Auditstream
Open-source database audit trail engine written in Rust. Zero daemons, pooler-safe actors, and tamper-resistant diffs.
Auditstream records who changed what at the database level with full before and after values, stored in a partitioned append-only history table (auditstream.changes) inside your own database and exported on demand using a commit-safe xid8 cursor.
No 24/7 consumer daemon. No WAL replication slots. No new infrastructure.
Single-row UPDATE throughput on PostgreSQL 19: −7% limited by the disk, −73% limited by the CPU · 2.4M PgBouncer tx with 0 actor leaks · Benchmarks
→ auditstream.dev · Docs · Quickstart · TypeScript SDK · Evidence · Specification
How it works
- Thin adapters attach the actor:
@auditstream/node,@auditstream/prisma(Prisma 7.1+), and@auditstream/drizzle(0.45 & 1.x) propagate identity viaAsyncLocalStorage.run()and append an unpadded base64urlsqlcommentertag (/*auditstream='...'*/) — supporting humans, API keys, services, and AI agents actingonBehalfOfa user. - Database triggers capture atomically: Generated
SECURITY DEFINERtriggers writebefore,after,changed, and actor metadata intoauditstream.changes(statement-level forINSERT/DELETE, row-level withIS DISTINCT FROMforUPDATE). Application roles receiveSELECTonly. - One Rust CLI inspects and exports:
auditstream init,verify,status,history, andexport(JSON Lines & CSV) read committed windows viaxact_id < pg_snapshot_xmin()so concurrent out-of-order commits are never skipped.
Support status
| Target | Status | Details |
|---|---|---|
| PostgreSQL | Supported & tested | PostgreSQL 15–19 (verified 15.20–19.0), PgBouncer 1.26, Neon, and Supabase |
| MySQL | Demand-gated | Not supported yet — PostgreSQL is the only supported database |
| TypeScript SDK | Supported | @auditstream/* for Prisma 7, Drizzle, Next.js 16, Hono, and Express |
| Python SDK | Planned | No native SDK yet — works today via psycopg and SQL comments |
| Plain SQL | Supported | Any language or driver (Go, Ruby, Java, psql) via SQL comments or set_config |
Repositories
| Repository | Description |
|---|---|
auditstream/auditstream |
Rust engine & CLI, normative spec/, conformance fixtures, handbook |
auditstream/auditstream-js |
TypeScript SDKs: @auditstream/node, @auditstream/prisma, @auditstream/drizzle |
auditstream/site |
Documentation & site (auditstream.dev) |
auditstream/auditstream-lab |
Integrated tests of the published CLI and SDK against real PostgreSQL and PgBouncer |
auditstream/homebrew-tap |
Official Homebrew formula (brew install auditstream/tap/auditstream) |
Quick install
Versions: CLI releases · TypeScript SDK releases · compatibility
# Shell (macOS & Linux) curl --proto '=https' --tlsv1.2 -LsSf https://github.com/auditstream/auditstream/releases/latest/download/auditstream-installer.sh | sh # Homebrew (macOS & Linux) brew install auditstream/tap/auditstream # npm npm i -g auditstream # Docker (multi-arch linux/amd64 + linux/arm64) docker run --rm ghcr.io/auditstream/auditstream:latest --version # TypeScript SDKs (or replace @auditstream/prisma with @auditstream/drizzle) pnpm add @auditstream/node @auditstream/prisma
Windows (PowerShell): powershell -ExecutionPolicy Bypass -c "irm https://github.com/auditstream/auditstream/releases/latest/download/auditstream-installer.ps1 | iex"
Community
- Questions: GitHub Discussions · SUPPORT.md
- Chat: Auditstream Discord
License & Security
- License: MIT License
- Security disclosures:
security@auditstream.dev· SECURITY.md - Supply chain: SLSA Build Attestations · GHCR container image
Popular repositories Loading
-
auditstream
auditstream
Public
Open-source database audit trail engine written in Rust. Zero daemons, pooler-safe actors, and tamper-resistant diffs.
Rust 8
-
auditstream-js
auditstream-js
Public
TypeScript SDKs for Auditstream, the open-source database audit trail engine: pooler-safe user, service, and AI-agent actors for Prisma, Drizzle, Hono, Express, and Next.js.
TypeScript 5
-
site
site
Public
Official website and documentation for Auditstream (auditstream.dev), built with Astro.
Astro 3
-
.github
.github
Public
Public organization profile for Auditstream
-
homebrew-tap
homebrew-tap
Public
Homebrew formulae for Auditstream
Ruby 2
-
auditstream-lab
auditstream-lab
Public
Interactive sandbox, cross-repo E2E soak oracle, and pre-release compatibility gauntlet for Auditstream.
TypeScript 2
Repositories
Showing 6 of 6 repositories-
auditstream
Public
Open-source database audit trail engine written in Rust. Zero daemons, pooler-safe actors, and tamper-resistant diffs.
Uh oh!
There was an error while loading. Please reload this page.
auditstream/auditstream's past year of commit activity Rust 8 MIT 0 23 1 Updated Dec 2, 2026 -
site
Public
Official website and documentation for Auditstream (auditstream.dev), built with Astro.
Uh oh!
There was an error while loading. Please reload this page.
auditstream/site's past year of commit activity Astro 3 MIT 0 0 0 Updated Dec 2, 2026 -
auditstream-js
Public
TypeScript SDKs for Auditstream, the open-source database audit trail engine: pooler-safe user, service, and AI-agent actors for Prisma, Drizzle, Hono, Express, and Next.js.
Uh oh!
There was an error while loading. Please reload this page.
auditstream/auditstream-js's past year of commit activity TypeScript 5 MIT 0 7 0 Updated Dec 2, 2026 -
homebrew-tap
Public
Homebrew formulae for Auditstream
Uh oh!
There was an error while loading. Please reload this page.
auditstream/homebrew-tap's past year of commit activity Ruby 2 MIT 0 0 0 Updated Dec 2, 2026 -
auditstream-lab
Public
Interactive sandbox, cross-repo E2E soak oracle, and pre-release compatibility gauntlet for Auditstream.
Uh oh!
There was an error while loading. Please reload this page.
auditstream/auditstream-lab's past year of commit activity TypeScript 2 MIT 0 2 0 Updated Dec 2, 2026 -
.github
Public
Public organization profile for Auditstream
Uh oh!
There was an error while loading. Please reload this page.
auditstream/.github's past year of commit activity 3 0 0 0 Updated Dec 1, 2026
People
This organization has no public members. You must be a member to see who’s a part of this organization.
Top languages
Loading…
Uh oh!
There was an error while loading. Please reload this page.
Most used topics
Loading…
Uh oh!
There was an error while loading. Please reload this page.