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

# devw init

> Initialize .dwf/ in the current project

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

Creates the `.dwf/` directory structure with configuration and empty rule files.

## Behavior

1. Detects AI tools configured in the project (looks for `.cursor/`, `CLAUDE.md`, `GEMINI.md`, `.windsurf/`, `.github/copilot-instructions.md`)
2. Asks which tools to include (detected tools are pre-selected)
3. Asks output mode: `copy` (default) or `link`
4. Generates `.dwf/config.yml` + empty rule files with example comments
5. Creates `.dwf/assets/` directory for commands, templates, and hooks
6. Adds `.dwf/.cache/` to `.gitignore`
7. If `--preset` is specified, installs the preset after initialization

## Generated Structure

```
.dwf/
  config.yml
  rules/
    architecture.yml
    conventions.yml
    security.yml
    workflow.yml
    testing.yml
  assets/
```

## Flags

| Flag                           | Description                                                 |
| ------------------------------ | ----------------------------------------------------------- |
| `--tools claude,cursor,gemini` | Skip interactive tool selection                             |
| `--mode copy\|link`            | Skip interactive mode selection                             |
| `--preset <name>`              | Install a preset after initialization (e.g., `spec-driven`) |
| `-y, --yes`                    | Accept all defaults                                         |

## Examples

```bash theme={null}
# Interactive
devw init

# Non-interactive with specific tools
devw init --tools claude,cursor --mode copy

# Accept all defaults
devw init -y

# Initialize with the spec-driven workflow preset
devw init --preset spec-driven -y
```
