Interactive Query Shell
Steampipe provides an interactive query shell that provides features like auto-complete, syntax highlighting, and command history to assist you in writing queries.
To open the query shell, run
steampipe query with no arguments:
$ steampipe query>
Notice that the prompt changes, indicating that you are in the Steampipe shell.
You can exit the query shell by pressing
Ctrl+d on a blank line, or using the
The query shell includes an autocomplete feature that will suggest words as you type. Type
. (period). Notice that the autocomplete appears with a list of the Steampipe meta-commands commands that start with
As you continue to type, the autocomplete will continue to narrow down the list of tables to only those that match.
You can cycle forward through the list with the
Tab key, or backward with
Shift+Tab. Tab to select
.tables and hit enter. The
.tables command is executed, and lists all the tables that are installed and available to query.
The query shell supports command history, allowing you to retrieve, run, and edit previous commands. The command history works like typical unix shell command history, and persists across query sessions. When on a new line, you can cycle back through the history with the
Up Arrow or
Ctrl+p and forward with
Down Arrow or
The query shell supports standard emacs-style key bindings:
|Move the cursor to the beginning of the line|
|Move the cursor to the end of the line|
|Move the cursor forward 1 character|
|Move the cursor backward 1 character|
|Delete a word backwards|
|Delete a character forwards. On a blank line, |
|Delete a character backwards|
|Go to the previous command in your history|
|Go to the next command in your history|