Skip to main content
Version: 3.5.0

Command-Line Interface


The Resoto Shell CLI supports various commands that allow you to access the graph database.


You can pipe commands using | and chain multiple commands using ;.

Search Commands

aggregateAggregate this query by the provided specification
ancestorsSelect all ancestors of this node in the graph
countCount incoming elements or sum defined property
descendantsSelect all descendants of this node in the graph
historySearch the history of nodes.
kindsRetrieves information about the graph data kinds
predecessorsSelect all predecessors of this node in the graph
searchSearch the graph
successorsSelect all successors of this node in the graph
templatesAccess the query template library

Format Commands

dumpDump all properties of incoming objects
formatTransform incoming objects as string with a defined format
listTransform incoming objects as string with defined properties

Action Commands

awsExecute commands on AWS resources
cleanMark all incoming database objects for cleaning
httpPerform HTTP request with incoming data
jobsManage all jobs
protectMark all incoming database objects as protected
set_desiredAllows to set arbitrary properties as desired for all incoming database objects
set_metadataAllows to set arbitrary properties as metadata for all incoming database objects
tagUpdate a tag with provided value or delete a tag
workflowsManage all workflows

Setup Commands

certificateCreate TLS certificates
configsManage configuration settings
systemAccess and manage system wide properties

Miscellaneous Commands

appsManage infrastructure apps
chunkChunk incoming elements in batches
echoSend the provided message to downstream
envRetrieve the environment and pass it to the output stream
flattenTake incoming batches of elements and flattens them to a stream of single elements
headReturn n first elements of the stream
helpShows available commands, as well as help for any specific command
jqFilter and process JSON
jsonParse JSON and pass parsed objects to the output stream
sleepSuspend execution for an interval of time
tailReturn n last elements of the stream
uniqRemove all duplicated objects from the stream
writeWrites the incoming stream of data to a file in the defined format

Custom Commands

It is possible to create your own commands by combining existing commands with your own logic. In resoto shell type config edit resoto.core.commands. This will open a file and show all available custom commands. Resoto ships with an example command called discord, that allows to send the result of a search to Discord as notification.

A custom command has the following properties:

  • name: The name of the custom command
  • template: a command template that will be executed when the command is called. A template can have template parameters. See templates to learn how to define them.
  • info: a short description of the command. This will be displayed to users when they call help my-custom-command
  • parameters: a list of placeholder parameters. All parameters need to be defined in order to use the command. If the parameter defines a default value, it is considered optional. If there is no default value, the parameter is required and needs to be defined by the user during execution time.
Example custom command
info: 'Say Hi to the user.'
name: 'hello'
- name: 'person'
default: 'world'
description: 'The person to greet.'
template: 'echo Hello {{person}}.'

Once a custom command has been defined in the resoto.core.commands configuration, the command can be executed in Resoto Shell:

Usage of the new hello command
> help hello
# output omitted for brevity
> hello
Hello world.
> hello person="John Doe"
Hello John Doe.

Custom commands are defined globally, so they can be executed by any Resoto user.

Placeholder Strings

Placeholders are not case sensitive. You can use @utc@ or @UTC@ and will get the same result.


Keyboard Shortcuts

Resoto Shell supports most common Unix shell keyboard shortcuts.

Ctrl + D on an empty lineExit the shell (same as quit)
Ctrl + LClear the entire terminal but not the current line (redraw)
Ctrl + CCancel input for the current line
Ctrl + UClear from cursor to beginning of line
Ctrl + KClear from cursor to end of line
Ctrl + HClear one character to the left of the cursor (same as Backspace)
Ctrl + DClear one character to the right of the cursor
Esc + BackspaceClear one word to the left of the cursor
Esc + DClear one word to the right of the cursor
Alt + Jump to the beginning of the previous word
Alt + Jump to the beginning of the next word
Ctrl + AJump to start of line
Ctrl + EJump to end of line
Ctrl + RReverse search history
Step backwards in history
Step forward in history

Contact Us