Open Source
MIT License

Git for Databases

GFS is an open-source database version control system. Commit, branch, time-travel, and diff your PostgreSQL and MySQL databases. Ships with a built-in MCP server for AI agents.

PostgreSQL 13 – 18MySQL 8.0 – 8.1
terminal
# Install GFS
curl -fsSL https://gfs.guepard.run/install | bash

# Initialize a new database repository
gfs init --database-provider postgres --database-version 17

# Start working
gfs query "CREATE TABLE users (id SERIAL PRIMARY KEY, name TEXT);"
gfs commit -m "Add users table"
gfs log
gfs v1.7 · PostgreSQL 17 · 1 commit on main

Version control your database like you version control code

Commit, branch, checkout, diff. The same workflow you already know. Runs locally with Docker. No cloud account required.

Quick start

From install to first commit in 2 minutes

One curl command to install. One command to init. GFS runs locally via Docker. Your data never leaves your machine. Branch for experiments, rollback mistakes, diff schemas between commits.

One-line install, curl and run
Runs locally via Docker. No cloud required
Branch for risky changes, rollback in one command
Diff schemas between any two commits
Built-in MCP server for AI agent integration
quick start
# Install GFS
curl -fsSL https://gfs.guepard.run/install | bash

# Initialize a PostgreSQL 17 repository
gfs init --database-provider postgres --database-version 17

# Create a table and insert data
gfs query "CREATE TABLE users (id SERIAL PRIMARY KEY, name TEXT NOT NULL);"
gfs query "INSERT INTO users (name) VALUES ('Alice'), ('Bob');"

# Commit your changes
gfs commit -m "Add users table"

# View history
gfs log

# Branch for a risky migration
gfs checkout -b experiment
gfs query "ALTER TABLE users ADD COLUMN email TEXT;"
gfs commit -m "Add email column"

# Something went wrong? Go back to main
gfs checkout main

CLI Reference

Every command you need

Git-like interface. Zero learning curve.

gfs init

Initialize a new database repository

gfs commit

Snapshot your current database state

gfs log

View full commit history with hashes

gfs checkout

Restore to any previous commit or branch

gfs checkout -b

Create a new branch for isolated work

gfs query

Run SQL or open interactive terminal

gfs schema diff

Diff schemas between any two commits

gfs schema show

Display schema at a specific commit

gfs export

Export data as SQL, custom, or CSV

gfs import

Import from .sql, .dump, or .csv files

gfs providers

List supported database providers & versions

gfs compute

Start, stop, and manage DB compute lifecycle

Git-style revision references

HEADCurrent commit
HEAD~1Parent of HEAD
HEAD~55th ancestor
mainTip of main branch
main~33 commits before main
abc123...Full 64-char hash

Features

Everything you'd expect from version control

Core

Branching

Create isolated branches for experimentation without affecting the main database. Work on risky migrations in a branch. Merge or discard when done.

Core

Time Travel

Every commit is a checkpoint. Restore your database to any previous state with gfs checkout HEAD~1. Undo bad migrations in one command.

AI

Safe for AI Agents

Built-in MCP server lets agents commit before risky changes, branch for experiments, and rollback on errors. No shell wrappers. No token waste.

DevOps

Schema Diffing

Compare schemas between any two commits with gfs schema diff. Catch unintended changes before they reach production. Output as pretty-print or JSON.

Data

Import & Export

Import from .sql, .dump, or .csv files. Export in plain SQL, PostgreSQL binary, or CSV. Move data in and out without bloating your agent's context.

CLI

Interactive Query

Run ad-hoc SQL with gfs query "SELECT ..." or drop into an interactive terminal with gfs query. Inspect data at any commit or branch.

Built-in MCP Server

AI agents get database superpowers

GFS ships with a native MCP server. Agents can commit, branch, query, and rollback without shell wrappers. Fewer tokens, fewer errors.

Claude Codeterminal
claude mcp add gfs -- gfs mcp --path /path/to/your/repo
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "gfs": {
      "command": "gfs",
      "args": ["mcp", "--path", "/path/to/your/repo"]
    }
  }
}
Cursor / Windsurf / Clineterminal
gfs mcp --path /path/to/your/repo

MCP Server Modes

stdio · Default, direct pipehttp · gfs mcp web, HTTP daemonbackground · gfs mcp start/stop
Agent workflowsafe migration pattern
# Agent commits before making changes
gfs commit -m "checkpoint before migration"

# Agent branches for safety
gfs checkout -b agent-migration

# Agent runs the migration
gfs query "ALTER TABLE orders ADD COLUMN status TEXT DEFAULT 'pending';"

# Agent verifies the schema
gfs schema diff main agent-migration

# If good → merge. If bad → rollback
gfs checkout main
gfs checkout HEAD~1  # instant rollback
Production never touched. Agent works on isolated branch.

Works with every MCP-compatible agent

CursorClaude CodeClaude DesktopWindsurfContinueClineOpenAI Agents SDKLangChainCrewAIAutoGenVercel AI SDK

Why GFS

The problem GFS solves

Agents break databases

A bad migration or dropped table destroys your data. GFS makes every change a commit. Rollback to any point with one command.

Branches are free

Create a branch for every experiment. If the agent fails, discard the branch. If it succeeds, merge. Zero risk to your main database.

MCP eliminates token waste

Native MCP tools mean agents don't need shell wrappers or large SQL dumps in context. Direct operations, fewer tokens, fewer errors.

Install GFS in 30 seconds

curl -fsSL https://gfs.guepard.run/install | bash

Open source. MIT licensed. PostgreSQL 13–18, MySQL 8.0–8.1. Runs locally via Docker.