Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Commands

Commands can be WASM plugin modules, Rust types, or external programs. They can be queued, scheduled, or run from the command line.

Echo

Print text to the terminal:

inengine echo --text "Hello, world"

Exec

Run an external program. The program must be listed in the exec_whitelist section of inengine.toml.

Add a program to the whitelist:

[exec_whitelist]
hello = "/path/to/hello.py"

Run the program:

inengine exec -e hello

Pass arguments after --:

inengine exec -e hello -- --verbose --count 5

Set a timeout in seconds. The default is 900 seconds. Use 0 for no limit:

inengine exec -e hello -t 60

The program also stops at the timeout of a scheduled job and when the server stops. Exec kills only the program it started, so a process that the program starts in the background keeps running.

Exec prints the standard output of the program, then its standard error. When a stream is larger than 1 MiB, Exec keeps its first 512 KiB and its last 512 KiB, and prints a line between them that says how many bytes it did not keep:

[1048584 bytes not kept]

Chain

Multiple commands can run in sequence as a chain. If one command in the chain fails, the rest do not run. A chain is built in Rust code. See Scheduling a Chain for an example.

Output

Commands can write colored text to the terminal. The available output methods are:

MethodColorNewline
linewhiteyes
info_linegreenyes
warning_lineyellowyes
error_lineredyes
textwhiteno
infogreenno
warningyellowno
errorredno

Write line breaks with newlines, which takes the number of newline characters to write.

Progress Bar

Commands can show a progress bar in the terminal:

  1. Call set_progress_max with the total number of steps.
  2. Call update_progress with the current step number.

View Commands

Run inengine with no arguments to see the list of commands:

inengine

View Help

Run a command with --help to see its options:

inengine echo --help
inengine queue publish --help