Get started with FoxSchema
Install it, connect a database, and try each feature — schema compare, the SQL Editor, and database access — with ready-made samples you can copy and run.
1 · Install & launch
Pick one channel. Then run foxschema — it starts the local UI and opens your browser at http://localhost:3210.
npm (recommended)
npm install -g foxschema foxschema # start the UI (http://localhost:3210) foxschema shortcut # optional: Fox icon on your Desktop
Homebrew (macOS)
brew tap tedious-code/foxschema https://github.com/tedious-code/foxschema brew trust tedious-code/foxschema brew install foxschema foxschema
Docker (shared / team server)
docker pull 5nickels/foxschema:latest docker run -d --name foxschema -p 3210:3210 -v foxschema_data:/data 5nickels/foxschema:latest
Everyday commands: foxschema stop shuts the background server down, foxschema doctor checks your setup. Full matrix (npm, Homebrew, Winget, Docker, curl): INSTALL.md.
2 · Build a sample playground
No database handy? Create two schemas that differ on purpose — then you can compare them and watch FoxSchema find the drift. Run this on PostgreSQL or MySQL (works on both).
Schema A — the “source”
CREATE SCHEMA demo_a; CREATE TABLE demo_a.customers ( id INT PRIMARY KEY, email VARCHAR(200) NOT NULL, full_name VARCHAR(120), signup_date DATE, last_login_at TIMESTAMP -- only in A ); CREATE TABLE demo_a.orders ( id INT PRIMARY KEY, customer_id INT NOT NULL, total DECIMAL(10,2) NOT NULL, status VARCHAR(20) ); CREATE INDEX idx_customers_email ON demo_a.customers (email); CREATE INDEX idx_orders_customer ON demo_a.orders (customer_id); INSERT INTO demo_a.customers (id, email, full_name, signup_date) VALUES (1, 'ada@example.com', 'Ada Lovelace', '2024-01-15'), (2, 'linus@example.com', 'Linus Torvalds', '2024-02-02'), (3, 'grace@example.com', 'Grace Hopper', '2024-03-30'); INSERT INTO demo_a.orders (id, customer_id, total, status) VALUES (1, 1, 99.00, 'paid'), (2, 2, 149.50, 'paid'), (3, 3, 20.00, 'refunded');
Schema B — the “target” (drifted)
CREATE SCHEMA demo_b; CREATE TABLE demo_b.customers ( id INT PRIMARY KEY, email VARCHAR(200) NOT NULL, full_name VARCHAR(80), -- narrower than A signup_date DATE, legacy_flag INT -- only in B ); CREATE TABLE demo_b.orders ( id INT PRIMARY KEY, customer_id INT NOT NULL, total DECIMAL(10,2) NOT NULL, status VARCHAR(20) ); CREATE TABLE demo_b.audit_log ( -- only in B id INT PRIMARY KEY, action VARCHAR(50), logged_at TIMESTAMP ); -- note: idx_customers_email is missing here INSERT INTO demo_b.customers (id, email, full_name, signup_date) VALUES (1, 'ada@example.com', 'Ada Lovelace', '2024-01-15'), (2, 'linus@example.com', 'Linus T.', '2024-02-02'); -- differs -- customer 3 missing entirely
audit_log), a dropped column (last_login_at), an added column (legacy_flag), a changed column width (full_name), and a missing index (idx_customers_email).3 · Connect your databases
- Click Add connection.
- Pick the type — PostgreSQL, MySQL, MariaDB, SQL Server, Azure SQL, Oracle, IBM Db2, SQLite, ClickHouse or Amazon Redshift.
- Enter host, port, database, username and password (optionally a schema).
- Hit Test, then save.
Passwords are encrypted at rest and are never sent back to the browser. Save one connection per environment you want to compare.
4 · Compare & migrate schemas
This is the core feature: point FoxSchema at a source and a target, and it shows every structural difference and writes the SQL to close the gap.
- Open Schema Sync, choose source (
demo_a) and target (demo_b). - Click Compare. Narrow the scope (tables only, views, routines…) with the scope filter.
- Read the diff — click any object to drill into column, index, key and trigger changes.
- Choose Generate migration to get runnable DDL in the target's dialect. Nothing is applied yet.
- Review, then Deploy. A pre-migration snapshot is taken first, and the run is saved in History.
Comparing two different engines? FoxSchema is cross-dialect aware — equivalent types aren't flagged, and a readiness panel tells you up front what translates cleanly (tables, columns, keys, indexes) versus what needs a human (views, user-defined types, procedures).
Prefer the terminal? The same engine runs from the CLI:
foxschema compare --source demo_a --target demo_b foxschema migrate --source demo_a --target demo_b
5 · SQL Editor
Run ad-hoc queries and inspect data — and, uniquely, run the same SQL against several servers at once to compare environments.
- Click SQL Editor in the top toolbar.
- Under Destinations, check one or more saved connections.
- Type SQL, then Run. Select part of the text and it becomes Run selection.
- Results appear below, grouped per connection — stacked or side-by-side.
Try this against both demo schemas:
SELECT id, email, full_name, signup_date FROM customers ORDER BY id;
Compare data across servers
Switch the layout to Side-by-side, check two Destinations, and turn on Compare data. Rows line up by key columns, and differing cells are colour-coded: amber = modified, rose = missing, emerald = extra. With the sample data above you'll see Linus's name differ and customer 3 missing from B.
Data migrate (≤ 500 row operations)
With Compare on, Data migrate lets you push differing rows across. Choose Add / Edit / Delete per row, with Transaction and Stop on error safety switches. It only runs when both grids show the full result on page 1 — so "missing on this page" can never be mistaken for "missing from the table".
Also in the Editor: tabs, a schema explorer with autocomplete, Index Management (fragmentation % + defragment), Clone Table (archive a huge table and recreate it empty), and Query files — import CSV/TSV, JSON or fixed-width text into a temporary SQLite workspace and query it like any other database.
6 · Database access & permissions
Inspect who can do what, and generate the GRANT/REVOKE SQL to fix it — without hand-writing dialect-specific permission syntax.
- Open Build database access and pick a database connection.
- Load the catalog to read users and roles from the server.
- Choose a principal (a user or role), then set the desired access — per database, table, or column.
- FoxSchema shows granted privileges today versus what you asked for, and writes the SQL to reconcile them.
- Check the access report for high-risk findings — over-privileged accounts and similar.
Review the generated SQL before running it, exactly like a schema migration. Account and permission syntax is emitted per dialect.
Where to next
- • History — every applied migration, with its script, snapshot and per-object result.
- • Self-hosting guide — run the web app for your team with Docker, SSO and TLS.
- • Documentation · Install options · Blog