Skip to main content
Launch an interactive terminal with tab completion, command history, and auto-suggestions for running Lager CLI commands.

Syntax

lager terminal
The terminal also launches automatically when you run lager with no subcommand.

Features

FeatureDescription
Tab completionAuto-complete commands, subcommands, and flags
Command historyPersistent history stored in ~/.lager_terminal_history
Auto-suggestHistory-based suggestions as you type
Arrow key navigationBrowse previous commands with up/down arrows
Color-coded outputGreen for success, red for errors
Execution timingShows duration for each command

Built-in Commands

These commands are available inside the REPL in addition to all lager commands:
CommandDescription
help, ?Show available commands and help
clearClear the screen
exit, quitExit the terminal

Keyboard Shortcuts

ShortcutAction
TabAuto-complete current input
Up / DownNavigate command history
Ctrl+RSearch command history
Ctrl+CCancel current input
Ctrl+DExit terminal

Usage

All Lager commands are available inside the terminal without the lager prefix:
# Launch the terminal
lager terminal

# Inside the REPL:
> hello --box my-box
> supply voltage 3.3 --yes
> adc read VCC
> status --box my-box
> debug flash --hexfile firmware.hex
> ?
> exit
The terminal automatically prepends lager to each command and executes it through the CLI, so authentication, box resolution, and all standard behavior works as expected.

Blocked Commands

Interactive commands that require their own terminal session are blocked inside the REPL:
  • Commands with tui subcommands (e.g., supply tui, battery tui)
  • Interactive UART sessions
The terminal warns you and suggests running these from a regular shell instead.

Dependencies

The terminal requires prompt_toolkit and rich. If these are not installed, the CLI falls back to showing normal help output:
pip install prompt_toolkit rich

Notes

  • Running lager with no arguments launches the terminal automatically
  • Command history persists across sessions in ~/.lager_terminal_history
  • Exit codes from each command are shown with a check mark or X indicator
  • The welcome screen adapts to your terminal width