> ## 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 compile

> Compile .dwf/ rules into editor-specific config files

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

Reads your `.dwf/` rules and generates output for each configured tool using the appropriate bridge. Also deploys installed assets (commands, templates, hooks).

## Output by Tool

| Tool            | Output File                       |
| --------------- | --------------------------------- |
| Claude Code     | `CLAUDE.md`                       |
| Cursor          | `.cursor/rules/devworkflows.mdc`  |
| Gemini CLI      | `GEMINI.md`                       |
| Windsurf        | `.windsurf/rules/devworkflows.md` |
| VS Code Copilot | `.github/copilot-instructions.md` |

## Asset Deployment

During compilation, installed assets are also deployed:

| Asset Type | Source                       | Output                                         |
| ---------- | ---------------------------- | ---------------------------------------------- |
| Commands   | `.dwf/assets/commands/*.md`  | `.claude/commands/*.md` (frontmatter stripped) |
| Templates  | `.dwf/assets/templates/*.md` | `docs/specs/*.md` (frontmatter stripped)       |
| Hooks      | `.dwf/assets/hooks/*.json`   | `.claude/settings.local.json` (deep-merged)    |

## Flags

| Flag            | Description                       |
| --------------- | --------------------------------- |
| `--tool claude` | Compile only a specific bridge    |
| `--dry-run`     | Show output without writing files |
| `--verbose`     | Show detailed output              |

## Markers

When compiling to markdown-based outputs (CLAUDE.md, GEMINI.md, .github/copilot-instructions.md), the generated content is wrapped in `<!-- BEGIN dev-workflows -->` and `<!-- END dev-workflows -->` markers.

This means you can have **manual content** in your CLAUDE.md and dev-workflows will only replace the section between markers. Your hand-written rules are preserved.

## Examples

```bash theme={null}
# Compile all configured tools
devw compile

# Preview output without writing
devw compile --dry-run

# Compile only Claude bridge
devw compile --tool claude
```
