WranglerConfig·续6
- <a href="https://developers.cloudflare.com/workers/wrangler/commands/certificates/">/workers/wrangler/commands/certificates/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workers/wrangler/commands/certificates.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workers/wrangler/configuration/">/workers/wrangler/configuration/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workers/wrangler/configuration.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workers/wrangler/custom-builds/">/workers/wrangler/custom-builds/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workers/wrangler/custom-builds.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workers/wrangler/environments/">/workers/wrangler/environments/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workers/wrangler/environments.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workers/wrangler/migration/v1-to-v2/eject-webpack/">/workers/wrangler/migration/v1-to-v2/eject-webpack/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workers/wrangler/migration/v1-to-v2/eject-webpack.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workers/wrangler/migration/v1-to-v2/wrangler-legacy/commands/">/workers/wrangler/migration/v1-to-v2/wrangler-legacy/commands/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workers/wrangler/migration/v1-to-v2/wrangler-legacy/commands.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workers/wrangler/migration/v1-to-v2/wrangler-legacy/configuration/">/workers/wrangler/migration/v1-to-v2/wrangler-legacy/configuration/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workers/wrangler/migration/v1-to-v2/wrangler-legacy/configuration.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workers/wrangler/migration/v1-to-v2/wrangler-legacy/webpack/">/workers/wrangler/migration/v1-to-v2/wrangler-legacy/webpack/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workers/wrangler/migration/v1-to-v2/wrangler-legacy/webpack.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workers/wrangler/profiles/">/workers/wrangler/profiles/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workers/wrangler/profiles.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workflows/build/call-workflows-from-pages/">/workflows/build/call-workflows-from-pages/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workflows/build/call-workflows-from-pages.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workflows/build/trigger-workflows/">/workflows/build/trigger-workflows/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workflows/build/trigger-workflows.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workflows/build/workers-api/">/workflows/build/workers-api/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workflows/build/workers-api.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workflows/examples/backup-d1/">/workflows/examples/backup-d1/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workflows/examples/backup-d1.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workflows/examples/send-invoices/">/workflows/examples/send-invoices/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workflows/examples/send-invoices.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workflows/examples/wait-for-event/">/workflows/examples/wait-for-event/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workflows/examples/wait-for-event.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workflows/get-started/durable-agents/">/workflows/get-started/durable-agents/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workflows/get-started/durable-agents.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workflows/get-started/guide/">/workflows/get-started/guide/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workflows/get-started/guide.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workflows/python/bindings/">/workflows/python/bindings/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workflows/python/bindings.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workflows/python/">/workflows/python/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workflows/python/index.mdx">Source</a>
- <a href="https://developers.cloudflare.com/workflows/reference/limits/">/workflows/reference/limits/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/workflows/reference/limits.mdx">Source</a>
Partials
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/agents/common-integration-patterns.mdx">src/content/partials/agents/common-integration-patterns.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/agents/troubleshooting.mdx">src/content/partials/agents/troubleshooting.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/ai-search/binding-config.mdx">src/content/partials/ai-search/binding-config.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/browser-run/example-quick-action-binding.mdx">src/content/partials/browser-run/example-quick-action-binding.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/browser-run/example-workers-binding-screenshots-from-web.mdx">src/content/partials/browser-run/example-workers-binding-screenshots-from-web.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/durable-objects/do-faq-limits.mdx">src/content/partials/durable-objects/do-faq-limits.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/email-routing/types-bindings.mdx">src/content/partials/email-routing/types-bindings.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/hyperdrive/create-hyperdrive-binding.mdx">src/content/partials/hyperdrive/create-hyperdrive-binding.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/hyperdrive/create-hyperdrive-config-mysql.mdx">src/content/partials/hyperdrive/create-hyperdrive-config-mysql.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/hyperdrive/create-hyperdrive-config.mdx">src/content/partials/hyperdrive/create-hyperdrive-config.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/hyperdrive/hyperdrive-node-compatibility-requirement.mdx">src/content/partials/hyperdrive/hyperdrive-node-compatibility-requirement.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/workers/envvar-example.mdx">src/content/partials/workers/envvar-example.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/workers/nodejs_compat.mdx">src/content/partials/workers/nodejs_compat.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/workers/service-binding-rpc-example.mdx">src/content/partials/workers/service-binding-rpc-example.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/workers/service-binding-rpc-functions-example.mdx">src/content/partials/workers/service-binding-rpc-functions-example.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/workers/vite-plugin/add-api-worker.mdx">src/content/partials/workers/vite-plugin/add-api-worker.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/workers/vite-plugin/add-worker-config.mdx">src/content/partials/workers/vite-plugin/add-worker-config.mdx</a>
- <a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/workers/vite-plugin/create-wrangler-config.mdx">src/content/partials/workers/vite-plugin/create-wrangler-config.mdx</a>
</details>
This component can be used to automatically generate a jsonc version of the toml file (or vice versa) of the Cloudflare Wrangler configuration file.
Import
import { WranglerConfig } from "~/components";
Usage
import { WranglerConfig } from "~/components";
<WranglerConfig>
```toml
[[d1_databases]]
binding = "DB" # available in your Worker on env.DB
database_name = "prod-d1-tutorial"
database_id = "<unique-ID-for-your-database>"
```
</WranglerConfig>
Cloudflare CLI configuration
Use cfConfig to provide a reviewed cloudflare.config.ts equivalent. Supplying this prop displays the shared CLI selector.
import { WranglerConfig } from "~/components";
<WranglerConfig
cfConfig={`export default {
name: "my-worker",
};`}
>
```jsonc
{
"name": "my-worker"
}
```
</WranglerConfig>
Compatibility date
You should generally use $today for the compatibility_date value for new projects. This magic string is automatically replaced with the current date at build time, ensuring documentation always suggests the latest date. When $today is used, the component also automatically injects a comment above the compatibility_date line (for example, # Set this to today's date in TOML and // Set this to today's date in JSONC) so that readers know to keep the value current. If you need to specify a fixed date, you can do so as well, but you may miss out on the latest features and performance improvements. You can disable specific features by using compatibility flags.
import { WranglerConfig } from "~/components";
<WranglerConfig>
```jsonc
{
"name": "my-worker",
"compatibility_date": "$today"
}
```
</WranglerConfig>
Minimum compatibility dates
Some features require a minimum compatibility date. When documenting these features, use a :::note component to communicate the requirement clearly on the docs page:
:::note
This feature requires a `compatibility_date` of `2024-09-23` or later.
:::
Note
This feature requires a compatibility_date of 2024-09-23 or later.
The removeSchema prop can be used to remove the $schema reference from the generated JSON file. This can be useful if you want to add snippets of configuration files that are easier to copy paste, and are providing toml as the source config format.
If you provide jsonc as the source config format, the removeSchema prop will be ignored.
import { WranglerConfig } from "~/components";
<WranglerConfig removeSchema>
```toml
[[d1_databases]]
binding = "DB" # available in your Worker on env.DB
database_name = "prod-d1-tutorial"
database_id = "<unique-ID-for-your-database>"
```
</WranglerConfig>
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/style-guide/build-the-page/components/wrangler-config/#page","headline":"WranglerConfig","description":"Display Wrangler config in TOML and JSON tabs.","url":"https://developers.cloudflare.com/style-guide/build-the-page/components/wrangler-config/","inLanguage":"en","image":"https://developers.cloudflare.com/style-guide/build-the-page/components/wrangler-config/og.png?v=931455c5f28f2ee5","dateModified":"2026-09-23","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Display Wrangler command namespace documentation. title: WranglerNamespace image: https://developers.cloudflare.com/style-guide/build-the-page/components/wrangler-namespace/og.png?v=c5f3f20f934e37e9
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/style-guide/llms.txt
Use this file to discover all available pages before exploring further.
Docs