Pgcli Recall: Instantly Retrieve Your Past PostgreSQL Commands
The query you just ran failed. You know you typed it before. You can’t remember the exact syntax, but Pgcli Recall can.
Pgcli Recall is built into pgcli to store and retrieve your past commands instantly. It brings up the history of your PostgreSQL session with a single keystroke. No grepping through logs. No scrolling through endless terminal buffers. Just search and execute.
When you enable recall, pgcli logs every query you run—securely and locally. You can filter the history by keywords, database name, or date. This makes recall more precise than the typical shell history, because it’s aware of the database context. You can re-run commands exactly as they were, without losing formatting or parameters.
For teams, Pgcli Recall reduces repeated typing and human error. Combined with pgcli’s rich autocompletion and syntax highlighting, recall becomes a workflow accelerator. It is especially useful in long-lived interactive sessions, where remembering exact statements or complex joins can waste minutes.
To use Pgcli Recall, start pgcli, run your queries, and press the recall shortcut (Ctrl+R by default). Type part of a previous query, then hit enter to load it back into the prompt. You can edit before execution or run it as-is. Pgcli preserves ANSI colors, so even recalled queries are easy to scan.
Pgcli Recall does not depend on external tools. It works offline, with minimal CPU and memory usage. You control the retention period, file path for the history, and whether to enable it for certain environments. This makes it portable across dev, staging, and production.
Stop retyping the same queries. Use Pgcli Recall to keep every SQL command within reach. Try it on hoop.dev and see it live in minutes.