Skip to content
Cloudflare Docs

WranglerCommand

WranglerCommand is used 16 times on 2 pages.

Pages which use WranglerCommand

Used 16 times.

Pages

    Partials

    The WranglerCommand component documents the available options for a given command.

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

    Import

    import { WranglerCommand } from "~/components";

    Usage

    deploy

    Terminal window
    npx wrangler deploy [SCRIPT]
    • [SCRIPT] string

      The path to an entry point for your Worker

    • --name string

      Name of the Worker

    • --no-bundle boolean default: false

      Skip internal build steps and directly deploy Worker

    • --outdir string

      Output directory for the bundled Worker

    • --outfile string

      Output file for the bundled worker

    • --compatibility-date string

      Date to use for compatibility checks

    • --compatibility-flags string alias: --compatibility-flag

      Flags to use for compatibility checks

    • --latest boolean default: false

      Use the latest version of the Workers runtime

    • --assets string

      Static assets to be served. Replaces Workers Sites.

    • --var string

      A key-value pair to be injected into the script as a variable

    • --define string

      A key-value pair to be substituted in the script

    • --alias string

      A module pair to be substituted in the script

    • --triggers string aliases: --schedule, --schedules

      cron schedules to attach

    • --routes string alias: --route

      Routes to upload

    • --domains string alias: --domain

      Custom domains to deploy to

    • --jsx-factory string

      The function that is called for each JSX element

    • --jsx-fragment string

      The function that is called for each JSX fragment

    • --tsconfig string

      Path to a custom tsconfig.json file

    • --minify boolean

      Minify the Worker

    • --dry-run boolean

      Don't actually deploy

    • --metafile string

      Path to output build metadata from esbuild. If flag is used without a path, defaults to 'bundle-meta.json' inside the directory specified by --outdir.

    • --keep-vars boolean default: false

      When not used (or set to false), Wrangler will delete all vars before setting those found in the Wrangler configuration. When used (and set to true), the environment variables are not deleted before the deployment. If you set variables via the dashboard you probably want to use this flag. Note that secrets are never deleted by deployments.

    • --logpush boolean

      Send Trace Events from this Worker to Workers Logpush. This will not configure a corresponding Logpush job automatically.

    • --upload-source-maps boolean

      Include source maps when uploading this Worker.

    • --old-asset-ttl number

      Expire old assets in given seconds rather than immediate deletion.

    • --dispatch-namespace string

      Name of a dispatch namespace to deploy the Worker to (Workers for Platforms)

    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

    import { WranglerCommand } from "~/components";
    <WranglerCommand command="deploy" />
    <WranglerCommand command="d1 execute" />