guepard-corp/gfs/use-gfs-cli
Claude Code and agent skill by guepard-corp/gfs
- community
Checking that the SKILL.md file is still in the repository.
Git-like version control for databases using the GFS CLI. Manage database states with commits, branches, time travel, and schema versioning.
Install
npx vskill@latest install guepard-corp/gfs/use-gfs-cliSKILL.md
GFS CLI (Git For database Systems)
GFS brings Git-like version control to your databases. Commit database states, create branches, switch between versions, travel through your database history, and track schema evolution over time.
Supported Databases
- PostgreSQL (versions 13-18)
- MySQL (versions 8.0-8.1)
- SQLite (version 3) — file-based; needs no container runtime
Installation
1. Check if GFS is installed
2. If not installed, install using
Validate the installation:
Global Flags
--json — Machine-Readable Output
Add --json before any subcommand for structured JSON output instead of styled text. This is the recommended approach for scripts and AI agents:
Supported commands: init, commit, checkout, export, import
Status JSON:
gfs --json statusoutputs JSON by defaultgfs status --output jsonoutputs JSON (explicit format)gfs status --output tableforces table output (overrides global--json)
--color — Color Control
Exit Codes
| Command | Code | Meaning | |
|---|---|---|---|
gfs status | 0 | Compute running or not configured | |
gfs status | 1 | Compute configured but not running | |
gfs schema diff | 0 | No schema changes | |
gfs schema diff | 1 | Schema changes detected | |
gfs schema diff | 2 | Breaking changes detected | |
gfs fsck | 0 | Repository consistent, nothing unreachable | |
gfs fsck | 1 | Unreachable objects found (collectable) | |
gfs fsck | 2 | Corruption found: something referenced is missing, or an object could not be identified | |
gfs fsck | 3 | The check could NOT be completed — says nothing about the repository. Handle this before 1 or 2: an unreadable object, a refs/heads entry that could not be read or is absent, or a Kubernetes backend with no reachable cluster all land here, and on a cluster-backed repository with no cluster it is the ordinary answer | |
| any command | 3 | A usage error — an unknown flag, a value that will not parse, a missing subcommand, including bare gfs config. The command did not run, so nothing it printed describes your repository. Check your own arguments before investigating: a mistyped flag produces the same 3 as an unreachable cluster | |
| any command | 0 | --help and --version are requests, not errors |
A ref whose value is present but will not parse — empty, or not a hash — is 2, not 3. A file that could not be read is a hole; a file that reads back as nonsense is corruption, and only the second says something about the repository.
Use exit codes for conditional logic:
Quick Start
1. Check available database providers
This shows all supported database providers, versions, and features.
2. Initialize a repository
First, ask the user which database provider and version they need. Then initialize:
This creates a .gfs directory in your project and, for a container-backed provider, starts a container with the database.
SQLite starts nothing — it is a file this process opens:
3. Check status
Shows the current branch, the HEAD commit, the active workspace, and database container status (including the connection string when there is one). For an embedded provider there is no container section, and the connection string is a sqlite: URL to the file.
The MCP status tool reports the same fields from the same source, so the two surfaces cannot disagree.
Revision References
GFS supports Git-style revision notation for referencing commits:
Basic Formats
HEAD- Current commitmain- Branch tip (any branch name)abc123def456...- Full commit hash (64 characters)
Tilde Notation (Ancestor References)
Reference ancestor commits using ~ notation:
HEAD~1- Parent of HEAD (previous commit)HEAD~5- 5th ancestor of HEADmain~3- 3 commits before main branch tipabc123~2- 2nd parent of commit abc123HEAD~- Same asHEAD~1(defaults to 1)
Usage Examples
Tilde notation works with any command that accepts commit references: checkout, schema show, schema diff, log, etc.
Core Workflow
Best Practices
CRITICAL: Always commit before making mutations to the database. This enables rollback if issues occur.
1. Commit Changes
Create snapshots of your database state (automatically includes schema):
New in schema versioning: Every commit automatically captures the database schema at commit time. This includes both structured metadata (tables, columns, types) and native DDL (SQL).
2. View History
3. Manage Branches
4. Switch Branches
5. Database Management
Start/Stop Database Container
Container-backed providers only. On a SQLite repository every gfs compute action reports that an embedded database is a file this process opens, with no container to start, stop or inspect — and gfs user likewise reports that there is no server, so no roles, passwords or privileges to manage.
6. Query Database
Execute SQL queries directly:
7. Schema Operations
NEW: GFS now provides comprehensive schema versioning and inspection capabilities.
Extract Current Schema
Extract schema from the running database:
Show Schema from Commit
View the schema as it existed at any commit:
Output includes:
- Schema hash (content-addressed identifier)
- Database driver and version
- Structured metadata (schemas, tables, columns)
- Native DDL dump (CREATE TABLE statements, etc.)
Compare Schemas Between Commits
Track schema evolution by comparing commits. Both arguments accept rev~n notation for ancestor references:
Diff output includes:
- Schema hash comparison (detects if schemas are identical)
- Table count changes (+/- tables)
- Column count changes (+/- columns)
- DDL comparison summary
- Suggestion to use external diff tools for detailed DDL differences
Schema Versioning Features
- Automatic Capture: Every
gfs commitautomatically extracts and stores the schema - Content-Addressed: Identical schemas share the same hash (storage deduplication)
- Dual Format: Both JSON metadata and SQL DDL are stored
- Time Travel: View schema at any point in history
- Non-Blocking: Schema extraction failures don't prevent commits
- Backward Compatible: Old commits without schemas work fine
8. Import/Export Data
Export
Import
Supported formats: SQL, CSV, JSON, custom (database-specific formats)
Configuration
GFS stores configuration in .gfs/config.toml:
Common Workflows
Experiment with Schema Changes
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/use-gfs-cli/SKILL.md
Popularity
- Repository stars
- 150
- Repository forks
- 13
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/guepard-corp/gfs/use-gfs-cli)