# Shell Mode Shell Mode runs shell commands directly from the CLI without leaving your conversation. Use it for quick, non-interactive commands with safety checks and output displayed in the conversation. [Media](/docs-static/images/cli/shell-mode/cli-shell-mode.mp4) ## Command execution Commands run in your login shell (`$SHELL`) with the CLI's working directory and environment. Chain commands to run in other directories: ```bash cd subdir && npm test ``` ## Output Large outputs are truncated automatically and long-running processes timeout to maintain performance. ## Limitations - Commands timeout after 30 seconds - Long-running processes, servers, and interactive prompts are not supported - Use short, non-interactive commands for best results ## Permissions Commands are checked against your permissions and team settings before execution. See [Permissions](https://cursor.com/docs/cli/reference/permissions.md) for detailed configuration. Admin policies may block certain commands, and commands with redirection cannot be allowlisted inline. ## Usage guidelines Shell Mode works well for status checks, quick builds, file operations, and environment inspection. Avoid long-running servers, interactive applications, and commands requiring input. Each command runs independently - use `cd