# zetta > A database explorer for Postgres and SQLite in one binary under 3 MB. Browse and query in your browser, or run SQL from the shell. zetta is free and open source under the MIT license. The latest release is 0.1.3. It serves its web UI from the binary to the browser you already have, on 127.0.0.1 with a one-time token. It speaks the Postgres wire protocol itself, with TLS, and compiles SQLite in, so it needs no libpq, OpenSSL or other client. Prebuilt binaries exist for macOS (Apple Silicon), Linux (x86_64, arm64) and Windows (x64, arm64), and the Docker image is workflowjd/zetta (also ghcr.io/dagimg-dot/zetta). Quick start: - Install on Linux or macOS: `curl -fsSL https://raw.githubusercontent.com/dagimg-dot/zetta/main/install.sh | sh` - Browse a SQLite file: `zetta ./app.db` - Browse Postgres without writes: `zetta postgres://me@localhost/app --read-only` - Print a query result: `zetta query app.db 'select * from users limit 5'` (add `-f csv` or `-f json`) - List schemas and tables: `zetta tables app.db` - Run in Docker: `docker run --rm -p 127.0.0.1:1993:1993 -e ZETTA_TOKEN=$(openssl rand -hex 16) -e DATABASE_URL=postgres://user:password@host:5432/app workflowjd/zetta` zetta supports Postgres and SQLite only. It does not support MySQL, SQL Server or other databases. ## Docs - [Full documentation](https://tryzetta.netlify.app/llms-full.txt): install methods, usage, Docker and Docker Compose, Postgres authentication and TLS support, development - [README](https://github.com/dagimg-dot/zetta#readme): the same documentation on GitHub - [Live demo](https://tryzetta.netlify.app/demo/): zetta compiled to WebAssembly, running in the browser on a sample shop database, read-only ## Install - [Latest release](https://github.com/dagimg-dot/zetta/releases/latest): binaries for every platform with SHA256SUMS - [Install script](https://raw.githubusercontent.com/dagimg-dot/zetta/main/install.sh): picks the build for the system and checks its checksum - [Docker image](https://hub.docker.com/r/workflowjd/zetta): a static binary on scratch for amd64 and arm64 ## FAQ - What is zetta? zetta is a free, open-source database explorer for Postgres and SQLite. It is one binary under 3 MB that serves its UI to the browser you already have, so you can browse schemas, filter tables, follow foreign keys and run SQL. The same binary also runs queries from the shell. - Which databases does zetta support? Postgres and SQLite. zetta speaks the Postgres wire protocol itself, with SCRAM-SHA-256, MD5 and every sslmode, and compiles the official SQLite amalgamation in. A database is a postgres:// URL, a libpq keyword string or a path to a SQLite file. - Do I need libpq, OpenSSL or a database client installed? No. The binary links libc and nothing else. Its Postgres client and TLS are written in Zig, SQLite is compiled in, and the web UI is embedded. There are prebuilt binaries for macOS, Linux and Windows, and a 1.5 MB Docker image. - Is it safe to point zetta at a real database? zetta listens on 127.0.0.1 with a new one-time token each run, and refuses other hosts and origins. With --read-only it refuses writes inside the database adapter, not just in the UI, and passwords never reach a log. For a hard guarantee on Postgres, connect as a read-only role. - How is zetta different from a desktop database client? There is nothing to install beyond one small binary or one docker run, and every view lives in the URL, so a link opens the same table, filter and row for someone else. It also fits in a docker-compose.yml beside the database your project already runs. - Can I use zetta from scripts and CI? Yes. zetta query prints a table, CSV or JSON to stdout with diagnostics on stderr, and zetta tables lists schemas and tables. Every flag has an environment variable, and DATABASE_URL keeps a password out of the process list. - Is zetta free? Yes. zetta is open source under the MIT license, and the live demo on this site runs it in your browser with nothing to install. ## Optional - [Source code](https://github.com/dagimg-dot/zetta): Zig 0.16 for the binary, Solid and TypeScript for the UI - [Issues](https://github.com/dagimg-dot/zetta/issues): bug reports and feature requests - [License](https://github.com/dagimg-dot/zetta/blob/main/LICENSE): MIT