{
  "id": "cursor",
  "name": "Cursor CLI",
  "homepage": "https://cursor.com/docs/cli",
  "description": "The AI code editor, and the agent it ships for the command line.",
  "icon": "theSVG:cursor/light",
  "executables": [
    "cursor-agent"
  ],
  "dotfiles": {
    "paths": [
      "~/.cursor/cli-config.json",
      "~/.cursor/hooks.json",
      "~/.cursor/mcp.json",
      "~/.cursor/rules/",
      "~/.cursor/commands/"
    ],
    "exclude": [
      "~/.cursor/projects/",
      "~/.cursor/chats/",
      "~/.cursor/agents/",
      "~/.cursor/plans/",
      "~/.cursor/snapshots/",
      "~/.cursor/worktrees/",
      "~/.cursor/extensions/",
      "~/.cursor/plugins/",
      "~/.cursor/skills-cursor/",
      "~/.cursor/ai-tracking/",
      "~/.cursor/agent-cli-state.json",
      "~/.cursor/ide_state.json",
      "~/.cursor/statsig-cache.json",
      "~/.cursor/argv.json"
    ],
    "secret": [],
    "machine_lines": [
      {
        "file": "~/.cursor/hooks.json",
        "match": {
          "key_path": [
            "hooks.*.*.command"
          ]
        },
        "scope": "backup"
      },
      {
        "file": "~/.cursor/mcp.json",
        "match": {
          "key_path": [
            "mcpServers.*.command",
            "mcpServers.*.args"
          ]
        },
        "scope": "backup"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Run Cursor agent",
    "description": "Start the Cursor agent with an optional prompt, in interactive or print (non-interactive) mode. Subcommands, MCP, worktree and auth flags are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "url": "https://cursor.com/docs/cli",
        "revision": "cursor-agent --help 2026-10-27",
        "evidence": "Usage: agent [options] [command] [prompt...]\n  prompt                       Initial prompt for the agent\n  -p, --print                  Print responses to console (for scripts or non-interactive use). Has access to all tools, including write and shell. (default: false)\n  --output-format <format>     Output format (only works with --print): text | json | stream-json (default: \"text\")\n  --mode <mode>                Start in the given execution mode. plan: read-only/planning (analyze, propose plans, no edits). ask: Q&A style for explanations and questions (read-only). (choices: \"plan\", \"ask\")\n  --plan                       Start in plan mode (shorthand for --mode=plan). (default: false)\n  --continue                   Continue previous session (default: false)\n  --model <model>              Model to use (e.g., gpt-5, sonnet-4-thinking).\n  -f, --force                  Force allow commands unless explicitly denied (default: false)\n  --workspace <path-or-name>   Workspace directory or saved workspace name to use (defaults to current working directory)\n"
      }
    ],
    "field": [
      {
        "id": "prompt",
        "label": "Prompt",
        "type": "string",
        "position": 0,
        "sources": [
          "help"
        ]
      },
      {
        "id": "print",
        "label": "Print mode (non-interactive)",
        "description": "Prints the response and exits; the agent has access to all tools including write and shell.",
        "type": "boolean",
        "option": [
          "--print",
          "-p"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "output_format",
        "label": "Output format",
        "description": "Only works with print mode.",
        "type": "enum",
        "option": [
          "--output-format"
        ],
        "choices": [
          {
            "value": "text",
            "label": "Text"
          },
          {
            "value": "json",
            "label": "JSON"
          },
          {
            "value": "stream-json",
            "label": "Streaming JSON"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "mode",
        "label": "Mode",
        "type": "enum",
        "option": [
          "--mode"
        ],
        "choices": [
          {
            "value": "plan",
            "label": "Plan (read-only)"
          },
          {
            "value": "ask",
            "label": "Ask (read-only Q&A)"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "model",
        "label": "Model",
        "type": "string",
        "option": [
          "--model"
        ],
        "suggestions": [
          {
            "value": "gpt-5",
            "label": "gpt-5"
          },
          {
            "value": "sonnet-4-thinking",
            "label": "sonnet-4-thinking"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "continue_session",
        "label": "Continue previous session",
        "type": "boolean",
        "option": [
          "--continue"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "workspace",
        "label": "Workspace",
        "type": "path",
        "option": [
          "--workspace"
        ],
        "path": {
          "kind": "directory",
          "role": "input"
        },
        "sources": [
          "help"
        ]
      },
      {
        "id": "force",
        "label": "Force allow commands",
        "description": "Allows commands unless explicitly denied.",
        "type": "boolean",
        "option": [
          "--force",
          "-f"
        ],
        "effect": "exec",
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "ask",
        "label": "Ask a question (read-only)",
        "fields": [
          "prompt",
          "mode"
        ],
        "required": [
          "prompt"
        ],
        "set": {
          "mode": [
            "ask"
          ]
        }
      },
      {
        "id": "script",
        "label": "Non-interactive run",
        "fields": [
          "prompt",
          "print",
          "output_format",
          "model"
        ],
        "required": [
          "prompt"
        ],
        "set": {
          "print": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "prompt",
          "print",
          "mode",
          "model"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "output_format",
          "continue_session",
          "workspace",
          "force"
        ]
      }
    ]
  }
}
