Project setup
Create a project from the terminal, connect a repository to its story map, keep INTENT.md current and configure your coding agent.
These commands create a project, connect a directory to its story map, and set up your coding agent. Run them from the root of the repository you want connected.
intentdocs start
Walks you from a problem statement to a new project.
intentdocs startNo arguments or options. Needs a valid login.
The flow:
- You describe the problem. It must be at least 10 characters.
- The CLI asks up to three follow-up questions about the idea.
- It writes a pitch, names the target user, and suggests product names. You pick one or type your own.
- It creates the project and prints the start of its ID.
- It asks whether you have validated demand. If you have not, it offers to publish the project to Explore so others can give feedback. Publishing asks you to confirm a summary first.
- It asks whether you are ready to scope. Yes runs
intentdocs scopewith the new project's ID. No prints the command to run later.
If you have reached your plan's project limit, project creation fails and the CLI says so.
intentdocs scope
Generates a blueprint and story map for a project, then connects the current directory to it.
intentdocs scope [projectId]| Argument | Meaning |
|---|---|
projectId | The project to scope. Optional; the CLI prompts for it when you leave it out. |
intentdocs scope 3f9c2a1e-7b4d-4c1a-9e2f-0a8b6c5d4e3fThe CLI asks four questions: the main steps a user takes, the key personas, the smallest thing you could build to test the idea, and any technical constraints. It then generates the blueprint and prints a short summary: the hypothesis, persona names, story count and build-order steps.
After that it:
- Connects the directory the way
initdoes: writes.intent/config.jsonwith the project ID, map ID, map title and the project's workspace (and its app URL when it has one), then downloadsINTENT.md. If the directory is already connected, it leaves.intent/config.jsonas it is, says so, and skips this step. To connect it to the new project instead, delete.intent/config.jsonand runintentdocs init. - Offers to write
MOCKUP_PROMPT.md, a prompt you hand to your coding agent to build a single-file HTML mockup. The CLI does not build the mockup itself. - Offers to run
git initand commitINTENT.md(andMOCKUP_PROMPT.md), when the directory is not already a Git repository. - Offers to run
intentdocs setup.
intentdocs templates
Lists the built-in story map templates, or previews one.
intentdocs templates [name]| Argument | Meaning |
|---|---|
name | The template to preview. Optional; without it, the command lists all templates. |
intentdocs templates
intentdocs templates saasThe templates are saas, marketplace, mobile-app and ai-tool. A preview prints the template's story, activity and persona counts and the steps under each activity:
SaaS Starter: Multi-tenant SaaS with auth, billing, and dashboards
16 stories, 5 activities, 2 personas
Sign up & Onboard: Registration → Team setup → First-run experience
Core Workflow: Dashboard → Main feature → Data management
...This command only displays templates. It does not create or change anything.
intentdocs init
Connects the current directory to an existing story map.
intentdocs initNo options. The command shows an optional [token] argument for backwards compatibility, but sync tokens are retired: passing one prints a message and exits 1.
What it does:
- Logs you in first if you are not logged in.
- Lists the projects your token can reach and asks you to pick one by number, then a story map in that project.
- Makes a first call to the map as you, to confirm you have access, and prints the story counts.
- Writes
.intent/config.json: the project ID, map ID, map title and the project's workspace. It also stores the project's app URL when it has one, whichintentdocs doneuses for screenshots. - Downloads
INTENT.md. - Adds
.intent/to.gitignore, if the file exists. - If
CLAUDE.mdexists and does not mentionINTENT.md, appends an intentdocs block. The block points the agent atINTENT.md, asks it to save each test withsave_tests, tells it to link each pull request withintentdocs done <story> --pr <url>or thecomplete_storyorlink_prtool, and gives the PR footer to use when GitHub is not connected. If.cursorrulesexists and does not mentionINTENT.md, appends one line pointing at it. - If there is no
ARCHITECTURE.md, detects your stack from the project files, asks you to confirm it, and writes anARCHITECTURE.mdscaffold.
Then it asks two questions:
- Allow tools without asking. It shows the IntentDocs MCP tools it would allow in the project's
.claude/settings.json, and writes them only if you answery. Allowed: the read toolslist_projects,get_context,get_session_context,list_stories,get_story,get_status,get_build_order,get_vision,get_design,get_run, and the build-loop toolsnext_in_run,start_story,report_criteria,save_tests,complete_story,link_pr,add_note. These still ask every time:replace_criteria,update_stories,create_stories,cancel_story. The rules use the server name you gave IntentDocs in.mcp.jsonor~/.claude.json, orintentdocswhen it finds none. For Cursor, it prints which tools to allow in Cursor's settings. - Set up CI test reporting. Answer
yto runintentdocs cinow.
Behaviour to know:
- If the directory is already connected,
inittells you to runintentdocs syncinstead and exits0. To reconnect, delete.intent/config.jsonfirst. - If your token reaches no projects, or the project has no story maps,
initsays so and exits0. Create one at intentdocs.com first. - The workspace it records is what later commands check your token against. See Workspaces and tokens.
intentdocs sync
Refreshes local files from the live story map.
intentdocs sync [--context]| Option | Default | Meaning |
|---|---|---|
--context | off | Refresh only the agent context file, not INTENT.md or story files |
intentdocs sync
intentdocs sync --contextWithout options, sync:
- Rewrites
INTENT.mdand prints the done count, for example✓ INTENT.md updated (12/30 done, 40%). - Records a sync event in the project's activity feed.
- Refreshes every
.intent/stories/<id>.mdfile already on disk from the live story. What you wrote under Approach, Implementation notes, Decisions and Relevant files is kept. Files for stories no longer on the map are left in place and reported as orphaned.
With --context, it fetches the project's assembled agent context (instructions, scope, decisions, examples, tools and guardrails) and writes it to .claude/CLAUDE.md when a .claude/ directory exists, otherwise to CLAUDE.md at the root. Run it after you change the project's instructions, guardrails, decisions or examples.
Note:
sync --contextreplaces the whole context file. Anything you wrote in that file by hand is lost; keep your own notes in a different file.
Note: In a story context file, the title, status, user story, criteria, design references, spec and implementation plan come from the server and are rewritten on every refresh. The Approach, Implementation notes, Decisions and Relevant files sections are yours:
sync,showandimplementkeep what you wrote there, including any##headings you add inside them. Anything you edit elsewhere in the file is replaced. To put a note on the story itself, useintentdocs note.
intentdocs setup
Configures Claude Code, Cursor or both to work with this project.
intentdocs setupNo arguments or options. Needs a valid login and a connected checkout. It asks which tool to configure: Claude Code, Cursor, or both.
For Claude Code, it:
- Appends an intentdocs section to
CLAUDE.md, or creates the file, unless the section is already there. - Writes twelve slash commands to
.claude/commands/:intent-next,intent-implement,intent-review,intent-document,intent-test,intent-status,intent-done,intent-sync,intent-propose,intent-context,intent-decideandintent-example. They are rewritten on every run. - Removes old
pb-*command files from the same directory. - Registers the local MCP server in the project's
.mcp.jsonunder the nameintent, runningnpx intentdocs mcp. This is the entryclaude mcp add --scope project intent -- npx intentdocs mcpwrites. Other servers in the file are kept. If.mcp.jsonisn't valid JSON, it is left alone andsetupprints that command for you to run. Restart Claude Code and approve the server when it asks. - Removes the
intententry older versions ofsetupwrote to~/.claude/settings.json, where Claude Code doesn't read MCP servers. An entry you changed is left alone.
For Cursor, it appends an intentdocs section to .cursorrules, or creates the file, and prints the mcpServers JSON to add to Cursor's MCP settings. It does not write Cursor's settings for you.
In both cases, it then writes the project's agent context the same way intentdocs sync --context does, and creates ARCHITECTURE.md and CONVENTIONS.md scaffolds if they are missing.
You can run setup again at any time. It does not duplicate the sections it appends.
For the hosted MCP server and per-client setup, see Claude Code setup and Cursor and remote setup.