foxbyte
Health Uyari
- License — License: AGPL-3.0
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 8 GitHub stars
Code Gecti
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
Self-hosted PostgreSQL 18 with copy-on-write branches, row-level change streams, and a hash-chained record of every schema change.
Self-hosted PostgreSQL 18 with copy-on-write branches, row-level change streams, and a hash-chained record of every schema change.
Branch a Postgres like a working copy, on a machine you run, and keep a record
of who changed the schema. The command is fox.
Install
One installer. On macOS it installs fox, installs Lima
if it is missing, and runs fox setup. On Linux it installs fox and stops;
the next line is sudo fox start.
curl -fsSL https://get.thefoxbyte.com/install.sh | sh
sudo fox start # Linux only: ZFS, Docker, the Postgres image, then the stack
Windows, in PowerShell (not Command Prompt). Branches live on btrfs inside a
dedicated WSL2 distro (docs/windows-setup.md):
irm https://get.thefoxbyte.com/install.ps1 | iex
The first run opens https://localhost:8080 with a one-time setup token in
the link, and the first account is the admin. Nothing is hardcoded, and no API
key is minted for you. There is no Compose file: fox setup and fox start
pull the engine image and bring the stack up. Install notes, release
signatures, and every flag: docs/reference.md.
Branch a database in seconds
main already has three small sample tables (users, projects, events)
unless you started with FOX_NO_DEMO=1.
fox branch create qa
Prints the elapsed time and a connection string. qa is its own Postgres on
a copy-on-write clone. main is unchanged.
fox sql --branch qa "CREATE TABLE notes (id int primary key, body text);"
fox sql runs through the same path as the console and records you as the
actor. Any other client uses the gateway. The password is an API key
(fox apikey create <email> <name>, shown once), not your account password:
psql "postgresql://dbadmin:<API_KEY>@localhost:6432/qa?sslmode=require"
fox blackbox qa
The CREATE TABLE is in the chain, with the login that ran it.
fox branch delete qa
main still has its sample tables. fox branch reset qa would have thrown
away qa's changes and cloned again, instead of deleting it.
What you get
- A branch is a snapshot, not a copy. A ZFS snapshot and clone (a btrfs subvolume snapshot on Windows), then a stock Postgres on that clone. The clone itself is O(1) in the size of the data.
fox branch createprints how long the whole operation took on your machine; the docs say seconds, not a single published benchmark.mainis not written. - It is still Postgres. Postgres 18 on a fresh install; an older install stays on the major it was created with. Your driver, ORM, and SQL do not change. The gateway speaks the wire protocol, and the database name is the branch.
- A record of who changed the schema. Every
CREATE,ALTER,DROP, andGRANTis appended to a hash chain, attributed to the login that ran it — the Blackbox. A policy gate blocksDROP TABLE,DROP SCHEMA, andTRUNCATEunless an admin overrides them. Agents'UPDATEandDELETEare recorded and limited. Checking the chain is free; writing signed checkpoints of it is Enterprise. This is why you can hand a branch to something that writes SQL without a person reading it first. - Row changes live, on the same machine. An Enterprise licence turns a branch into a change feed: server-sent events of row changes, resumed from a log position, including on a branch that had gone idle. The feed reads only that branch.
- Who it is for. Teams that want branching without sending the database to a hosted product. People giving a coding agent a database they can throw away. Anyone who wants the schema record on stock Postgres, on one machine.
- What it is not. One machine today: high availability in this tree is a single-VM demonstration, not a multi-host deployment. Masking is Enterprise and off until you turn it on — a branch is a real copy, and FoxByte says so.
The console is served by the engine at https://localhost:8080. More
screenshots: Blackbox,
SQL console,
realtime,
landing.
Features
Everything here is in this tree. The installer and fox update give you the
latest release, which can be behind main; make build builds what you
are reading.
- Branches —
create,list,reset,diff,suspend,resume,delete. An idle branch stops; the next connection to:6432wakes it. The database name is the branch. - Blackbox — hash-chained DDL ledger, in the Standard edition.
fox blackbox verifyrecomputes it. Agents' data changes are recorded; destructive DDL is refused unless an admin overrides it.fox policyis the gate's rule engine:list,check "<SQL>"andevaluationsin Standard, authoring rules in Enterprise. Detail: docs/blackbox-coverage.md. - Point-in-time recovery —
wal-garchives WAL.fox restore --to '<timestamp>'. Backups start in a store on the same disk;fox backup target setsends them to S3. A base backup does not survive a major upgrade;fox backup exportdoes. - Gateway — Postgres wire protocol on
127.0.0.1:6432, TLS by default. Loopback unless you setFOX_LISTEN. - Agents —
fox mcp(Model Context Protocol) and an HTTP Agent Branch API. A branch per agent, a key scoped to that branch.fox guardrail limitcaps the rows one statement may change;fox guardrail budgetcaps them per hour.fox app registergives a non-human caller its own signed identity and rotatable keys instead of a shared password. docs/mcp.md. - Console — React UI embedded in the
foxbinary, in six sections: Overview (dashboard); Data (SQL console, import, pipelines, realtime, sessions); Blackbox (changes, integrity, requests, policies); Compliance (personal data, Aadhaar exposure, masking, vault, access review, applications, audit log, hardening); Account (API keys, licence); Help (guide, docs). No separate dev server. - SDKs — dependency-free Python and TypeScript clients (Apache-2.0). OpenAPI at
/api/openapi.yaml. - Import —
fox import: Postgres, MySQL/MariaDB, MongoDB, and.sql/.csv/.json/.ndjson, each into a new branch.--continuouskeeps a source in sync untilfox import-cutover. - Audit trails — three separate records.
fox audit-logis pgAudit: who changed the schema, roles and marked tables, and optionally who read them.fox auditis the security log — sign-ins, keys, passwords, admins, refusals — hash-chained, anchored and signed.fox historyis the SQL people ran (console, API,fox sql,fox export), never the results, kept 90 days.fox trackaddslast_modified_byandlast_modified_forcolumns to a table. - Hardening —
fox hardeningsays how a branch's PostgreSQL and this install stand against the checks atbasicorstrict: pass, fail, manual or n/a, with the evidence and the fix. The report is in Standard; making the fixes (fox hardening fix,fox hardening profile) is Enterprise. - Operations —
fox checktests an install and says what to do about anything wrong.fox status,fox logs,fox sessions(cancel a query, end a session),fox maintain(vacuum, analyze),fox psql,fox connect,fox export(query results as csv/tsv/json/xlsx),fox schema(objects and their DDL),fox user(accounts and passwords),fox update. - Realtime (Enterprise) —
fox realtime enablepublishes a table on a branch you host. Subscribers read server-sent events and resume with?since=<lsn>. Enabling a table, or opening the stream, wakes a suspended branch. Below. - ETL pipelines (Enterprise, experimental) —
fox pipeline runextracts a source onto a new branch, runs SQL models, then data-quality tests. No schedule, no incremental models, no dependency graph. Below. - Personal data (Enterprise) —
fox pii scanfinds personal data in a branch by column name and sampled values; you confirm or reject each finding.fox pii aadhaar runreports where Aadhaar numbers are exposed, and with--logsreads the branch's query history, audit text and Blackbox too.fox subject findlocates one person's data for an access or erasure request. - Masking (Enterprise) —
fox mask rulemasks a confirmed finding (partial,hash,fakeorempty) for masked accounts, under key domains that never hash alike and can be rotated.fox mask unmasklets one account see real values on one branch, every read audited.fox branch create --maskedmakes a branch that stays closed until its marked columns hold their masks. Masks already made keep working in every edition. - Vault (Enterprise) — sensitive values kept encrypted in an HSM with reference keys in their place:
fox vault tokenise,detokenise,find, per-account grants with a rate limit and an expiry, and an access log that never holds a value. Aadhaar first. - Access review (Enterprise) —
fox access review: every account, key, branch and application, what each can reach, and who has gone quiet. The tables come out as CSV for whoever is asking. - Change requests (Enterprise) —
fox branch requestproposes what a branch holds that its target does not;fox request approveapplies those statements to the target in one transaction.fox impactis the blast radius first: dependents, other branches, policy, a score. - Enterprise (a licence; without one the binary behaves as Standard) — twelve features: the change feed, ETL pipelines, masking, the vault, personal-data discovery, the access review report, hardening fixes, impact analysis, change requests, policy authoring, writing signed Blackbox anchors, and Blackbox export and compliance bundles. The Standard binary does not contain this code.
fox realtime status,setup,teardown, andslotsstay in Standard so an install can see and undo a feed it turned on.
| Standard | Enterprise | |
|---|---|---|
| Branching, gateway, PITR, Blackbox hash chain, agent guardrails | yes | yes |
Checking anchors (fox blackbox integrity, fox-verify) |
yes | yes |
| Audit log, security log, query history, row attribution, the hardening report | yes | yes |
Import, SQL console, sessions, maintenance, fox check |
yes | yes |
| Realtime change feed, ETL pipelines | — | yes |
| Masking, the vault, personal-data discovery, the Aadhaar exposure report, access review | — | yes |
| Policy authoring, change requests, impact analysis, hardening fixes | — | yes |
| Writing signed anchors, Blackbox export and compliance bundles | — | yes |
A fresh install runs PostgreSQL 18. An install created before 21 Sep 2026
stays on 16 until you run fox pg upgrade.
docs/postgres-versions.md.
curl -fsSL https://get.thefoxbyte.com/install.sh | FOX_EDITION=enterprise sh
That installs the Enterprise build. fox license activate <file> installs the
licence that unlocks the features, fox license show prints what it covers and
this machine's fingerprint, and the console's Licence page does the same.
Without a licence the Enterprise build behaves as Standard.
Realtime
Enterprise. The change feed is logical decoding of a branch's own
write-ahead log, on the Postgres this install is already running — not a
connector aimed at some other server.
fox realtime setup # restarts main
fox realtime enable orders --branch qa --columns id,status
fox realtime key create qa # a stream-only key, shown once; it cannot run SQL
fox realtime url qa # fox-realtime://…@127.0.0.1:8080/qa
Subscribers read server-sent events and resume with ?since=<commit_lsn>; a
position the slot can no longer replay is refused, and the client refetches.
Enabling a table, or opening the stream, wakes a suspended branch. A masked
account is refused on a branch with masking rules, because the feed is decoded
from the log, under the masks.
Full guide, the HTTP and Python clients, and the wake-up details:
docs/realtime.md.
ETL pipelines
Enterprise, and experimental: a run works, and several things a warehouse
tool would have are absent. There is no schedule, no incremental model, and no
dependency graph — models run in the order listed. A run deletes and recreates
its target branch.
fox pipeline run shop.json --as shop-etl
Extract is the import path (postgres://, mysql://, mariadb://,mongodb://, or a local .sql / .csv / .json). Raw tables land in schemaraw, models in public, then data-quality tests run; a failing test leaves
the data and exits 1.
The spec format, the test types, and the API:
docs/pipelines.md.
Compared with Neon, Xata, and Supabase
Checked against their public docs on 20 Nov 2026. These are their claims
and docs, not a benchmark we ran, and FoxByte's own limits are in the first
column on purpose.
| Self-hosted | How a branch copies data | Hash-chained DDL ledger | |
|---|---|---|---|
| FoxByte | Yes, on one machine you run. HA here is a single-VM demonstration. | ZFS snapshot + clone, O(1) in data size. Documented as seconds; fox branch create prints the elapsed time. |
Yes, in Standard. Writing signed anchors is Enterprise; checking them is free. |
| Neon | The product people use is hosted. The storage engine is open source; no supported one-command self-hosted install is published. | Copy-on-write pageserver timeline from an ancestor timeline. | Not described in the docs checked. |
| Xata | Hosted. Joining ClickHouse as of 9 Nov 2026. | Their post: a copy-on-write branch in around 3 seconds. Their figure, not ours. | Not described in the docs checked. |
| Supabase | The platform can be self-hosted; branching, as documented, is a cloud feature. | Schema from migrations, not a storage clone. Data absent by default. | Not described in the docs checked. |
Masking, change feeds, ETL, and the sources for every cell:
docs/comparison.md.
FoxByte did not invent copy-on-write Postgres branches. That idea is
postgres.ai / Database Lab's, and the products above
ship branching of their own. What this repository adds on top of a branch is
the Blackbox, the attribution, and the policy gate, on a Postgres you run.
Architecture
A commit hits stock Postgres on local disk. Branching and WAL archival stay
off that path. The control plane, gateway, and Agent API are Go beside
Postgres, not inside the query.
- Architecture overview — apps, gateway, branches, backups.
- Storage engine — ZFS and btrfs. FoxByte does not replace Postgres's heap.
- Blackbox coverage — what the ledger records, and what a superuser can still do.
- Realtime · ETL pipelines · MCP — the change feed, the pipelines, the agent tools.
- PostgreSQL versions — 18 for a fresh install, 16 still supported for old data.
- Reference — command list, security defaults, backups, HA, release signing.
Contributing
The smallest useful change is welcome, including docs and tests.
CONTRIBUTING.md is the dev setup, how to run tests, and the
pull-request flow. The CLA has to be signed before a first
contribution is merged. You keep the copyright. The licence you grant covers
the paid edition as well as the AGPL core. Read that before you open a pull
request.
make build # ./bin/fox
make vet test # no VM required
Candidate issues, not yet filed: docs/good-first-issues.md.
Behaviour in the community: CODE_OF_CONDUCT.md.
Vulnerabilities: SECURITY.md, not a public issue.
Star the repo
If a self-hosted Postgres you can branch is what you wanted, star the
repository. Stars are how the next
person finds it on GitHub, Show HN, and the READMEs that link here.
A star is the one-click version. A fork and a pull request are the useful
version. The good first issues list is the short
path in.
License
- Core and server (this repo, except
clients/andenterprise/): AGPL-3.0-or-later — LICENSE. - Clients (
clients/): Apache-2.0 — clients/LICENSE. - Enterprise (
enterprise/): commercial, source-available — enterprise/LICENSE. Not in the Standard binary.
Connecting with a Postgres driver does not make your application AGPL. The
copyleft applies if you modify FoxByte and offer that modification to others
as a service.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi
