Terminal Command Auto-Approval for Trusted Scripts

Summary
Add the ability to configure trusted commands/scripts that can run without approval prompts in Cursor’s integrated terminal.

Problem
Currently, Cursor requires manual approval for all external commands executed from the integrated terminal, including:

  • User-created scripts in trusted locations (e.g., ~/bin/)
  • Common development tools and utilities
  • Custom aliases and functions that call external programs
  • Even simple utilities like text-to-speech commands

This creates friction for power users who frequently run trusted scripts and tools.

Proposed Solution
Add a configuration option to specify trusted commands/scripts that can run without approval:

Option 1: Trusted Paths

{
  "terminal.integrated.trustedPaths": [
    "~/bin/",
    "~/.local/bin/",
    "/usr/local/bin/"
  ]
}

Option 2: Trusted Commands

{
  "terminal.integrated.trustedCommands": [
    "espeak-ng",
    "~/bin/speak",
    "~/bin/say"
  ]
}

Option 3: Trusted Scripts with Hash Verification

{
  "terminal.integrated.trustedScripts": {
    "~/bin/speak": "sha256-hash-here",
    "~/bin/say": "sha256-hash-here"
  }
}

Benefits

  • Reduces workflow friction for power users
  • Maintains security for untrusted code
  • Allows customization of security boundaries
  • Preserves the approval system for unknown commands

Security Considerations

  • Only apply to user-specified trusted paths/commands
  • Maintain approval for commands from untrusted sources
  • Option to require explicit user confirmation for new trusted items
  • Clear visual indication when trusted commands are executed

Use Cases

  • Development scripts and utilities
  • Custom automation tools
  • Text-to-speech and accessibility tools
  • Common system utilities

Implementation Priority
Medium - This would significantly improve the developer experience for power users while maintaining security.

Additional Context
This feature would be particularly valuable for developers who:

  • Use custom scripts for automation
  • Work with accessibility tools
  • Have established workflows with trusted utilities
  • Need to run frequent, safe commands without interruption

The current approval system, while secure, can be overly restrictive for legitimate development workflows.