3. Managing CLI plug-ins

This chapter contains procedures for installing, modifying, and removing a CLI plug-in on the SR Linux.

3.1. Install a CLI plug-in

To install a CLI plug-in, perform the following steps:

  1. Open an SSH session.
  2. Place the completed plug-in file into one of the following directories:
    1. /etc/opt/srlinux/cli/plugins
    2. $HOME/cli/plugins
    The /etc/opt/srlinux/cli/plugins directory is the global plug-ins directory.
    With the $HOME/cli/plugins directory, $HOME is resolved to the users home directory. For example: /home/<user_name>/cli/plugins.
    Plug-ins are read from the global directory first ( /etc/opt/srlinux/cli/plugins ), then the per-user home directory with the user directory overriding any previously defined global plug-ins.
  3. To test the new plug-in, restart the SR Linux CLI by closing the current SSH session and reconnecting via SSH as the admin user.

3.2. Modify a CLI plug-in

To modify an existing CLI plug-in, perform the following steps:

  1. Open an SSH session.
  2. Modify and place the CLI plug-in file into one of the following directories:
    1. /etc/opt/srlinux/cli/plugins
    2. $HOME/cli/plugins
  3. Restart the SR Linux CLI by closing the current SSH session and reconnecting via SSH as the admin user.

3.3. Remove a CLI plug-in

To remove an existing plug-in from the SR Linux CLI, perform the following steps:

  1. Open an SSH session.
  2. Delete the CLI plug-in file from its current directory (one of the following):
    1. /etc/opt/srlinux/cli/plugins
    2. $HOME/cli/plugins
  3. Restart the SR Linux CLI by closing the current SSH session and reconnecting via SSH as the admin user.