CLI
The dot•requirements CLI (dotreq) manages your requirements workflow: initialize projects, sync with the cloud, validate files, and configure AI integrations.
Installation
npm
npm install @popoverai/dotrequirementsFor MCP server usage with AI assistants, a global install is often more convenient:
npm install -g @popoverai/dotrequirementsNote: Examples use
dotreqfor brevity, and because we’re pretty sure that’s what you’re going to end up using too. The full commanddotrequirementsalso works.
Commands
dotreq init
Initialize a project in the current directory. You’ll be prompted to choose between:
- Create a new project — Creates a new cloud project (or local-only if not authenticated)
- Connect to an existing project — Links to a project that already exists in the cloud
dotreq init
dotreq init --name my-projectInit will:
- Create or update
.env.localwith project credentials - Create
.requirements/directory with example requirements - Update
.gitignoreto protect credentials - Pull existing requirements (if connecting to an existing project)
Options:
| Option | Description |
|---|---|
--name <name> | Set project name (skips prompt) |
dotreq link
Connect to an existing project. This is the same as choosing “Connect to an existing project” in init, but skips the choice prompt.
dotreq linkUse link when you’ve already run init on another machine or clone and need to connect this environment to the same project.
Requires authentication. You’ll be prompted to select your team and project.
dotreq login
Authenticate with dot•requirements cloud. Opens a browser for authentication.
dotreq loginCredentials are stored in ~/.dotrequirements/tokens.json with restricted file permissions.
dotreq logout
Clear stored authentication credentials.
dotreq logoutdotreq pull
Sync requirements from dot•requirements cloud to local files.
dotreq pull
dotreq pull --project <project-id>
dotreq pull --document <document-id>Options:
| Option | Description |
|---|---|
--project <id> | Pull from specific project |
--document <id> | Pull specific document only |
Where files are written:
Pull always writes to the .requirements/ directory. Files are matched by document ID (stored in frontmatter), so renaming a file won’t cause duplicates. New documents are named by sanitized title (e.g., “Login Flow” → login-flow.requirements.md).
Note: If you’ve moved a requirements file outside
.requirements/(e.g., colocated with a component), pulling will create a new copy in.requirements/. The test harness will find both files, but only the one in.requirements/is managed by pull.
dotreq push
Push local requirements changes to dot•requirements cloud.
dotreq push
dotreq push .requirements/auth.requirements.md
dotreq push --yesWithout --yes, shows a diff preview and prompts for confirmation before pushing.
Options:
| Option | Description |
|---|---|
--yes | Skip confirmation prompt |
Which files are pushed:
dotreq push(no arguments) — Pushes all*.requirements.mdfiles in.requirements/dotreq push <path>— Pushes the specified file from any location
If you colocate requirements files with components, you’ll need to push them explicitly by path.
dotreq test
Validate requirements files against the schema. This checks file structure and format—it does not run your test suite.
dotreq test
dotreq test --file .requirements/auth.requirements.mdOptions:
| Option | Description |
|---|---|
--file <path> | Validate specific file only |
dotreq mcp-setup
Configure the MCP server for AI assistants. Interactive setup that configures your chosen assistant and optionally installs workflow skills.
dotreq mcp-setupSupports: Claude Code, Claude Desktop, Cursor, Google Antigravity, OpenAI Codex, GitHub Copilot.
See Local MCP for details.
dotreq mcp
Start the MCP server manually. (Typically not needed—AI assistants start it automatically after mcp-setup.)
dotreq mcpConfiguration
The CLI stores project credentials in .env.local:
DOTREQUIREMENTS_PROJECT_ID=your-project-id
DOTREQUIREMENTS_PROJECT_SECRET=your-project-secretThis file is automatically added to .gitignore during initialization.
Environment Variables
| Variable | Description |
|---|---|
DOTREQUIREMENTS_PROJECT_ID | Project identifier |
DOTREQUIREMENTS_PROJECT_SECRET | Project secret for cloud access |
DOTREQUIREMENTS_PROJECT_ROOT | Override project root detection |
File Discovery
The CLI finds **/*.requirements.md files anywhere in your project, not just in .requirements/. This enables colocation with components or tests.
Ignored directories: node_modules/, dist/, .git/, build/, example/, examples/
Project Root Detection
The CLI determines project root in this order:
- Explicit
DOTREQUIREMENTS_PROJECT_ROOTenvironment variable - Walking up from current directory looking for
.requirements/ - Current working directory
Monorepo Considerations
We recommend initializing at the monorepo root. Dot•requirements projects are designed to be analogous to codebases. In this configuration, all packages share the same project and credentials.
Supported configurations:
- Single root at monorepo level
- Peer directories with separate projects (independent projects)
Unsupported configurations:
- Nested roots (a directory containing
.requirements/with another.requirements/in a child directory) - Same project accessed from different directories without shared root
What Works Offline
These features work without cloud authentication:
- Write requirements (
.requirements.mdfiles) - Validate requirements (
dotreq test) - Reference requirements in tests (
requirement()) - Local coverage reporting
- MCP tools for search and validation
These features require cloud authentication:
- Sync requirements (
pull/push) - Historical coverage tracking
- AI-powered style checking and test review
- Team collaboration