---
url: https://void.cloud/reference/cli/setup.md
description: >-
  Create a project with void init, prepare generated files, and inspect inferred
  resources.
---

# Project Setup {#setup}

## `void info` {#void-info}

```sh
void info
void info --json
```

Shows each Durable State and WebSocket definition's source file, inferred or explicit name, Worker class, and binding. WebSocket entries also include their route in JSON output. It runs locally without authentication, network requests, or file generation.

Before moving a deployed definition, copy the suggested `name` into `defineDurableState()`, `defineRoom()`, or `defineWebSocket()`. Keep that name after moving the file to preserve the resource. See [Durable State](../../guide/durable-state.md#rename-a-file-while-keeping-its-state) and [WebSockets](../../guide/websockets.md#move-a-route-while-keeping-its-state) for migration flows, including WebSocket parameter renames.

Resources recorded in `void.lock.json` without a matching definition appear separately. Adopt a suggested name only after identifying the resource you moved. If Void cannot suggest a name, restore its original source and inspect it before moving it again.

`--json` returns `resources` and `recordedResources`. Current entries contain `file`, `definition`, `name`, `nameSource` (`inferred` or `explicit`), `className`, `bindingName`, and an optional `route`. Recorded entries contain `className` and `bindingName`, with `name` and `definition` when a matching name is available.

## `void migrate` {#void-migrate}

`void migrate` converts legacy `void.json` and root `wrangler.jsonc` or `wrangler.json` files into `void.config.ts`. It also accepts one root `wrangler*.json(c)` file referenced by a supported framework adapter. Void saves backups in `.void/config-migration/`, records resource IDs in `void.lock.json`, and updates supported adapters to use its generated Cloudflare config.

The command adds generated `.cloudflare/` and `.void-wrangler.jsonc` files to `.gitignore` as needed. Review and commit `void.config.ts`, `void.lock.json`, and `.gitignore`. `void init` and `void deploy` migrate legacy files automatically. Resolve conflicting Cloudflare configs first, and keep the project's `void` package and CLI on the same version.

## `void init` {#void-init}

```sh
void init [--tsconfig] [--github] [--git | --no-git]
          [--toolchain <name>] [--framework <name>] [--starter <name>] [--deploy <target>]
```

Run `void init` in an empty directory to choose your toolchain, framework, starter, and deployment target. New apps enable [typed routes](../config.md#routing-typedroutes). In a CommonJS package, Void writes `vite.config.mts` and uses `env.mts` for an inferred environment schema.

Pass your choices as flags to scaffold from a script or coding agent:

| Flag          | Values                                    |
| ------------- | ----------------------------------------- |
| `--toolchain` | `vite-plus`, `vite`                       |
| `--framework` | `react`, `vue`, `svelte`, `solid`         |
| `--starter`   | `sqlite`, `postgresql`, `mysql`, `static` |
| `--deploy`    | `cloudflare`, `void`, `none`              |

```sh
void init --toolchain vite-plus --framework react --starter sqlite --deploy none
npm create void@latest my-app -- --toolchain vite-plus --framework react --starter sqlite --deploy none
```

`npm create void <name>` takes a single directory name and creates it inside the current directory. Use up to 63 characters from `a-z`, `0-9`, and `-`, with a letter or digit at each end.

For a script or coding agent, pass flags directly. Without a terminal, `void init` ignores piped answers and keeps the project’s existing database settings. Pass `--deploy none` for local setup or choose a deployment target with `--deploy` unless one is already saved. For a team platform, run `void connect <url> --no-login` first.

Use a terminal to add demo code through init. For a supported deployment target, see [GitHub Actions deployment](../../guide/deployment.md#github). To associate your app with a Void platform project, see [project linking](./project.md#void-project-link-name).

Vite+ is the recommended toolchain. Vite+ starters include [`@cloudflare/oxlint-config`](https://github.com/cloudflare/oxlint-config). Run `vp lint` to check your code.

Vite+ projects install dependencies through `vp install`; no global Vite+ installation is required. Void preserves existing package-manager versions and lockfiles. New Vite+ projects without a package-manager configuration use pnpm without pinning a version.

In an existing app, Void adds missing dependencies and scripts and updates the Vite config. If it cannot edit your config, it prints the snippet to add.

The wizard configures TypeScript and environment declarations. If you skip sign-in during setup, run `void connect` when you’re ready to deploy. See the [Quickstart](../../guide/quickstart.md).

For coding agents, a new project gets an `AGENTS.md` that points to `node_modules/void/docs/`. In an existing project, interactive setup asks before editing that file. CI and other non-interactive runs leave it alone. Void also links skills for the agents it detects. See [Coding Agents](../../integrations/agents.md).

Outside an existing repository or workspace package, Void offers to initialize Git. Use `--git` to initialize without a prompt or `--no-git` to skip it. CI requires `--git` to initialize. Workspace packages do not accept these flags.

Run selected setup steps with:

| Flag         | Purpose                                                        |
| ------------ | -------------------------------------------------------------- |
| `--tsconfig` | Update TypeScript configuration, preserving existing settings. |
| `--github`   | Create the GitHub Actions deployment workflow.                 |

These flags can be combined and skip the other wizard steps. Coding agent setup
still runs. Add `--git` if you also want Git initialization.

For Cloudflare workflows, add a `CLOUDFLARE_API_TOKEN` repository secret. PostgreSQL and MySQL apps also need `DATABASE_URL`.

Void platforms with GitHub Actions support use short-lived OIDC credentials. Authorize the repository with `void github connect <project> --repo <owner/repo> --executor github_actions`. Core self-hosted platforms do not support that integration. See [Deployment](../../guide/deployment.md#github).

## `void prepare` {#void-prepare}

```
void prepare
```

Generates Void’s types and TypeScript configuration without starting the dev server or building the app. Run it after a fresh clone or before typechecking in CI.
