Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.driftless.icu/llms.txt

Use this file to discover all available pages before exploring further.

Prerequisites

  • Node.js 22 or later
  • A Git repository with a remote
  • A Driftless workspace at driftless.icu
1

Install the CLI

npm install -g @driftless-sh/cli
driftless --version
2

Log in

Authenticate from the terminal:
driftless login
For CI or non-interactive setup, pass an API key from the dashboard:
driftless login --key drift_your_api_key_here
Store your key as DRIFTLESS_API_KEY in your environment to skip --key on every command.
3

Initialize the repo

Run init from the repository root. It scans the codebase, uploads a baseline, and installs the agent instructions.
driftless init
For monorepos, scope the scan to a subdirectory:
driftless init --src apps/api
Init creates .driftless/config.yml and .driftless/skill.md in your repo. The skill file is what agents read to learn the Driftless workflow.
4

Create a topic

Anchor team knowledge to the code it explains:
driftless context add "my-auth" \
  --what "Handles JWT validation and role-based access control" \
  --pattern "src/auth/**" \
  --tags auth,security \
  --kind code-context
Add decisions and gotchas as they become durable:
driftless context update my-auth \
  --decision "We use asymmetric RS256 keys, not HS256" \
  --gotcha "The guard decodes the JWT but does not verify roles; that happens in the role decorator"
5

Load before editing

Retrieve the topic directly:
driftless context get my-auth
For targeted loading based on the files you’re about to edit:
driftless context load --files "src/auth/guard.ts,src/auth/service.ts"

Verify setup

driftless doctor
doctor checks the API key, workspace, Git remote, baseline, AGENTS.md installation, and GitHub App status.

Next