A schema-first, TypeScript-native database built on Ende, a Deno fork. Disc is a fork of Gel (formerly EdgeDB), reimplemented in TypeScript while preserving EdgeQL, SDL schemas, and PostgreSQL as the storage engine.
- Single-language stack — TypeScript from schema to query to server
- Deno-native — leverages Ende’s built-in TypeScript, permissions model, and Standard Library
- Bundled PostgreSQL —
disc initjust works; users never install or manage Postgres directly - EdgeQL preserved — the query language is the best part of Gel, so it stays
- Schema-first — SDL drives database schema, TypeScript types, and access policies
curl -fsSL https://disc.sh/install | shThis downloads the prebuilt disc binary into ~/.disc/bin and adds it to your PATH. Pin a version with ... | sh -s -- v2026.06.13. Prebuilt binaries cover macOS (arm64), Linux (x64/arm64), and Windows (x64); Disc is also available via Homebrew or from source.
Disc is also available on Homebrew!
# Initialize a new project (downloads PostgreSQL automatically)
disc init my-project
cd my-project
# Start the server
disc serve
# Open the admin UI
disc ui
# Interactive EdgeQL shell
disc shellDefine your data model with SDL (Schema Definition Language):
module default {
type User {
created_at: datetime {
default := datetime_current();
readonly := true;
};
required email: str {
constraint exclusive;
};
required name: str;
multi posts: Post;
};
type Post {
required author: User;
required body: str;
created_at: datetime {
default := datetime_current();
};
required title: str;
};
};
select User {
email,
name,
posts: {
created_at,
title
}
} filter .email = "user@example.com";
Compiles to PostgreSQL SQL automatically.
All commands auto-detect the project from disc.toml in the current (or parent) directory and auto-start PostgreSQL when needed. No manual DSN configuration required.
disc init # Initialize a new Disc project
disc start # Start the server and bundled PostgreSQL
disc stop # Stop the server and PostgreSQL
disc status # Show instance status
disc migrate # Generate and apply migrations
disc shell # Interactive EdgeQL REPL
disc codegen # Generate TypeScript types
disc codegen --rust # Generate a Rust client crate (./dbschema/disc-client-rust)
disc codegen --go # Generate a Go client package (./dbschema/disc-client-go)
disc watch # Watch schema files and auto-migrate in dev
disc serve # Start the Disc server
disc ui # Open admin UI in browser
disc build # Compile to native binary
disc build --platform linux-x64 # Cross-compile for Linux
disc deploy --format <fmt> # Generate deployment scaffolds (docker, compose, systemd, env)
disc pg log # View PostgreSQL logs
disc pg log -f # Follow log output
disc pg upgrade --target-version 18.4 # Upgrade PostgreSQL+-----------------------------------------+
| Disc Server |
| (Deno / TypeScript) |
+-----------------------------------------+
| Schema Parser | EdgeQL Parser |
| (SDL -> AST) | (EQL -> AST) |
+-----------------------------------------+
| Query Planner / Compiler |
| (AST -> SQL generation) |
+-----------------------------------------+
| Migration Engine |
| (Schema diff -> DDL) |
+-----------------------------------------+
| Connection Manager |
| (PostgreSQL via deno-pg) |
+-----------------------------------------+
| PostgreSQL Manager |
| (bundled binary lifecycle mgmt) |
+-----------------------------------------+
|
+-----------------------------------------+
| Bundled PostgreSQL 16+ |
| ~/.disc/postgres/<version>/ |
+-----------------------------------------+
- Full SDL parser and schema validation
- EdgeQL parser with complete AST support
- EdgeQL-to-SQL compiler with query caching
- Automatic schema migrations with diffing
- Bundled PostgreSQL lifecycle management
- Real query execution against PostgreSQL
- HTTP/JSON API with WebSocket support
- Rate limiting (token bucket per IP)
- TLS/HTTPS with HTTP-to-HTTPS redirect
- Prometheus metrics endpoint
- Structured logging (JSON/text)
- Graceful shutdown and health checks
- Request timeouts and CORS
- JWT authentication with session management
- Object-level access policies
- Row-level security enforcement
- Auth context bridging
- Admin UI (SvelteKit)
- TypeScript type generation from schemas
- Interactive EdgeQL REPL
- Development file watcher with auto-migration
- Production deployment guide
For production deployments or users who prefer to manage their own Postgres:
disc init --backend-dsn "postgres://user:pass@host:5432/disc"The canonical build path is the disc build CLI command (wraps ende compile with the correct flags and cross-compile targets):
disc build # Build for current platform
disc build --platform linux-x64 # Cross-compile for Linux
disc build --platform linux-arm64 # Cross-compile for Linux ARM
disc build --platform windows-x64 # Cross-compile for Windows (-> disc-windows-x64.exe)For release automation, the equivalent ende task aliases (build:darwin-arm64, build:linux-x64, etc.) call disc build under the hood. The justfile targets are retained for hands-on development but are not part of the release pipeline.
Version is read from version.txt at startup; ChronVer-style dates are bumped by just version.
docker build -t disc . # Production image (external PG)
docker build -f Dockerfile.bundled -t disc-bundled . # All-in-one with PG
docker compose up -d # Start Disc + PostgreSQLdisc deploy --format env # Generate .env.production template
disc deploy --format systemd # Generate systemd service unit
disc deploy --format compose # Generate docker-compose.yml
disc deploy --format docker # Generate DockerfileSee Production Deployment Guide for full details including TLS setup, connection pool tuning, health checks, monitoring, and more.
Disc's toolchain runs on Ende (curl -fsSL https://ende.sh/install.sh | sh); the admin UI under ui/ also needs Bun.
# Run tests
ende task test
# Run tests with PostgreSQL integration
ende task test:pg
# Format and lint
ende task format
ende task lint
# Dev server
ende task devThe
test,check,build,dev,serve,cli, andbenchtasks all chainende task prepfirst.prepwrites an emptypostgres/embedded-pg-manifest.tsstub if missing (the real manifest is git-ignored and regenerated bydisc build). When invokingende test/ende checkdirectly, runende task preponce after cloning.
Apache 2.0
