← Blog
explainx / blog

Cursor CLI Slash Commands: Complete Reference (2026)

Every Cursor CLI slash command—/plan, /ask, /model, /compress, /mcp, /rules, and 25+ more. Workflow guide from official docs.

9 min readYash Thakker
CursorCursor CLISlash CommandsAI CodingDeveloper Tools

MDX restores the committed source plus an HTML comment attribution; plain text bundles the rendered markdown body with the explainx.ai attribution footer.

Cursor CLI Slash Commands: Complete Reference (2026)

Cursor CLI brings the Cursor editor's agentic coding experience to the terminal—same modes, rules, MCP integrations, and model catalog, keyboard-first in your shell. Beyond natural-language prompts, it exposes 25+ slash commands for switching between Plan and Ask modes, configuring sandbox and auto-run behavior, managing rules and custom commands, and controlling sessions without leaving the CLI.

This article is a complete slash-command reference from the official Slash commands documentation and the Using Agent in CLI guide. It is not a replacement for upstream docs. Use this as a map of the surface area and a workflow guide; verify behavior against cursor.com/docs before you ship team runbooks.

Sister guides: Claude Code · Codex · Gemini CLI · OpenCode

TL;DR

QuestionAnswer
How do I see all commands?Type / in the Cursor CLI composer; run /help or /help <cmd>
Three modes?Agent (default), Plan (/plan), Ask (/ask); also Shift+Tab
First session in a repo?/rules/commands/mcp list/sandbox
Long conversation?/compress to summarize; /usage for stats
Custom workflows?/commands to create/edit; rules via /rules
Project guidance?.cursor/rules + AGENTS.md + CLAUDE.md at repo root
Sister guides?Claude Code · Codex · Gemini CLI · OpenCode

Three agent modes (the foundation)

Cursor CLI's slash commands orbit three modes—the same model as the Cursor editor:

ModeAccessSwitch via
AgentFull tool access for coding tasksDefault; no flag needed
PlanResearch + clarifying questions + reviewable plan before code/plan, Shift+Tab, --plan, --mode=plan
AskRead-only exploration; no file edits/ask, --mode=ask

Plan mode works best for complex features, multi-file changes, unclear requirements, and architectural decisions. Ask mode is for understanding code without risk of edits. Agent mode is the default for implementation work.

See Plan Mode documentation for the full workflow: agent asks questions → researches codebase → generates plan → you review/edit → build when ready.


How slash commands fit a typical workflow

flowchart LR
  A[Setup /rules /mcp /sandbox] --> B[Plan /plan]
  B --> C[Build Agent mode]
  C --> D[Explore /ask]
  D --> E[Ship /compress /usage]
  E --> F[Sessions /new-chat /resume]

First session in a repo

StepCommandWhat it does
1/rulesCreate or edit .cursor/rules for project guidance
2/commandsCreate or edit custom slash commands
3/mcp listBrowse, enable, and configure MCP servers
4/sandboxConfigure sandbox mode and network access
5/auto-run statusConfirm tool auto-run policy

The CLI automatically loads AGENTS.md and CLAUDE.md at the project root alongside .cursor/rules—same as the editor agent.

During a task

CommandPurpose
/planSwitch to Plan mode before large changes
/askRead-only codebase exploration
/model [model]Set or list available models
/max-mode [on|off]Toggle max mode on supported models
/auto-run [on|off|status]Toggle whether tools run without confirmation
/compressSummarize conversation to free context
/usageView Cursor streaks and usage statistics

Before debugging or support

CommandPurpose
/copy-request-idCopy last request ID to clipboard
/copy-conversation-idCopy conversation ID to clipboard
/aboutShow environment and CLI setup details
/feedback <message>Share feedback with the Cursor team

Between sessions

CommandPurpose
/new-chatStart fresh chat session
/resume <chat>Resume previous chat by folder name
/logoutSign out from Cursor
/quitExit CLI
Live Bootcamp6 weeks

Complete AI Builder Bootcamp

Claude, Python automation & full-stack — 12 live sessions with Yash Thakker.

View bootcamp

The Complete AI Builder Bootcamp is the best AI development course for learning Claude AI, prompt engineering, Python automation, and full-stack web development. This intensive 6-week live bootcamp teaches you how to build AI-powered applications using Claude Projects, Claude Artifacts, Claude Code, and the complete Claude ecosystem. You'll master prompt engineering techniques, learn to create custom Claude connectors and MCP integrations, build Python automation workflows, develop full-stack websites with AI assistance, and create AI marketing agents.

The bootcamp includes 12 live Zoom sessions with Yash Thakker, founder of AISOLO Technologies and instructor to 350,000+ students. You'll build 8+ portfolio projects including AI playbooks, full-stack note-taking applications, Python automation scripts, marketing agents, and personal portfolio websites. The curriculum covers AI fundamentals, Claude Projects and Artifacts, Claude Co-work, Claude plugins and skills, Claude Code for Python development, full-stack development, AI marketing, and capstone projects.

Students receive 1-year access to all recordings, permanent Discord community access, a certificate of completion, and personalized career guidance. All enrollments include a 7-day money-back guarantee. This is the most comprehensive Claude AI bootcamp available, taking students from zero AI knowledge to expert AI builder in 6 weeks.


Mode and model commands

CommandPurpose
/planSwitch to Plan mode—design approach before coding
/askSwitch to Ask mode—read-only exploration
/model [model]Set active model or list available models
/max-mode [on|off]Toggle max mode on models that support it
/auto-run [on|off|status]Toggle auto-run default; status shows current state

Auto-run controls whether the agent executes tools (shell, file edits) without asking first. Tighten with /auto-run off when working on sensitive code; check state with /auto-run status.

Max mode enables extended reasoning on models that support it—similar in spirit to Claude Code's /effort or Codex's deeper reasoning tiers, but Cursor-specific.

CLI flags (non-slash alternatives):

cursor agent --mode=plan "Refactor the auth module"
cursor agent --mode=ask "How does caching work?"
cursor agent --plan "Design a migration strategy"

Security, sandbox, and permissions

CommandPurpose
/sandboxConfigure sandbox mode and network access settings
/auto-run [on|off|status]Control tool execution approval policy

Use /sandbox to restrict what the agent can reach on your machine and network—especially important when running Cursor CLI on shared or production-adjacent environments.

For broader agent security patterns, see Is Claude Cowork safe? and Claude Code's /permissions in our Claude Code commands reference.


Rules, custom commands, and MCP

CommandPurpose
/rulesCreate new rules or edit existing rules
/commandsCreate new custom commands or edit existing ones
/mcp listBrowse, enable, and configure MCP servers
/mcp enable <name>Enable a specific MCP server
/mcp disable <name>Disable a specific MCP server

Rules live in .cursor/rules as .mdc files—the same rules system as the Cursor editor. They provide persistent, path-scoped guidance to the agent.

Custom commands via /commands let you define reusable prompts—Cursor's equivalent to Gemini CLI .toml commands or OpenCode .md commands.

MCP integration matches the editor: enable servers with /mcp enable, disable with /mcp disable, browse config with /mcp list. See What is MCP? for protocol fundamentals.


Session, context, and terminal commands

CommandPurpose
/new-chatStart a new chat session (empty context)
/resume <chat>Resume a previous chat by folder name
/compressSummarize conversation to free context space
/usageView Cursor streaks and usage stats
/vimToggle Vim keybindings for input
/setup-terminalAuto-configure terminal keybindings (Shift+Enter, etc.)
/help [command]Show help; pass command name for detail
/aboutEnvironment and CLI setup details
/quitExit the CLI
/logoutSign out from Cursor

/compress vs /new-chat: /compress keeps you in the same session with a summarized history—use mid-task when context fills up. /new-chat wipes context entirely—use when switching to an unrelated task.

Resume by folder: /resume <chat> finds previous sessions by folder name, aligning with Cursor's project-scoped chat history.


Debugging and support commands

CommandPurpose
/copy-request-idCopy last request ID (for support tickets)
/copy-conversation-idCopy conversation ID to clipboard
/feedback <message>Send feedback to the Cursor team
/aboutDump environment and CLI configuration

When filing bugs or asking in Cursor forums, /copy-request-id gives support a precise trace of the failing request.


Complete slash command reference table

Every command from the official Slash commands page as of June 11, 2026. (The upstream docs list /max-mode twice; it is one command.)

CommandPurpose
/planSwitch to Plan mode—design approach before coding
/askSwitch to Ask mode—read-only exploration
/model [model]Set or list models
/auto-run [on|off|status]Toggle auto-run or show status
/sandboxConfigure sandbox mode and network access
/max-mode [on|off]Toggle max mode on supported models
/new-chatStart a new chat session
/vimToggle Vim keys for input
/help [command]Show help; optional command name
/feedback <message>Share feedback with the team
/resume <chat>Resume previous chat by folder name
/usageView Cursor streaks and usage stats
/aboutShow environment and CLI setup details
/copy-request-idCopy last request ID to clipboard
/copy-conversation-idCopy conversation ID to clipboard
/logoutSign out from Cursor
/quitExit the CLI
/setup-terminalAuto-configure terminal keybindings
/mcp listBrowse, enable, and configure MCP servers
/mcp enable <name>Enable an MCP server
/mcp disable <name>Disable an MCP server
/rulesCreate or edit agent rules
/commandsCreate or edit custom slash commands
/compressSummarize conversation to free context

Total: 24 unique built-in slash commands (25 entries in upstream table with duplicate /max-mode).


Five-way comparison: Cursor CLI vs Claude Code vs Codex vs Gemini CLI vs OpenCode

TaskCursor CLIClaude CodeCodexGemini CLIOpenCode
Plan before coding/plan/plan/plan/plancustom + agent: plan
Read-only explore/ask
Project rules/rules + .cursor/rulesCLAUDE.mdAGENTS.mdGEMINI.mdAGENTS.md
Custom commands/commandsSkillsSkills/plugins.toml files.md files
Free context/compress/compact/compact/compress/compact
Switch model/model/model + /effort/model/model set/models
Auto-run / permissions/auto-run/permissions/permissions/permissionsvia config
Sandbox/sandbox/sandboxWindows path/sandboxvia config
MCP/mcp list|enable|disable/mcp/mcp/mcpvia config
Autonomous targetAgent mode/goal/goalcustom + subtask
New session/new-chat/clear/new, /clear/new, /clear/new
Resume session/resume <chat>/resume/resume/resume/sessions
Undo file changes/rewind/restore, /rewind/undo, /redo
Usage stats/usage/usage/status/stats/stats
File attachment@ in editor; CLI context/ide/mention, /ide@path@path
Shell passthroughAgent tools!command!command

Full references: Cursor CLI · Claude Code · Codex · Gemini CLI · OpenCode

Cursor's differentiator: Plan + Ask + Agent mode triad with editor-parity .cursor/rules—a smaller built-in table than Claude Code, but tight integration with the Cursor ecosystem.


Commands worth memorizing first

/plan                          # design before coding
/ask                           # read-only exploration
/model                         # pick model
/auto-run status               # confirm tool policy
/compress                      # free context mid-session
/rules                         # edit project rules
/mcp list                      # check MCP servers
/new-chat                      # fresh session
/resume my-project             # continue prior chat
/copy-request-id               # for support tickets

Typical workflow

# 1. Plan a large change
/plan
Refactor auth to use JWT with refresh tokens

# 2. Review plan, then switch to Agent (default) to implement
# 3. Mid-session context getting full?
/compress

# 4. Explore without edits
/ask
How does the current session middleware work?

Related ExplainX guides

Primary sources: Slash commands — Cursor Docs · Using Agent in CLI · Plan Mode · CLI Overview


Summary

Cursor CLI slash commands center on three modes (/plan, /ask, Agent), editor-parity configuration (/rules, /commands, /mcp), and session hygiene (/compress, /new-chat, /resume). The built-in surface is smaller than Claude Code's 90+ commands, but the Plan → review → build workflow is first-class—not bolted on.

Type / to discover commands in your build. Treat cursor.com/docs/cli/reference/slash-commands as source of truth; bookmark this guide alongside the Claude Code, Codex, Gemini CLI, and OpenCode references for cross-platform work.


Command names and behavior reflect Cursor documentation as of June 11, 2026. Re-check cursor.com/docs and the Cursor changelog before documenting internal runbooks.

Related posts