> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runpod.io/llms.txt
> Use this file to discover all available pages before exploring further.

# init

Create a new Flash project with a ready-to-use template structure including a FastAPI server, example GPU and CPU workers, and configuration files.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
flash init PROJECT_NAME [OPTIONS]
```

## Example

Create a new project directory:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
flash init PROJECT_NAME
cd PROJECT_NAME
pip install -r requirements.txt
flash dev
```

Initialize in the current directory:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
flash init .
```

## Arguments

<ResponseField name="PROJECT_NAME" type="string" required>
  Name of the project directory to create. Use `.` to initialize in the current directory.
</ResponseField>

## Flags

<ResponseField name="--force, -f">
  Overwrite existing files if they already exist in the target directory.
</ResponseField>

## What it creates

The command creates the following project structure:

<Tree>
  <Tree.Folder name="PROJECT_NAME" defaultOpen>
    <Tree.File name="lb_worker.py" />

    <Tree.File name="gpu_worker.py" />

    <Tree.File name="cpu_worker.py" />

    <Tree.File name=".env.example" />

    <Tree.File name=".gitignore" />

    <Tree.File name="pyproject.toml" />

    <Tree.File name="requirements.txt" />

    <Tree.File name="README.md" />
  </Tree.Folder>
</Tree>

### Template contents

* **lb\_worker.py**: load-balanced endpoint with HTTP routes. Contains `@Endpoint` functions with custom HTTP methods and paths (e.g., `POST /process`, `GET /health`). Multiple routes can share the same endpoint.
* **gpu\_worker.py**: GPU queue-based endpoint. Contains an `@Endpoint` function that runs on GPU hardware. Provides `/run` or `/runsync` routes for job submission. Creates one Serverless endpoint when deployed.
* **cpu\_worker.py**: CPU queue-based endpoint. Contains an `@Endpoint` function that runs on CPU-only instances. Provides `/run` or `/runsync` routes for job submission. Creates one Serverless endpoint when deployed.
* **.env**: Template for environment variables including `RUNPOD_API_KEY`.

## Next steps

After initialization:

1. Copy `.env.example` to `.env` (if needed) and add your `RUNPOD_API_KEY`.
2. Install dependencies: `pip install -r requirements.txt`
3. Start the development server: `flash dev`
4. Open [http://localhost:8888/docs](http://localhost:8888/docs) to explore the API.
5. Customize the workers for your use case.
6. Deploy with `flash deploy` when ready.

<Note>
  This command only creates local files. It doesn't interact with Runpod or create any cloud resources. Cloud resources are created when you run `flash dev` or `flash deploy`.
</Note>

## Related commands

* [`flash dev`](/flash/cli/dev) - Start the development server
* [`flash deploy`](/flash/cli/deploy) - Build and deploy to Runpod
