Skip to content
Cloudflare Docs

WranglerNamespace

WranglerNamespace is used 0 times on 0 pages.

Pages which use WranglerNamespace

Used 0 times.

Pages

    Partials

      The WranglerNamespace component documents the available commands for a given namespace.

      This is generated using the Wrangler version in the cloudflare-docs repository.

      Import

      import { WranglerNamespace } from "~/components";

      Usage

      d1 list

      Terminal window
      npx wrangler d1 list
      • --json boolean default: false

        Return output as clean JSON

      d1 info

      Terminal window
      npx wrangler d1 info [NAME]
      • [NAME] string required

        The name of the DB

      • --json boolean default: false

        Return output as clean JSON

      d1 insights

      Terminal window
      npx wrangler d1 insights [NAME]
      • [NAME] string required

        The name of the DB

      • --timePeriod string default: 1d

        Fetch data from now to the provided time period

      • --sort-type string default: sum

        Choose the operation you want to sort insights by

      • --sort-by string default: time

        Choose the field you want to sort insights by

      • --sort-direction string default: DESC

        Choose a sort direction

      • --limit number default: 5

        fetch insights about the first X queries

      • --json boolean default: false

        return output as clean JSON

      d1 create

      Terminal window
      npx wrangler d1 create [NAME]
      • [NAME] string required

        The name of the new DB

      • --location string

        A hint for the primary location of the new DB. Options: weur: Western Europe eeur: Eastern Europe apac: Asia Pacific oc: Oceania wnam: Western North America enam: Eastern North America

      d1 delete

      Terminal window
      npx wrangler d1 delete [NAME]
      • [NAME] string required

        The name or binding of the DB

      • --skip-confirmation boolean alias: --y default: false

        Skip confirmation

      d1 execute

      Terminal window
      npx wrangler d1 execute [DATABASE]
      • [DATABASE] string required

        The name or binding of the DB

      • --yes boolean alias: --y

        Answer "yes" to any prompts

      • --local boolean

        Execute commands/files against a local DB for use with wrangler dev

      • --remote boolean

        Execute commands/files against a remote DB for use with wrangler dev

      • --file string

        A .sql file to ingest

      • --command string

        A single SQL statement to execute

      • --persist-to string

        Specify directory to use for local persistence (for --local)

      • --json boolean default: false

        Return output as clean JSON

      • --preview boolean default: false

        Execute commands/files against a preview D1 DB

      d1 export

      Terminal window
      npx wrangler d1 export [NAME]
      • [NAME] string required

        The name of the DB

      • --local boolean

        Export from your local DB you use with wrangler dev

      • --remote boolean

        Export from your live D1

      • --no-schema boolean

        Only output table contents, not the DB schema

      • --no-data boolean

        Only output table schema, not the contents of the DBs themselves

      • --table string

        Specify which tables to include in export

      • --output string required

        Which .sql file to output to

      d1 time-travel info

      Terminal window
      npx wrangler d1 time-travel info [DATABASE]
      • [DATABASE] string required

        The name or binding of the DB

      • --timestamp string

        Accepts a Unix (seconds from epoch) or RFC3339 timestamp (e.g. 2023-07-13T08:46:42.228Z) to retrieve a bookmark for

      • --json boolean default: false

        Return output as clean JSON

      d1 time-travel restore

      Terminal window
      npx wrangler d1 time-travel restore [DATABASE]
      • [DATABASE] string required

        The name or binding of the DB

      • --bookmark string

        Bookmark to use for time travel

      • --timestamp string

        Accepts a Unix (seconds from epoch) or RFC3339 timestamp (e.g. 2023-07-13T08:46:42.228Z) to retrieve a bookmark for

      • --json boolean default: false

        Return output as clean JSON

      d1 migrations list

      Terminal window
      npx wrangler d1 migrations list [DATABASE]
      • [DATABASE] string required

        The name or binding of the DB

      • --local boolean

        Execute commands/files against a local DB for use with wrangler dev

      • --remote boolean

        Execute commands/files against a remote DB for use with wrangler dev --remote

      • --preview boolean default: false

        Execute commands/files against a preview D1 DB

      • --persist-to string

        Specify directory to use for local persistence (you must use --local with this flag)

      d1 migrations create

      Terminal window
      npx wrangler d1 migrations create [DATABASE] [MESSAGE]
      • [DATABASE] string required

        The name or binding of the DB

      • [MESSAGE] string required

        The Migration message

      d1 migrations apply

      Terminal window
      npx wrangler d1 migrations apply [DATABASE]
      • [DATABASE] string required

        The name or binding of the DB

      • --local boolean

        Execute commands/files against a local DB for use with wrangler dev

      • --remote boolean

        Execute commands/files against a remote DB for use with wrangler dev --remote

      • --preview boolean default: false

        Execute commands/files against a preview D1 DB

      • --persist-to string

        Specify directory to use for local persistence (you must use --local with this flag)

      import { WranglerNamespace } from "~/components";
      <WranglerNamespace namespace="d1" />