Quick Start
Get started with driftless in under 5 minutes.
Prerequisite
driftless requires Claude Code CLI to be installed and authenticated. The CLI uses Claude Code to read your tests and generate documentation.
Installation
Run the init command in your project root:
npx @driftless-ai/cli@latest initThe CLI auto-detects your test framework (Playwright, Cypress, TestCafe, Detox, WebDriverIO, or Nightwatch) and walks you through six configuration prompts:
- Test file glob pattern — which test files to analyze (auto-populated from your detected framework)
- Output directory — where generated docs are written (default:
docs/training) - Documentation framework — Plain Markdown, Fumadocs MDX, or Docusaurus MDX
- Capabilities to enable — Doc Generator, E2E Writer, or both
- Skills directory — where skill definition files are stored (default:
.skills) - Auto-update preference — whether the CLI should self-update on launch
A .driftless.json config file is created in your project root. See the init walkthrough for a detailed breakdown of each prompt and what happens after you answer them.
How It Works
When you run driftless init with the Doc Generator capability enabled, driftless reads your end-to-end test files and generates user-facing training documentation. It also installs skill files that teach Claude Code how to write and maintain docs in your project's conventions.
When your tests change in a pull request, the installed GitHub Actions workflow detects which docs are stale and updates them automatically.
GitHub Actions
driftless init scaffolds up to two GitHub Actions workflows depending on your selected capabilities:
- Driftless Doc Update — detects stale documentation when tests change in a PR and updates it
- Driftless Test Generation — detects new user-facing flows in a PR and generates missing e2e tests
Both workflows use claude-code-action and require an ANTHROPIC_API_KEY secret in your repository. See the GitHub Actions guide for setup details and operational edge handling.
Next Steps
- Init walkthrough — detailed breakdown of every init prompt and the post-prompt flow
- Configuration reference — every
.driftless.jsonfield with its type, default, and effect - GitHub Actions setup — workflow configuration, secrets, and operational details
- Troubleshooting — common errors and how to resolve them