Installing the CLI
Run the intentdocs CLI with npx or install it globally, then sign in with intentdocs login.
The CLI connects a repository to an IntentDocs project. It writes INTENT.md, sets up Claude Code or Cursor, and turns on CI test reporting. You don't need it to use the web app or to connect an agent over MCP, but you need it to connect a repository.
Run it
The CLI is the npm package intentdocs. The quickest way to use it is through npx, with nothing to install:
npx intentdocs loginOr install it globally:
npm install -g intentdocsA global install gives you two commands: intentdocs, and intent as a shorter alias. The alias may clash with other tools on your machine, so this site uses npx intentdocs throughout. Every example works with intentdocs or intent in its place.
Sign in
npx intentdocs loginThis opens your browser. Sign in, choose which workspace the CLI should read, and approve the request. If the browser doesn't open, the command prints a link to visit.
The CLI stores a token on your machine. Every sync and every change it makes runs as you, and is recorded against your name in the project's activity.
- Personal workspace. The token reads your own projects straight away.
- Team workspace. If the workspace asks admins to approve new agents, the token waits for an admin. Until then it reads your personal projects only. See Workspaces and teams.
login refuses if you're already signed in. To switch account or workspace, sign out first:
npx intentdocs logoutYour own Anthropic key (optional)
Some CLI commands use AI to do their work, such as scoring complexity, researching a question, importing a PRD or suggesting verification commands with implement --stub. You can save your own Anthropic API key so they run on it:
npx intentdocs keys set # paste your key, or leave it off to be prompted
npx intentdocs keys status # shows whether a key is set, masked
npx intentdocs keys remove # removes itSee CLI: Auth and keys for details.
Next
Connect your repository to a project.