gfs
Health Gecti
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 111 GitHub stars
Code Basarisiz
- rm -rf — Recursive force deletion command in .github/workflows/build-release.yml
Permissions Gecti
- Permissions — No dangerous permissions requested
This MCP server provides Git-like version control for database systems. It uses Docker to manage isolated database environments, allowing AI agents and developers to create snapshots, branch, and instantly roll back changes.
Security Assessment
The tool inherently interacts with sensitive data by design, as it connects directly to your databases and executes commands. The primary security concern is a recursive force deletion command (`rm -rf`) found in a GitHub Actions workflow file (`build-release.yml`). While this is an automation risk during development rather than a direct runtime threat to your local database, it indicates slightly careless scripting practices. The automated scan found no hardcoded secrets and noted no dangerous MCP permissions. Overall risk is rated as Medium due to the direct database access required for the tool to function and the workflow scripting concern.
Quality Assessment
The project is under active development and appears to be well-maintained. It is licensed under the permissive MIT license. It demonstrates strong community trust and interest, backed by 111 GitHub stars, and includes links to OpenSSF best practices and security scorecards.
Verdict
Use with caution — while the project is active and popular, expect incomplete features due to its early development stage, and be fully aware of the broad database access you must grant to the tool.
Git For database Systems

Git For database Systems
Safe database version control for AI coding agents and developers.
Works with Claude Code, Cursor, Cline, Windsurf, and any skills / MCP-compatible agent
Table of Contents
- Important Notice
- What is GFS?
- Built for AI Agents
- Supported Databases
- Features
- Installation
- Quick Start
- AI Agent Setup
- MCP Server
- Command Reference
- Configuration
- Troubleshooting
- Development
- Contributing
- Community
- Roadmap
- License
Important Notice
This project is under active development. Expect changes, incomplete features, and evolving APIs.
What is GFS?
GFS (Git For database Systems) brings Git-like version control to your databases. It enables you to:
- Safe for AI agents — automatic snapshots protect against agent mistakes and data loss
- Rollback instantly — undo any database change in seconds
- Branch to let agents and developers experiment without risking data
- Time travel through your database history
- Commit database states with meaningful messages
- Collaborate — agents and humans working on the same database with confidence
GFS uses Docker to manage isolated database environments, making it easy to work with different versions of your database without conflicts.
Built for AI Agents
AI coding agents are powerful but dangerous around databases. A single bad migration, a dropped table, or corrupted data can be costly to recover from — if recovery is even possible.
GFS makes agent-driven database work safe by default:
- Every change is a commit. If an agent makes a mistake, roll back in one command.
- Branches are free. Let agents experiment on an isolated branch — merge only what works.
- MCP integration. Agents interact with GFS natively through the Model Context Protocol, no shell wrappers needed.
- Less token waste. Import, export, and query operations run through GFS instead of the agent generating boilerplate SQL.
Without GFS: an agent drops a table or runs a bad migration — you're left manually restoring from backups (if they exist).
With GFS: gfs checkout HEAD~1 — done. Your database is back to the previous state in seconds.
Supported Databases
- PostgreSQL (versions 13-18)
- MySQL (versions 8.0-8.1)
Run gfs providers to see all available providers and their supported versions.
Features
- Initialize database repositories
- Commit database changes
- View commit history
- Checkout previous commits
- Create and switch branches
- Check database status
- Query database directly from CLI (SQL execution and interactive mode)
- Schema extraction, show, and diff between commits
- Export and import data (SQL, custom, CSV)
- Compute container management (start, stop, logs)
- Repository config (user.name, user.email)
Installation
curl -fsSL https://gfs.guepard.run/install | bash
Quick Start
1. Check available database providers
gfs providers
This shows all supported database providers and their versions.
2. Create a new project directory
mkdir my_project
cd my_project
3. Initialize the repository
gfs init --database-provider postgres --database-version 17
This creates a .gfs directory and starts a PostgreSQL database in a Docker container.
4. Check status
gfs status
This shows the current state of your storage and compute resources.
5. Query your database
# Execute a SQL query directly
gfs query "SELECT 1"
# Or open an interactive terminal session
gfs query
6. Make changes and commit
gfs query "CREATE TABLE users (id SERIAL PRIMARY KEY, name TEXT NOT NULL);"
gfs query "INSERT INTO users (name) VALUES ('Alice'), ('Bob');"
gfs commit -m "Add users table"
7. View commit history
gfs log
8. Time travel through history
gfs checkout <commit_hash>
Your database will be restored to that exact state.
9. Work with branches
gfs checkout -b feature-branch # Create and switch to a new branch
gfs checkout main # Switch back to main
AI Agent Setup
Connect your AI agent to GFS in under a minute.
Claude Code
GFS works with Claude Code out of the box via MCP:
claude mcp add gfs -- gfs mcp --path /path/to/your/repo
Claude Desktop
Add to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"gfs": {
"command": "gfs",
"args": ["mcp", "--path", "/path/to/your/repo"]
}
}
}
Restart Claude Desktop and GFS operations will be available as tools.
Cursor / Cline / Windsurf
Use the stdio MCP server:
gfs mcp --path /path/to/your/repo
Configure your editor's MCP settings to point to this command. Refer to your editor's MCP documentation for the exact configuration format.
What agents can do with GFS
Once connected, your AI agent can:
- Commit before and after making changes — creating safe checkpoints
- Branch to try risky migrations without affecting the main database
- Roll back if something goes wrong
- Query the database to inspect data
- Diff schemas between commits to understand what changed
- Import/export data without generating large SQL blocks in context
MCP Server
GFS includes a Model Context Protocol (MCP) server for programmatic access to all GFS operations.
Stdio mode (default)
gfs mcp
# or explicitly
gfs mcp stdio
Designed for direct integration with MCP-compatible clients.
HTTP mode
# Start as a background daemon
gfs mcp start
# Check daemon status
gfs mcp status
# Stop the daemon
gfs mcp stop
# Start in foreground (default port: 3000)
gfs mcp web
# Custom port
gfs mcp web --port 8080
Specifying a Repository Path
gfs mcp --path /path/to/repo
Command Reference
Revision References
GFS supports Git-style revision notation for referencing commits in commands like checkout, schema show, and schema diff:
HEAD- Current commitmain- Branch tip (any branch name)abc123...- Full commit hash (64 characters)HEAD~1- Parent of HEAD (previous commit)HEAD~5- 5th ancestor of HEADmain~3- 3 commits before main branch tip
Examples:
gfs checkout HEAD~1 # Checkout previous commit
gfs schema diff HEAD~5 HEAD # Compare schema with 5 commits ago
gfs schema show main~3 # View schema from 3 commits back
gfs providers
List available database providers and their supported versions.
gfs providers
gfs providers postgres # Show details for a specific provider
gfs init
Initialize a new GFS repository.
gfs init --database-provider <provider> --database-version <version>
gfs status
Show the current state of storage and compute resources.
gfs status
gfs status --output json
gfs commit
Commit the current database state.
gfs commit -m "commit message"
gfs log
Show the commit history.
gfs log
gfs log -n 10 # Limit to 10 commits
gfs log --full-hash # Show full 64-char hashes
gfs checkout
Switch to a different commit or branch.
gfs checkout <commit_hash> # Checkout a specific commit
gfs checkout -b <branch_name> # Create and checkout a new branch
gfs checkout <branch_name> # Checkout an existing branch
gfs query
Execute SQL queries or open an interactive database terminal.
gfs query "SELECT * FROM users" # Execute a query
gfs query # Open interactive terminal
Options: --database, --path
gfs schema
Database schema operations: extract, show, and diff.
gfs schema extract [--output <file>] [--compact]
gfs schema show <commit> [--metadata-only] [--ddl-only]
gfs schema diff <commit1> <commit2> [--pretty] [--json]
gfs export
Export data from the running database.
gfs export --output-dir <dir> --format <fmt>
Formats: sql (plain-text SQL), custom (PostgreSQL binary dump)
gfs import
Import data into the running database.
gfs import --file <path> [--format <fmt>]
Supports .sql, .dump, and .csv files. Format is inferred from file extension when omitted.
gfs config
Read or write repository config.
gfs config user.name # Read
gfs config user.name "John Doe" # Write
gfs compute
Manage the database container.
gfs compute start # Start the container
gfs compute stop # Stop the container
gfs compute status # Show container status
gfs compute logs # View container logs
Configuration
GFS uses Docker to manage database containers. Make sure Docker is installed and running before using GFS.
Requirements
- Docker (latest version recommended)
- Bash/Zsh shell
curlfor installationtarfor extracting releases
Troubleshooting
Docker not running
# Start Docker Desktop or Docker daemon
# On macOS/Windows: Start Docker Desktop
# On Linux: sudo systemctl start docker
Port conflicts
If the default port is already in use, stop the conflicting service or check gfs status for the assigned port.
Connection issues
- Check that the container is running:
docker ps - Verify the connection details with:
gfs status - Ensure Docker has network access
Development
Prerequisites
- Rust (latest stable version)
- Docker
- Cargo
Running locally
git clone https://github.com/Guepard-Corp/gfs.git
cd gfs
cargo build
Run commands using cargo:
cargo run --bin gfs init --database-provider postgres --database-version 17 [--port 65432]
cargo run --bin gfs commit -m "v1"
cargo run --bin gfs log
cargo run --bin gfs status
Testing
cargo test # Run all tests
cargo test-all # Full suite including E2E (sequential)
cargo test -- --test-threads=1 # Alternative sequential execution
cargo cov # Generate coverage report
cargo test <test_name> # Run specific tests
cargo test -- --nocapture # Run with output
Optional: Better test reports and code coverage
- cargo-nextest: Faster, clearer test output. Install with
cargo install cargo-nextest, then runcargo nextest runorcargo nt. - cargo-llvm-cov: Code coverage. Install with
cargo install cargo-llvm-cov(requiresrustup component add llvm-tools-preview). Runcargo llvm-cov --html --openfor an HTML report.
Building for release
cargo build --release
The binary will be available at target/release/gfs.
Contributing
We welcome contributions! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.
Please see our CONTRIBUTING.md for detailed guidelines on:
- How to submit contributions
- Code contribution workflow
- Good first issues to get started
- Development best practices
For quick questions, join our Discord community.
Community
- Discord: Join our community
- YouTube: Watch the demo
- Issues: Report bugs or request features
Roadmap
Check Roadmap
License
This project is licensed under MIT License. See the LICENSE file for details.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi