ailiteracynepal 🇳🇵
Text size

Chapter 01 · Section III · 10 min read

1.3 Interactive mode: shortcuts, @mentions, images

The interactive REPL is where you actually spend your day. Keyboard shortcuts, file @mentions, and image input — the ergonomics that turn a chat into a working session.

Interactive mode is a text prompt with tricks. Learning the shortcuts and the two input affordances — file mentions and images — is the difference between typing “read src/api/user.ts” ten times a day and reading paths off your tab-complete.

Keyboard shortcuts

The ones worth committing to muscle memory:

ShortcutWhat it does
Ctrl-C (once)Interrupt the current tool call / model reply
Ctrl-C (twice)Exit the session
Ctrl-DEnd of input (EOF), on an empty line exits
Shift-EnterNewline within the current message
Ctrl-LClear the visible terminal (transcript is preserved)
/Open slash-command palette
@Open file-mention picker
↑ / ↓Cycle through previous prompts

/help inside a session lists everything; /config shows the runtime settings.

File @mentions

Type @ and start typing a path. The picker shows matching files in the workspace, with fuzzy matching. Select one and the path becomes part of your message.

@src/api/user.ts audit the createUser handler for input validation

This is not a copy-paste of the file — it is a reference Claude will resolve by reading. Cheaper than pasting the contents, cleaner than describing the file in prose.

You can mention multiple files:

review the diff between @src/api/user.ts and @tests/api/user.test.ts

Image input

Drag an image into the terminal, or paste one from the clipboard. Claude sees the image and can reason about it. Real use cases:

  • A wireframe or design mockup — “implement this layout in src/pages/HomeHero.tsx.”
  • A screenshot of an error dialog — “what’s this and how do I fix it?”
  • A diagram of an architecture — “does the file layout in this repo match?”

Slash commands from the prompt

Anything that starts with / is treated as a command. Built-ins (/help, /clear, /config, /init) plus any user- or project-level slash commands you have defined (Section 2.3).

Check your understanding

Quick check

You want Claude to read `src/api/user.ts` and `tests/api/user.test.ts` and compare them, without pasting either file contents into the prompt. What is the ergonomic way?