Get Cursor's Ask Mode in Your Terminal
Love Cursor's Ask mode and live in the terminal? Here's how to get the same codebase-aware answers from Claude Code CLI without the agent touching a single file.
Love Cursor's Ask mode and live in the terminal? Here's how to get the same codebase-aware answers from Claude Code CLI without the agent touching a single file.
Cursor's "Ask" mode is great because you get codebase-aware answers without the agent making unsolicited file changes. You can get the exact same behavior from the Claude Code CLI with one flag.
The default claude command is an agent. It reads files, runs commands, and makes changes. That's powerful. Sometimes you just want to ask a question about your codebase and get a straight answer back.
The --permission-mode plan flag tells Claude Code not to touch any files. It can still read your entire project and answer with full context, and it will not write, edit, or execute anything.
--concise skips the long-winded "Plan" formatting that breaks down every step in exhaustive detail. You get a direct answer instead.
Put them together:
claude --permission-mode plan --concise "How does auth flow through this API?"
That's it. Codebase-aware, non-destructive, and to the point.
Don't type those flags every time. Drop this in your ~/.zshrc or ~/.bashrc:
alias ask='claude --permission-mode plan --concise'
Now you just run ask "What does this function return if the DB is down?" and you're done.
Claude Code supports a CLAUDE.md file at the root of your repo. Anything in there gets injected into every conversation automatically. Use it to describe your architecture, your conventions, or the areas of the codebase that need special context.
That way your ask alias is always project-aware without you needing to re-explain anything.