mautbach

mautbach / dbastion

Public

Governed database access for AI agents

10
0
100% credibility
Found Mar 02, 2026 at 10 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Python
AI Summary

dbastion is a command-line tool that analyzes SQL queries for safety, blocks dangerous patterns, estimates costs, and controls execution against databases like PostgreSQL, BigQuery, and DuckDB.

How It Works

1
📖 Discover dbastion

You hear about a helpful guard that checks your database questions to keep your data safe from mistakes.

2
🛠️ Set it up quickly

You add this guard to your computer in moments so it's ready to use.

3
🔗 Link your data

You tell it where your information lives, like pointing to your storage spot.

4
🔍 Peek at your tables

You look around to see what kinds of data you have available.

5
💬 Ask a question

You type a natural question about your data, and it checks if it's safe before answering.

6
Decision time
Safe to go

Your question runs and shows helpful results right away.

Needs your nod

For changes, you give the go-ahead and it makes the update securely.

🚫
Too risky

It blocks the bad idea and explains why to keep everything protected.

🎉 Data safe and sound

You get exactly what you need without accidents, feeling confident your info is protected.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 10 to 10 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is dbastion?

dbastion is a Python CLI bastion for governed database access designed for AI agents. It parses SQL queries, classifies them as reads or writes, blocks dangers like DELETE without WHERE or cartesian joins, injects LIMITs on unbounded SELECTs, and runs dry-runs for cost estimates on Postgres, BigQuery, or DuckDB. Developers get safe execution via `dbastion query` for reads and validation-only writes, plus `dbastion exec` for approved changes.

Why is it gaining traction?

Its agent-first two-command split—freely run reads, human-approve writes via harnesses like Claude Code—beats generic SQL proxies by fitting LLM workflows without custom scripting. Cost guards (block >69GB scans or $N spends) and query logging per project add production polish users notice immediately. Simple install with `uv tool install dbastion[all]` hooks Python devs fast.

Who should use this?

AI engineers wiring agents to query live databases without wipeout risks. Data teams letting LLMs analyze Postgres or BigQuery but needing human gates on DML. Local prototypers using DuckDB who want safeguards before scaling to prod.

Verdict

Grab it for AI agent database access—features like auto-LIMIT and cost caps deliver real safety wins. At 10 stars and 1.0% credibility, it's early alpha with great docs and TPC-H tests; validate your workflows before prod data.

(187 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.