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.
Same idea as Cursor Ask mode: answers with repo context, no surprise edits. Claude Code does it with one flag.
The default claude command is an agent. It reads files, runs commands, and makes changes. Sometimes you just want to ask a question about your codebase and get a straight answer back.
--permission-mode plan tells Claude Code not to touch any files. It can still read your entire project and answer with full context. No writes, edits, or shell commands.
--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?"
Codebase-aware, non-destructive, and to the point.
Drop this in your ~/.zshrc or ~/.bashrc:
alias ask='claude --permission-mode plan --concise'
Now you run ask "What does this function return if the DB is down?" and you're done.
Claude Code reads a CLAUDE.md file at the repo root on every session. Put architecture notes, conventions, and gotchas there so your ask alias stays project-aware without re-explaining the codebase each time.