[Go to site: main page, start]

Skip to main content

Command Palette

Search for a command to run...

CLI

Configuration

Configure the Agent CLI using the cli-config.json file.

File location

TypePlatformPath
GlobalmacOS/Linux~/.cursor/cli-config.json
GlobalWindows$env:USERPROFILE\.cursor\cli-config.json
ProjectAll<project>/.cursor/cli.json

Override with environment variables:

  • CURSOR_CONFIG_DIR: custom directory path
  • XDG_CONFIG_HOME (Linux/BSD): uses $XDG_CONFIG_HOME/cursor/cli-config.json

Schema

Required fields

FieldTypeDescription
versionnumberConfig schema version (current: 1)
editor.vimModebooleanEnable Vim keybindings (default: false)
permissions.allowstring[]Permitted operations (see Permissions)
permissions.denystring[]Forbidden operations (see Permissions)

Optional fields

FieldTypeDescription
channelstringRelease channel used for CLI updates
modelobjectSelected model configuration
maxModebooleanPersisted preference for max mode in the model picker
hasChangedDefaultModelbooleanCLI-managed model override flag
notificationsbooleanSend a terminal notification when the agent finishes or needs input
hintsbooleanShow CLI hints while the agent is working
rewindbooleanEnable /rewind to restore an earlier message in the session
suggestNextPromptbooleanSuggest a follow-up prompt at the end of each turn
display.showLineNumbersbooleanShow line numbers in rendered code blocks
display.showThinkingBlocksbooleanRender model thinking blocks when available
display.showStatusIndicatorsbooleanEnable terminal title status indicators
display.showStatusLineRunningTimebooleanShow elapsed running time in the status line
approvalModestringApproval mode: allowlist, auto-review, or unrestricted
sandbox.modestringSandbox mode override
sandbox.networkAccessstringNetwork access setting for sandbox mode
network.useHttp1ForAgentbooleanUse HTTP/1.1 instead of HTTP/2 for agent connections (default: false)
attribution.attributeCommitsToAgentbooleanAdd "Made with Cursor" trailer to Agent commits (default: true)
attribution.attributePRsToAgentbooleanAdd "Made with Cursor" footer to Agent PRs (default: true)

Examples

Minimal config

{  "version": 1,  "editor": { "vimMode": false },  "permissions": { "allow": ["Shell(ls)"], "deny": [] }}

Enable Vim mode

{  "version": 1,  "editor": { "vimMode": true },  "permissions": { "allow": ["Shell(ls)"], "deny": [] }}

Configure permissions

{  "version": 1,  "editor": { "vimMode": false },  "permissions": {    "allow": ["Shell(ls)", "Shell(echo)"],    "deny": ["Shell(rm)"]  }}

See Permissions for available permission types and examples.

Troubleshooting

Config errors: Move the file aside and restart:

mv ~/.cursor/cli-config.json ~/.cursor/cli-config.json.bad

Changes don't persist: Ensure valid JSON and write permissions. Some fields are CLI-managed and may be overwritten.

Notes

  • Pure JSON format (no comments)
  • CLI performs self-repair for missing fields
  • Corrupted files are backed up as .bad and recreated
  • Permission entries are exact strings (see Permissions for details)

Models

You can select a model for the CLI using the /model slash command.

/model auto/model gpt-5/model sonnet-4-thinking

See the Slash commands docs for other commands.

Proxy configuration

If your network routes traffic through a proxy server, configure the CLI using environment variables and the config file.

Environment variables

Set these environment variables before running the CLI:

export HTTP_PROXY=http://your-proxy:portexport HTTPS_PROXY=http://your-proxy:portexport NODE_USE_ENV_PROXY=1

If your proxy performs SSL inspection (man-in-the-middle), also trust your organization's CA certificate:

export NODE_EXTRA_CA_CERTS=/path/to/corporate-ca-cert.pem

HTTP/1.1 fallback

Some enterprise proxies (like Zscaler) don't support HTTP/2 bidirectional streaming. Enable HTTP/1.1 mode in your config:

{  "version": 1,  "editor": { "vimMode": false },  "permissions": { "allow": [], "deny": [] },  "network": {    "useHttp1ForAgent": true  }}

This switches agent connections to HTTP/1.1 with Server-Sent Events (SSE), which works with most corporate proxies.

See Network Configuration for proxy testing commands and troubleshooting.