This PR was automatically generated to update documentation based on recent changes. Original commit: feat: Add Cursor IDE custom slash commands support (#1215)\n\n\n Co-authored-by: Claude <claude-assistant@anthropic.com>
150 lines
5.1 KiB
Plaintext
150 lines
5.1 KiB
Plaintext
---
|
|
title: "Cursor AI Integration"
|
|
description: "Learn how to set up and use Task Master with Cursor AI"
|
|
---
|
|
|
|
## Setting up Cursor AI Integration
|
|
|
|
<Check>
|
|
Task Master is designed to work seamlessly with [Cursor AI](https://www.cursor.so/), providing a structured workflow for AI-driven development.
|
|
</Check>
|
|
|
|
<AccordionGroup>
|
|
<Accordion title="Using Cursor with MCP (Recommended)" icon="sparkles">
|
|
If you've already set up Task Master with MCP in Cursor, the integration is automatic. You can simply use natural language to interact with Task Master:
|
|
|
|
```
|
|
What tasks are available to work on next?
|
|
Can you analyze the complexity of our tasks?
|
|
I'd like to implement task 4. What does it involve?
|
|
```
|
|
</Accordion>
|
|
<Accordion title="Manual Cursor Setup">
|
|
If you're not using MCP, you can still set up Cursor integration:
|
|
|
|
<Steps>
|
|
<Step title="After initializing your project, open it in Cursor">
|
|
The `.cursor/rules/dev_workflow.mdc` file is automatically loaded by Cursor, providing the AI with knowledge about the task management system
|
|
</Step>
|
|
<Step title="Place your PRD document in the scripts/ directory (e.g., scripts/prd.txt)">
|
|
|
|
</Step>
|
|
<Step title="Open Cursor's AI chat and switch to Agent mode">
|
|
|
|
</Step>
|
|
</Steps>
|
|
</Accordion>
|
|
<Accordion title="Alternative MCP Setup in Cursor">
|
|
<Steps>
|
|
<Step title="Go to Cursor settings">
|
|
|
|
</Step>
|
|
<Step title="Navigate to the MCP section">
|
|
|
|
</Step>
|
|
<Step title="Click on 'Add New MCP Server'">
|
|
|
|
</Step>
|
|
<Step title="Configure with the following details:">
|
|
- Name: "Task Master"
|
|
- Type: "Command"
|
|
- Command: "npx -y task-master-ai"
|
|
</Step>
|
|
<Step title="Save Settings">
|
|
|
|
</Step>
|
|
</Steps>
|
|
Once configured, you can interact with Task Master's task management commands directly through Cursor's interface, providing a more integrated experience.
|
|
</Accordion>
|
|
</AccordionGroup>
|
|
|
|
## Initial Task Generation
|
|
|
|
In Cursor's AI chat, instruct the agent to generate tasks from your PRD:
|
|
|
|
```
|
|
Please use the task-master parse-prd command to generate tasks from my PRD. The PRD is located at scripts/prd.txt.
|
|
```
|
|
|
|
The agent will execute:
|
|
|
|
```bash
|
|
task-master parse-prd scripts/prd.txt
|
|
```
|
|
|
|
This will:
|
|
|
|
- Parse your PRD document
|
|
- Generate a structured `tasks.json` file with tasks, dependencies, priorities, and test strategies
|
|
- The agent will understand this process due to the Cursor rules
|
|
|
|
### Generate Individual Task Files
|
|
|
|
Next, ask the agent to generate individual task files:
|
|
|
|
```
|
|
Please generate individual task files from tasks.json
|
|
```
|
|
|
|
The agent will execute:
|
|
|
|
```bash
|
|
task-master generate
|
|
```
|
|
|
|
This creates individual task files in the `tasks/` directory (e.g., `task_001.txt`, `task_002.txt`), making it easier to reference specific tasks.
|
|
|
|
## Custom Slash Commands
|
|
|
|
<Check>
|
|
When you initialize Task Master with Cursor (`task-master init --cursor`), it automatically sets up custom slash commands for enhanced productivity.
|
|
</Check>
|
|
|
|
Task Master automatically copies its complete set of slash commands to `.cursor/commands/` during project initialization. This provides you with convenient shortcuts for all Task Master operations directly within Cursor's interface.
|
|
|
|
### Available Slash Commands
|
|
|
|
The following slash commands become available in Cursor after initialization:
|
|
|
|
<Accordion title="Core Workflow Commands">
|
|
- `/tm-main` - Main Task Master help and overview
|
|
- `/tm-next-task` - Get the next available task to work on
|
|
- `/tm-show-task` - View detailed information about a specific task
|
|
- `/tm-list-tasks` - Display all tasks with various filtering options
|
|
- `/tm-project-status` - View overall project status
|
|
</Accordion>
|
|
|
|
<Accordion title="Task Management Commands">
|
|
- `/tm-add-task` - Add a new task to your project
|
|
- `/tm-update-task` - Update an existing task
|
|
- `/tm-set-status-*` - Change task status (to-pending, to-in-progress, to-done, etc.)
|
|
- `/tm-remove-task` - Remove a task from your project
|
|
</Accordion>
|
|
|
|
<Accordion title="Analysis and Planning Commands">
|
|
- `/tm-parse-prd` - Generate tasks from a PRD document
|
|
- `/tm-analyze-complexity` - Analyze task complexity
|
|
- `/tm-complexity-report` - View complexity analysis report
|
|
- `/tm-expand-task` - Break down tasks into subtasks
|
|
</Accordion>
|
|
|
|
<Accordion title="Advanced Workflow Commands">
|
|
- `/tm-smart-workflow` - Intelligent task workflow management
|
|
- `/tm-auto-implement-tasks` - Automated task implementation pipeline
|
|
- `/tm-command-pipeline` - Execute multiple Task Master commands in sequence
|
|
</Accordion>
|
|
|
|
### Using Slash Commands
|
|
|
|
Simply type the command name in Cursor's chat interface, and the AI will execute the corresponding Task Master operation:
|
|
|
|
```
|
|
/tm-next-task
|
|
```
|
|
|
|
The AI will understand the context and execute the appropriate `task-master` CLI command, providing you with the results directly in the chat.
|
|
|
|
### Command Cleanup
|
|
|
|
If you remove the Cursor profile from your project using `task-master remove --cursor`, the slash commands directory is automatically cleaned up to keep your project tidy.
|