The Interactive Shell

The Interactive Shell

The algo shell is a tabbed terminal interface that provides an interactive environment for running commands.

Starting the shell

algo         # Launch the shell
algo shell   # Explicit command

Tab management

Each command runs in its own tab, allowing concurrent execution and monitoring. Use keyboard shortcuts or mouse clicks to switch between tabs.

Command entry

Commands are entered without the algo prefix:

algo> run --strategy kbt --symbols @ES --output-mode summary
algo> strategies -l
algo> symbols -t future -c energy

Tab completion

The shell provides intelligent completion for:

  • Command names
  • Strategy names
  • Symbol names (including portfolio references)
  • Flag names

Press Tab to complete, or Tab twice to see all options.

History

  • Up/Down arrows: Navigate command history
  • Ctrl+R: Reverse search through history
  • history: Display full command history

Shell operators

The shell supports standard Unix-like operators:

OperatorDescriptionExample
``Pipe output
>Redirect to filesymbols -l > syms.txt
>>Append to filesymbols -l >> syms.txt
&&Chain on successrun ... && portfolio ...
``

Parallel execution

Run multiple commands simultaneously from the shell:

algo> parallel 4 run --strategy kbt --symbols @ES,@NQ,@GC,@CL

Job management

CommandDescription
jobsList running jobs
kill <id>Terminate a running job
batch <file>Run a config file (supports wildcards, e.g., batch configs/*.json)
clearClear the screen

Non-interactive mode

Pipe commands to run without the TUI:

echo "run --strategy kbt --symbols @ES" | algo
algo < commands.txt

System shell escape

Prefix commands with \ to execute them in the system shell:

algo> \ls -la
algo> \pwd