Skip to content

Commit 8ffa617

Browse files
committed
re-add init
1 parent a4dd09c commit 8ffa617

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/content/docs/workers/wrangler/commands.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,26 @@ You can then run them using your package manager of choice:
104104

105105
---
106106

107+
## `init`
108+
109+
Create a new project via the [create-cloudflare-cli (C3) tool](/workers/get-started/guide/#1-create-a-new-worker-project). A variety of web frameworks are available to choose from as well as templates. Dependencies are installed by default, with the option to deploy your project immediately.
110+
111+
```txt
112+
wrangler init [<NAME>] [OPTIONS]
113+
```
114+
115+
- `NAME` <Type text="string" /> <MetaInfo text="optional (default: name of working directory)" />
116+
- The name of the Workers project. This is both the directory name and `name` property in the generated [Wrangler configuration](/workers/wrangler/configuration/).
117+
- `--yes` <Type text="boolean" /> <MetaInfo text="optional" />
118+
- Answer yes to any prompts for new projects.
119+
- `--from-dash` <Type text="string" /> <MetaInfo text="optional" />
120+
- Fetch a Worker initialized from the dashboard. This is done by passing the flag and the Worker name. `wrangler init --from-dash <WORKER_NAME>`.
121+
- The `--from-dash` command will not automatically sync changes made to the dashboard after the command is used. Therefore, it is recommended that you continue using the CLI.
122+
123+
<Render file="wrangler-commands/global-flags" product="workers" />
124+
125+
---
126+
107127
## `containers`
108128

109129
Interact with Cloudflare's Container Platform.

0 commit comments

Comments
 (0)