{"id":41347178,"url":"https://github.com/nickyhof/commitdb","last_synced_at":"2026-02-09T05:17:01.749Z","repository":{"id":334151423,"uuid":"1140362479","full_name":"nickyhof/CommitDB","owner":"nickyhof","description":"A Git-backed SQL database engine written in Go. Every transaction is a Git commit, providing built-in version control, history, and the ability to restore to any point in time.","archived":false,"fork":false,"pushed_at":"2026-02-06T04:10:21.000Z","size":4418,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-06T13:35:03.342Z","etag":null,"topics":["database","git","golang","python","sql"],"latest_commit_sha":null,"homepage":"https://nickyhof.github.io/CommitDB/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nickyhof.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-23T07:08:34.000Z","updated_at":"2026-02-06T04:06:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nickyhof/CommitDB","commit_stats":null,"previous_names":["nickyhof/commitdb"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/nickyhof/CommitDB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickyhof%2FCommitDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickyhof%2FCommitDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickyhof%2FCommitDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickyhof%2FCommitDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickyhof","download_url":"https://codeload.github.com/nickyhof/CommitDB/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickyhof%2FCommitDB/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29185107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T00:44:15.062Z","status":"online","status_checked_at":"2026-02-07T02:00:07.217Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","git","golang","python","sql"],"created_at":"2026-01-23T07:08:48.231Z","updated_at":"2026-02-09T05:17:01.739Z","avatar_url":"https://github.com/nickyhof.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CommitDB\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/nickyhof/CommitDB/v2.svg)](https://pkg.go.dev/github.com/nickyhof/CommitDB/v2)\n[![Go Report Card](https://goreportcard.com/badge/github.com/nickyhof/CommitDB)](https://goreportcard.com/report/github.com/nickyhof/CommitDB)\n\nA Git-backed SQL database engine. Every transaction is a Git commit.\n\n**[📚 Full Documentation](https://nickyhof.github.io/CommitDB)**\n\n\u003e ⚠️ **Experimental Project** - This is a hobby project and should not be used in any production environment.\n\n## Why CommitDB?\n\nTraditional databases lose history. Once you UPDATE or DELETE, the old data is gone. CommitDB stores every change as a Git commit, giving you:\n\n- **Complete audit trail** - Know exactly who changed what and when\n- **Instant rollback** - Made a mistake? Restore any table to any point in time\n- **Safe experimentation** - Create a branch, try risky changes, merge if it works\n- **Built-in backup** - Push your entire database to GitHub/GitLab as a remote\n- **No migration headaches** - Branch your schema, test changes, merge when ready\n\n## Features\n\n- 🔄 **Version history** - Every change tracked, nothing lost\n- 🌿 **Git branching** - Experiment in branches, merge when ready\n- ⏪ **Time travel** - Restore any table to any previous state\n- 🔗 **Remote sync** - Push/pull to GitHub, GitLab, or any Git remote\n- 📡 **Shared databases** - Query and JOIN across external repositories\n\n## Quick Start\n\n### Go Library\n\n```go\nimport (\n    commitdb \"github.com/nickyhof/CommitDB/v2\"\n    \"github.com/nickyhof/CommitDB/v2/core\"\n    \"github.com/nickyhof/CommitDB/v2/persistence\"\n)\n\n// In-memory\np, _ := persistence.NewMemoryPersistence()\ninstance := commitdb.Open(\u0026p)\n\n// Or file-backed (a real Git repo)\np, _ := persistence.NewFilePersistence(\"./mydata\", nil)\ninstance := commitdb.Open(\u0026p)\n\ne := instance.Engine(core.Identity{Name: \"Alice\", Email: \"alice@example.com\"})\n\ne.Execute(\"CREATE DATABASE myapp\")\ne.Execute(\"CREATE TABLE myapp.users (id INT, name STRING)\")\ne.Execute(\"INSERT INTO myapp.users VALUES (1, 'Alice')\")\nresult, _ := e.Execute(\"SELECT * FROM myapp.users\")\nresult.Display()\n```\n\n### CLI\n\n```bash\n# Install\ngo install github.com/nickyhof/CommitDB/v2/cmd/commitdb@latest\n\n# In-memory mode\ncommitdb\n\n# File-backed mode (creates a Git repo)\ncommitdb -dir ./mydata\n\n# Execute SQL directly\ncommitdb -e \"CREATE DATABASE myapp\"\n\n# Execute a SQL file\ncommitdb -dir ./mydata -f setup.sql\n\n# Pipe SQL via stdin\necho \"SHOW DATABASES;\" | commitdb -dir ./mydata\n```\n\n## Documentation\n\n- [Installation](https://nickyhof.github.io/CommitDB/installation/)\n- [SQL Reference](https://nickyhof.github.io/CommitDB/sql-reference/)\n- [Branching \u0026 Merging](https://nickyhof.github.io/CommitDB/branching/)\n- [Shared Databases](https://nickyhof.github.io/CommitDB/shared-databases/)\n- [Go API](https://nickyhof.github.io/CommitDB/go-api/)\n- [Storage Format](https://nickyhof.github.io/CommitDB/storage-format/)\n- [Benchmarks](https://nickyhof.github.io/CommitDB/benchmarks/)\n\n## Performance\n\nCommitDB vs [DuckDB](https://duckdb.org/) (1,000 rows, Apple M1 Pro):\n\n| Operation | CommitDB | DuckDB | Ratio |\n|-----------|----------|--------|-------|\n| INSERT | 2.66 ms | 0.19 ms | 14x |\n| SELECT * | 1.39 ms | 0.61 ms | 2.3x |\n| WHERE | 1.42 ms | 0.43 ms | 3.3x |\n| ORDER BY | 2.07 ms | 0.74 ms | 2.8x |\n| COUNT(*) | 1.32 ms | 0.11 ms | 11.6x |\n| SUM | 1.36 ms | 0.13 ms | 10.3x |\n| AVG | 1.35 ms | 0.13 ms | 10.5x |\n| GROUP BY | 1.37 ms | 0.43 ms | 3.2x |\n| LIMIT | 1.32 ms | 0.13 ms | 10.5x |\n| Complex | 1.44 ms | 0.53 ms | 2.7x |\n\n\u003e **Why is DuckDB faster?** DuckDB is an OLAP-optimized columnar database built for analytics. CommitDB uses a row-based Git object model that trades raw query speed for:\n\u003e\n\u003e - **Git-native storage** - Every row is a Git blob, enabling branching, merging, and time travel\n\u003e - **Full audit trail** - Query any table at any point in history\n\u003e - **Standard Git tooling** - Push/pull to GitHub, diff changes, bisect bugs\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.\n\n## License\n\nApache 2.0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickyhof%2Fcommitdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickyhof%2Fcommitdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickyhof%2Fcommitdb/lists"}