Gel still using edge-db everywhere?
Hi, I just wanted to experiment with gel, based on the online tutorial and docs. But i am confused. It's hard enough to switch over to a new name; but your cli seems to use the old name everywhere:
But when creating a project, it is creating edgedb.toml; not gel.toml;
All over the help it's still called edgedb:
npx gel -h Usage: edgedb [OPTIONS] [COMMAND]
Commands: dump Create database backup restore Restore database from backup file configure ... Modify database configuration
migration apply Apply migration from latest migration script
migration create Create migration script inside /migrations
migration status Show current migration status
migration log Show all migration versions
migration edit Edit migration file
migration upgrade-check Check if current schema is compatible with new EdgeDB version
migration extract Extract migration history from the database and write it to
migrate Apply migration (alias for edgedb migration apply)
database create Create a new database database drop Delete a database along with its data database wipe Delete a database's data and reset its schema while preserving the database itself (its cfg::DatabaseConfig) and existing migration scripts
describe object Describe a database object describe schema Describe current database schema
list ... List name and related info of database objects (types, scalars, modules, etc.) analyze Analyze performance of query in quotes (e.g. "select 9;") query Execute EdgeQL query in quotes (e.g. "select 9;") ui Launch EdgeDB instance in browser web UI info Show paths for EdgeDB installation
project init Initialize project or link to existing unlinked project project unlink Clean up project configuration project info Get various metadata about project instance project upgrade Upgrade EdgeDB instance used for current project
instance create Initialize a new EdgeDB instance instance list Show all instances instance status Show status of an instance instance start Start an instance instance stop Stop an instance instance restart Restart an instance instance destroy Destroy an instance and remove the data instance link Link to a remote EdgeDB instance instance unlink Unlink from a remote EdgeDB instance instance logs Show logs for an instance instance resize Resize an instance (EdgeDB Cloud only) instance backup Create a backup for an instance (EdgeDB Cloud only) instance restore Restore an instance from a backup (EdgeDB Cloud only) instance list-backups Restore an instance from a backup (EdgeDB Cloud only) instance upgrade Upgrade installations and instances instance revert Revert a major instance upgrade instance reset-password Generate new password for instance user (randomly generated by default) instance credentials Display instance credentials (add --json for verbose)
server ... Manage local EdgeDB installations
extension list List installed extensions for a local instance extension list-available List available extensions for a local instance extension install Install an extension for a local instance extension uninstall Uninstall an extension from a local instance
cli upgrade Upgrade the edgedb command-line tool
cloud ... EdgeDB Cloud authentication watch Start a long-running process that watches for changes in schema files in a project's dbschema directory, applying them in real time branch ... Manage branches hash-password Generate a SCRAM-SHA-256 hash for a password
The version, too:
npx gel -V ==> EdgeDB CLI 6.1.2+af38353
This one is used:
npm show gel
[email protected] | Apache-2.0 | deps: 6 | versions: 49 The official Node.js client library for Gel https://geldata.com/docs
bin: gel
dist .tarball: https://registry.npmjs.org/gel/-/gel-2.0.2.tgz .shasum: a12c96cc3a0bad938122da1f708cb4127b15753f .integrity: sha512-XTKpfNR9HZOw+k0Bl04nETZjuP5pypVAXsZADSdwr3EtyygTTe1RqvftU2FjGu7Tp9e576a9b/iIOxWrRBxMiQ== .unpackedSize: 619.2 kB
If you run npx gel cli upgrade, does --help show the correct branding?
This command does not work:
Can you try the following:
~/.local/bin/edgedb cli upgrade
# and then
npx gel cli upgrade
There is a weird gap where we had both names with one aliased to the other, and it can take a bit to get them upgraded to the latest version. It's a hard problem to fix since the issue was in the old CLI upgrade code, and it's the code that is upgrading itself that needs ... to be upgraded 😓
Hi,
i had deleted the old one before trying gel. Maybe you can point me to some leftover configuration?
But when npx loads the current version from its repo?
Even when running in a new container (docker, image node:alpine), npx gel -V shows EdgeDB Have you tried installing it; or running from npx?
# On host
docker run --rm -it node:alpine /bin/sh
# Inside container
npx gel -V
#Need to install the following packages:
#[email protected]
#Ok to proceed? (y)
#
#EdgeDB CLI 6.1.2+af38353
It seems the npm / npx version is not up to date or compiled with the wrong flags / features? Shows EdgeDB and uses EdgeDB.toml
The CLI wrapper code is looking for an old package name when trying to find the right package. We stopped publishing to the edgedb-cli package name, so it's getting old names. We also should align our package-name lookup with the same logic that the Python package uses.
I'm happy to retest your solution ;-)
Using the canary, on a fresh node container, it seems to work; on my machine, still the old version is used. As far as I understand, gel uses the gel binary from some cache directory. When updating from npm gel package (what npx gel@canary does) is still uses the old gel binary in cache. Should that not also be coherent to the npm installed version? At last in some kind of postinstall command? The binary you use / cache should be the matching version to what npm installs or npx uses.
As far as use ask me: If you allow a user to use your tool via npx or npm install; you must not rely on a separate update process of the underlying binary. You have to ensure that the tools is working out of the box.
I'm confused. I removed everything EdgeDB'y I knew of; i installed again via npx; ran the upgrade, The debug shows Gel, but the output in this case edgedb?
DEBUG=* npx gel@canary info
2025-04-09T12:42:20.261Z gel:cli Process argv: [
'/usr/bin/node',
'/home/xxx/.npm/_npx/f91e5647b3f1b78e/node_modules/.bin/gel',
'info'
]
2025-04-09T12:42:20.263Z gel:cli Running CLI wrapper from: /home/xxx/.npm/_npx/f91e5647b3f1b78e/node_modules/gel/dist/cli.mjs
2025-04-09T12:42:20.263Z gel:cli Starting main function with args: [ 'info' ]
2025-04-09T12:42:20.263Z gel:cli - IS_TTY: undefined
2025-04-09T12:42:20.263Z gel:cli - SCRIPT_LOCATION: /home/xxx/.npm/_npx/f91e5647b3f1b78e/node_modules/gel/dist/cli.mjs
2025-04-09T12:42:20.263Z gel:cli - EDGEDB_PKG_ROOT: https://packages.edgedb.com
2025-04-09T12:42:20.263Z gel:cli - CACHE_DIR: /home/xxx/.cache/gel
2025-04-09T12:42:20.263Z gel:cli - CACHED_CLI_PATH: /home/xxx/.cache/gel/bin/gel
2025-04-09T12:42:20.263Z gel:cli Checking if CLI is in PATH...
2025-04-09T12:42:20.266Z gel:cli - No CLI found in PATH.
2025-04-09T12:42:20.266Z gel:cli Installing temporary CLI to get install directory...
2025-04-09T12:42:20.267Z gel:cli Getting install directory for CLI path: /home/xxx/.cache/gel/bin/gel
2025-04-09T12:42:20.267Z gel:cli Running Gel CLI: /home/xxx/.cache/gel/bin/gel info --get install-dir
2025-04-09T12:42:20.279Z gel:cli - Install directory: /home/xxx/.local/bin/
2025-04-09T12:42:20.279Z gel:cli - CLI installed at: /home/xxx/.local/bin/gel
2025-04-09T12:42:20.279Z gel:cli - CLI binary found in path: /home/xxx/.local/bin/gel
2025-04-09T12:42:20.280Z gel:cli - CLI binary not found in path: /home/xxx/.local/bin/gel
2025-04-09T12:42:20.280Z gel:cli Running Gel CLI: /home/xxx/.cache/gel/bin/gel info
Gel uses the following local paths:
┌─────────┬────────────────────────────────────────┐
│ Cache │ /home/xxx/.cache/edgedb/ │
│ Config │ /home/xxx/.config/edgedb/ │
│ Install │ /home/xxx/.local/bin/ │
│ Data │ /home/xxx/.local/share/edgedb/data/ │
│ Service │ /home/xxx/.config/systemd/user/ │
└─────────┴────────────────────────────────────────┘
This is actually correct. Unfortunately due to the difficulty of migrating these directories from one name to another, some of our internal paths are remaining under the "edgedb" name for the time being. Over the next year we hope to migrate to an internal gel path but for now, seeing edgedb here is expected.
But is there any reason; legacy config somewhere in my system, so that the vs code extention looks for edgedb-lsp; but on another pc where I only used gel with the newer version; it looks for gel-lsp ?