Skip to Content
We are live but in Staging 🎉
CLI GuideDatabase Commands

Database Commands

Last validated: 2026-05-11

The db group manages shared database services through VBase gateway APIs.

Command Summary

CommandSyntaxUnderlying API callMain use case
Create database servicedodil vbase db create <name>AllocateDatabaseProvision new shared database service.
List servicesdodil vbase db listListServicesDiscover service IDs/status before selecting one.
Drop database servicedodil vbase db drop <service_id>DeleteDatabaseDecommission shared service.
Use database contextdodil vbase db use <service_id>GetServiceAccessResolve endpoint/port/db_name and save active context.
Connectivity testdodil vbase db test-grpcListServices over direct gRPC dialValidate gateway connectivity and auth quickly.

Arguments and Flags

db create <name>

Arguments:

  • <name>: service name to allocate.

Flags:

  • --org exists but current implementation uses org from config (global.org_id).

Example:

dodil vbase db create my-shared-db

db list

Flags:

  • --org exists but current implementation uses org from config.
  • -o json for machine-readable output.

Example:

dodil vbase db list -o json

Important behavior:

  • this command calls ListServices and may include non-database service types, depending on backend response.

db drop <service_id>

Arguments:

  • <service_id>: service ID to remove (not the display name).

Example:

dodil vbase db drop 5fbd6b4f-9cb8-4ba8-b6d5-41f221d0c2ab

db use <service_id>

Arguments:

  • <service_id>: service ID to resolve access for.

Flags:

  • --org exists but current implementation uses org from config.

Behavior:

  • calls GetServiceAccess
  • updates ~/.config/dodil/config.yaml under vbase with:
    • host
    • port
    • db_name
    • service_name

Example:

dodil vbase db use <service_id>

db test-grpc

Purpose:

  • validates gateway gRPC reachability and auth by invoking ListServices

Example:

dodil vbase db test-grpc

Typical Usage Sequence

dodil login <service_account_id> <service_account_secret> dodil vbase db create my-shared-db dodil vbase db list dodil vbase db use <service_id>

Common Mistakes

  • Passing DB name to db use or db drop instead of service ID.
  • Expecting db list to include only database services.
  • Running db commands before successful Dodil CLI login.