The CLI is used to configure the device and monitor its state. The CLI exposes two main modes:

  • The operational mode (prompt is hostname>), where the user can query the state, show the configuration, send commands, etc…
  • The edition mode (prompt ends with #), where the user can additionally modify the configuration of the device. This mode is divided into several service contexts, each of them representing a part of the configuration.

At any level in the CLI, if you type a question mark (?), a list of available commands and a short help is displayed.

The CLI connects to the device using the NETCONF protocol. The contexts commands are generated from YANG files, which also describes the NETCONF API of the device.

Here is a summary of available commands from the CLI prompt:

? Display contextual help.
help [<command>] Display the commands list or the help of a command.
TAB Complete or display options from current line.
.. Move one level up to parent context.
save file <name> Save staging configuration to a file.
load file <name> Load a file into the staging configuration.
commit Commit pending changes in the running.
show state [<path>] Fetch the state of the device.
show config [<confname>] [<path>] Show the configuration (staging configuration by default in edition mode, or running configuration in operational mode).
exit or CTRL-D Exit from edition mode, or exit the CLI when in operational mode.
UP, DOWN Browse the command history.

The CLI stores the history of typed commands in a circular memory. Typed commands can be recalled with the UP/DOWN keys and may be modified with LEFT/RIGHT/INS/DEL keys.