Skip to content

Keybindings

query-cli is designed to be fully keyboard-driven. Every action has a shortcut.

query-cli — Help
Keyboard shortcuts
F5 / Ctrl+RF5 / ⌃RRun query
F9 / Ctrl+PF9 / ⌃PCommand palette
Ctrl+S⌃SSave query
Ctrl+N⌃NNew query
Ctrl+D⌃DDelete query
Ctrl+Y⌃YCopy selection
Ctrl+H / F1⌃H / F1This help
Ctrl+C⌃CQuit
Ask AI
@ai: …Ask AI in the editor
/ask-aiInsert @ai: at the cursor
/ai-configConfigure AI adapter

Global Shortcuts

Key (Linux / Windows)macOSAction
F5 / Ctrl + RF5 / Control + RRun query
F9 / Ctrl + PF9 / Control + POpen command palette
Ctrl + SControl + SSave query
Ctrl + NControl + NNew query
Ctrl + DControl + DDelete query
Ctrl + YControl + YCopy selection to clipboard
F1 / Ctrl + HF1 / Control + HShow keyboard shortcuts help
Ctrl + CControl + CQuit

Note: Ctrl+S may freeze some Unix terminals (XOFF). Press Ctrl+Q to resume, or disable flow control with stty -ixon.

Tab management (new, switch, save, rename, delete) and other actions are available through slash commands in the editor — type / to see the list.

Editor Shortcuts

Inside the query editor:

  • ↑/↓ — Navigate suggestions (when autocomplete is visible)
  • Tab / Enter — Accept suggestion
  • Esc — Dismiss suggestions

Connection Screen

  • ↑/↓ or j/k — Navigate connections
  • Enter — Connect / Create new / Quit
  • Ctrl+C — Quit

AI Prompts

  • @ai: <your request> — Ask AI to generate SQL
  • Enter — Submit AI prompt
  • Esc (while AI is thinking) — Cancel AI request

Released under the MIT License.