Skip to main content

Overview

Forge uses the Reedline library with Emacs-style keybindings for powerful terminal editing. This page documents all available keyboard shortcuts in interactive mode.

Essential Shortcuts

These are the most frequently used shortcuts that will significantly improve your workflow.
ShortcutActionDescription
TabAutocompleteShow completion menu or insert exact match
Ctrl+RSearch historyInteractive search through command history
Ctrl+KClear screenClear the terminal screen
Alt+EnterInsert newlineAdd a newline without submitting
Ctrl+DExitExit Forge (same as /exit)
Ctrl+CCancelCancel current input and show new prompt
Move around the current line efficiently:
ShortcutAction
Ctrl+AMove to beginning of line
Ctrl+EMove to end of line
Ctrl+BMove backward one character
Ctrl+FMove forward one character
Alt+BMove backward one word
Alt+FMove forward one word
Move left one character
Move right one character
Previous command in history
Next command in history

Editing Shortcuts

Edit text on the command line:
ShortcutAction
Ctrl+DDelete character under cursor (or exit if line is empty)
BackspaceDelete character before cursor
Ctrl+HDelete character before cursor (alternative)
Ctrl+WDelete word before cursor
Alt+DDelete word after cursor
Ctrl+UDelete from cursor to beginning of line
Ctrl+KDelete from cursor to end of line (conflicts with clear screen)
Ctrl+YPaste (yank) previously deleted text
Ctrl+TTranspose (swap) previous two characters

Completion Features

Command Completion

Press Tab after typing / to see all available commands:
/[Tab]
Shows:
  • Built-in system commands
  • Custom commands from your configuration
  • Agent switching commands
  • Workflow commands

Path Completion

When referencing files or directories, Tab provides intelligent completion:
> Update the file in src/[Tab]

Smart Completion

If there’s an exact match, Tab will insert it immediately. If multiple matches exist, a menu appears:
/m[Tab]        → /model (if unique)
/mo[Tab]       → shows /model, /muse menu

History Features

Ctrl+R is one of the most powerful features for finding previous commands quickly.
Press Ctrl+R to enter interactive history search:
  1. Type to search through your command history
  2. Matching commands appear as you type
  3. Press Enter to execute the command
  4. Press Esc to cancel and return to prompt
Ctrl+R
(search): git status

History Navigation

Use arrow keys to browse history:
  • - Previous command
  • - Next command
History persists across sessions and is stored in your system config directory.

Multi-line Input

Forge supports multi-line prompts for complex queries:

Creating Multi-line Input

Press Alt+Enter to add a newline without submitting:
> Can you help me understand[Alt+Enter]
  how the authentication system[Alt+Enter]
  works in this codebase?[Enter]

Editing Multi-line Input

All editing shortcuts work across multiple lines:
  • / - Move between lines
  • Ctrl+A - Jump to start of current line
  • Ctrl+E - Jump to end of current line

Screen Control

ShortcutAction
Ctrl+KClear screen and scrollback
Ctrl+LRedraw screen
Use Ctrl+K to clear clutter when the terminal gets crowded with output.

Copy and Paste

Terminal Selection

Forge supports bracketed paste mode:
  • Select text with your mouse in most terminals
  • Paste with your terminal’s paste command:
    • Ctrl+Shift+V (Linux)
    • Cmd+V (macOS)
    • Right-click → Paste (most terminals)

Forge Clipboard

Internal clipboard using kill/yank:
  • Ctrl+W - Cut word before cursor
  • Ctrl+U - Cut from cursor to start of line
  • Ctrl+K - Cut from cursor to end of line
  • Ctrl+Y - Paste (yank) cut text

Process Control

ShortcutAction
Ctrl+CCancel current input, show new prompt
Ctrl+DExit Forge (if line is empty)

Emacs-style Keybindings

Forge uses Emacs-style keybindings by default. If you’re familiar with Emacs, most standard editing commands work:
ShortcutEmacs Command
Ctrl+Abeginning-of-line
Ctrl+Eend-of-line
Ctrl+Fforward-char
Ctrl+Bbackward-char
Alt+Fforward-word
Alt+Bbackward-word
Ctrl+Kkill-line
Ctrl+Uunix-line-discard
Ctrl+Wunix-word-rubout
Ctrl+Yyank

Tips for Efficiency

Quick Command Repetition

  1. Use to get the last command
  2. Press Enter to repeat it

Fast Agent Switching

/f[Tab]        → /forge
/m[Tab]        → menu with /model, /muse
/s[Tab]        → /sage

History Search Best Practices

  • Use Ctrl+R instead of pressing repeatedly
  • Type unique parts of the command you’re looking for
  • Use meaningful commit messages and commands for easier search

Multi-line for Complex Prompts

Use Alt+Enter for:
  • Long explanations
  • Code snippets
  • Structured questions
> I need help with:[Alt+Enter]
  1. Refactoring the auth module[Alt+Enter]
  2. Adding error handling[Alt+Enter]
  3. Writing unit tests[Enter]

Clear Screen Regularly

Use Ctrl+K to clear the screen between different tasks for better focus.

Customization

Currently, Forge uses Emacs-style keybindings by default. Customization options may be added in future versions.

Terminal Compatibility

These shortcuts work in most modern terminals:
  • iTerm2 (macOS)
  • Terminal.app (macOS)
  • GNOME Terminal (Linux)
  • Konsole (Linux)
  • Windows Terminal
  • Alacritty
  • Kitty
  • WezTerm
Some terminals may require additional configuration for certain shortcuts (especially Alt/Option key combinations on macOS).

Next Steps

Build docs developers (and LLMs) love