Gel CLI
$ gel Official Med Riskgel is the Rust CLI for Gel (formerly EdgeDB), handling EdgeQL/SQL queries with --output-format json (json-pretty, json-lines), project instance lifecycle, and schema migrations (gel migration create, gel migrate) with --non-interactive support.
brew install geldata/tap/gel-cli gel reads local gel.toml and dbschema/ migration files directly to diff schemas and run JSON queries without needing an MCP wrapper.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --output-format json / json-pretty / json-lines on gel query, --non-interactive on migration creation, and --quiet on migrate.
gel query --output-format json-linesandgel migration create --non-interactive
Separates migration generation (migration create) from execution (migrate), uses gel migration status checks, and isolates credentials via --dsn or credentials files.
- Two-step
migration create+migrateworkflow andmigration statuscheck
Single Rust binary via Homebrew tap (geldata/tap/gel-cli) and official install script on macOS, Linux, and Windows.
- Native Rust binary distributed via Homebrew tap and install script
Unifies local instance management, EdgeQL/SQL querying, and schema diff migrations cleanly around gel.toml.
- Integrated
query,migration,instance, andprojectcommands
Official geldata/gel-cli dual-licensed under Apache-2.0 OR MIT.
- Official Gel Data repository under Apache-2.0 / MIT
Clear CLI reference at docs.geldata.com/reference/cli and helpful --help output.
- Official CLI reference at docs.geldata.com
Security, Auth & Guardrails
Stores instance credentials under ~/.config/edgedb/credentials/ (or Gel config dir) and supports --dsn, --credentials-file, and GEL_DSN / GEL_SECRET_KEY env vars.
Apache-2.0 / MIT open-source CLI; Gel Cloud hosted instances incur vendor charges.
# Gel CLI (gel) Agent Rules - Use `gel query --output-format json` (or `json-lines`) for parseable query output. - Always pass `--non-interactive` on `gel migration create` and verify with `gel migration status` before `gel migrate`. - Avoid `--dev-mode` on shared or production instances.
Agent-Ready Command Recipes
Safe Read-Only Queries
gel query --output-format json-lines "select schema::ObjectType { name } filter .builtin = false;" Queries user-defined schema types in Gel and emits newline-delimited JSON.
gel migration status
Compares local dbschema/migrations/ files against the target instance revision.
Controlled Writes & Previews
gel migration create --non-interactive
Generates the next migration .edgeql script from dbschema/ diffs without interactive prompts.
Strengths for Agents
- +
gel querynatively supportsjson,json-pretty, andjson-linesoutput formats. - +
gel migration create --non-interactivegenerates deterministic.edgeqlmigration files fromdbschema/diffs.
Caveats & Pitfalls
- ! Complex ambiguous schema changes (such as column renames) fail fast under
--non-interactiveand require manual resolution. - ! Rebrand from
edgedbtogelmeans older projects still referenceedgedb.tomlorEDGEDB_*env vars.