Get Cursor's Ask Mode in Your Terminal
Use Claude Code CLI to answer questions about a codebase without letting the agent change files, much like Cursor's Ask mode.
Use Claude Code CLI to answer questions about a codebase without letting the agent change files, much like Cursor's Ask mode.
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?"
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.