DAGDA SEARCH | Back to results | Support

Auditstream · GitHub

Source: https://github.com/auditstream

@auditstream

Auditstream

Open-source database audit trail engine written in Rust. Zero daemons, pooler-safe actors, and tamper-resistant diffs. README.md

Auditstream

CLI Release Spec Release SonarCloud MIT License

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

  1. Thin adapters attach the actor: @auditstream/node, @auditstream/prisma (Prisma 7.1+), and @auditstream/drizzle (0.45 & 1.x) propagate identity via AsyncLocalStorage.run() and append an unpadded base64url sqlcommenter tag (/*auditstream='...'*/) — supporting humans, API keys, services, and AI agents acting onBehalfOf a user.
  2. Database triggers capture atomically: Generated SECURITY DEFINER triggers write before, after, changed, and actor metadata into auditstream.changes (statement-level for INSERT/DELETE, row-level with IS DISTINCT FROM for UPDATE). Application roles receive SELECT only.
  3. One Rust CLI inspects and exports: auditstream init, verify, status, history, and export (JSON Lines & CSV) read committed windows via xact_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


License & Security

Popular repositories Loading

  1. auditstream auditstream Public

    Open-source database audit trail engine written in Rust. Zero daemons, pooler-safe actors, and tamper-resistant diffs.

    Rust 8

  2. 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

  3. site site Public

    Official website and documentation for Auditstream (auditstream.dev), built with Astro.

    Astro 3

  4. .github .github Public

    Public organization profile for Auditstream

    3

  5. homebrew-tap homebrew-tap Public

    Homebrew formulae for Auditstream

    Ruby 2

  6. 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

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.