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

# Set up a local-only project

> Scaffold a project for hand-authoring flows that don't live on the QA Wolf platform.

`qawolf init` scaffolds a project for writing flow files by hand. Most users should [pull flows from QA Wolf](/qawolf/local-execution/pull-flows) instead — the platform is where flow creation, AI-powered test generation, and team collaboration live, and `qawolf flows pull` brings those flows into a local cache the CLI can run from. Reach for `qawolf init` only when you want to author flows locally without the platform.

## Scaffold a new project

<Steps>
  <Step>
    Open a terminal in the directory you want to use as the project root:

    ```bash theme={null}
    cd path/to/your/project
    ```
  </Step>

  <Step>
    Run the init command:

    ```bash theme={null}
    qawolf init
    ```

    The CLI prompts before overwriting any existing files. To skip the prompts, pass `--yes`.
  </Step>
</Steps>

The command creates the following files:

* `qawolf.config.ts` — a project configuration file generated for future use; the CLI does not read it yet.
* `src/flows/example.flow.ts` — a minimal web flow you can edit or delete.
* `.qawolf/.gitignore` — ignores the contents of `.qawolf/`, such as flows pulled from the platform. Run artifacts in `qawolf-output/` are not covered.

If your directory has no `package.json`, the CLI creates one with `"type": "module"`, the `@qawolf/flows` dependency, and a `test:e2e` script that runs `qawolf flows run`. If a `package.json` already exists, the CLI only adds the `test:e2e` script.

## Write a flow

Flow files live anywhere in your project as long as they match the glob `**/*.flow.{ts,js}`. The example flow is a good starting point:

```typescript theme={null}
import { expect, flow } from "@qawolf/flows/web";

export default flow(
  "Example",
  { launch: true, target: "Web - Chrome" },
  async ({ page, test }) => {
    await test("navigate to example.com", async () => {
      await page.goto("https://example.com");
      await expect(page).toHaveTitle(/Example/);
    });
  },
);
```

For the full flow authoring surface, see the [@qawolf/flows API reference](/qawolf/libraries/flows/api-reference/index).

## Verify the setup

```bash theme={null}
qawolf flows list
```

The command lists every flow the CLI can find in the project. If the example flow appears, the project is ready to run.
