Skip to content
Cloudflare Docs

Wrangler commands

create

Create a new Hyperdrive configuration.

wrangler hyperdrive create <CONFIG_NAME> [OPTIONS]
  • CONFIG_NAME string required
    • The name of the Hyperdrive configuration to create.
  • --connection-string string optional
    • The database connection string in the form postgres://user:password@hostname:port/database.
  • --origin-host string optional
    • The hostname or IP address Hyperdrive should connect to.
  • --origin-port number optional
    • The database port to connect to.
  • --origin-scheme string optional
    • The scheme used to connect to the origin database, for example, postgresql or postgres.
  • --database string optional
    • The database (name) to connect to. For example, Postgres or defaultdb.
  • --origin-user string optional
    • The username used to authenticate to the database.
  • --origin-password string optional
    • The password used to authenticate to the database.
  • --access-client-id string optional
    • The Client ID of the Access token to use when connecting to the origin database, must be set with a Client Access Secret. Mutually exclusive with origin-port.
  • --access-client-secret string optional
    • The Client Secret of the Access token to use when connecting to the origin database, must be set with a Client Access ID. Mutually exclusive with origin-port.
  • --caching-disabled boolean optional
    • Disables the caching of SQL responses.
  • --max-age number optional
    • Specifies max duration for which items should persist in the cache, cannot be set when caching is disabled.
  • --swr number optional
    • Stale While Revalidate - Indicates the number of seconds cache may serve the response after it becomes stale, cannot be set when caching is disabled.
  • --ca-certificate-uuid string optional
    • Sets custom CA certificate when connecting to origin database. Must be a valid UUID of a certificate uploaded via wrangler cert command.
  • --mtls-certificate-uuid string optional
    • Sets custom mTLS client certificates when connecting to origin database. Must be a valid UUID of a certificate uploaded via wrangler cert command.

The following global flags work on every command:

  • --help boolean
    • Show help.
  • --config string (not supported by Pages)
  • --cwd string
    • Run as if Wrangler was started in the specified directory instead of the current working directory.

update

Update an existing Hyperdrive configuration.

wrangler hyperdrive update <ID> [OPTIONS]
  • ID string required
    • The ID of the Hyperdrive configuration to update.
  • --name string optional
    • The new name of the Hyperdrive configuration.
  • --connection-string string optional
    • The database connection string in the form postgres://user:password@hostname:port/database.
  • --origin-host string optional
    • The new database hostname or IP address Hyperdrive should connect to.
  • --origin-port string optional
    • The new database port to connect to.
  • --origin-scheme string optional
    • The scheme used to connect to the origin database, for example, postgresql or postgres.
  • --database string optional
    • The new database (name) to connect to. For example, Postgres or defaultdb.
  • --origin-user string optional
    • The new username used to authenticate to the database.
  • --origin-password string optional
    • The new password used to authenticate to the database.
  • --access-client-id string optional
    • The Client ID of the Access token to use when connecting to the origin database, must be set with a Client Access Secret. Mutually exclusive with origin-port.
  • --access-client-secret string optional
    • The Client Secret of the Access token to use when connecting to the origin database, must be set with a Client Access ID. Mutually exclusive with origin-port.
  • --caching-disabled boolean optional
    • Disables the caching of SQL responses.
  • --max-age number optional
    • Specifies max duration for which items should persist in the cache, cannot be set when caching is disabled.
  • --swr number optional
    • Stale While Revalidate - Indicates the number of seconds cache may serve the response after it becomes stale, cannot be set when caching is disabled.
  • --ca-certificate-uuid string optional
    • Sets custom CA certificate when connecting to origin database. Must be a valid UUID of a certificate uploaded via wrangler cert command.
  • --mtls-certificate-uuid string optional
    • Sets custom mTLS client certificates when connecting to origin database. Must be a valid UUID of a certificate uploaded via wrangler cert command.

The following global flags work on every command:

  • --help boolean
    • Show help.
  • --config string (not supported by Pages)
  • --cwd string
    • Run as if Wrangler was started in the specified directory instead of the current working directory.

list

List all Hyperdrive configurations.

wrangler hyperdrive list

The following global flags work on every command:

  • --help boolean
    • Show help.
  • --config string (not supported by Pages)
  • --cwd string
    • Run as if Wrangler was started in the specified directory instead of the current working directory.

delete

Delete an existing Hyperdrive configuration.

wrangler hyperdrive delete <ID>
  • ID string required
    • The name of the Hyperdrive configuration to delete.

The following global flags work on every command:

  • --help boolean
    • Show help.
  • --config string (not supported by Pages)
  • --cwd string
    • Run as if Wrangler was started in the specified directory instead of the current working directory.

get

Get an existing Hyperdrive configuration.

wrangler hyperdrive get <ID>
  • ID string required
    • The name of the Hyperdrive configuration to get.

The following global flags work on every command:

  • --help boolean
    • Show help.
  • --config string (not supported by Pages)
  • --cwd string
    • Run as if Wrangler was started in the specified directory instead of the current working directory.