Managing CLI plug-ins

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

Installing a CLI plug-in

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

  1. Open an SSH session.
  2. Place the completed plug-in file into one of the following directories:
    • /etc/opt/srlinux/cli/plugins

    • $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 using SSH as the admin user.

Modifying a CLI plug-in

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

  1. Open an SSH session.
  2. Modify the CLI plug-in and place the updated file into one of the following directories:
    • /etc/opt/srlinux/cli/plugins

    • $HOME/cli/plugins

  3. Restart the SR Linux CLI by closing the current SSH session and reconnecting using SSH as the admin user.

Remove a CLI plug-in

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

  1. Open an SSH session.
  2. Delete the CLI plug-in file from its current directory (one of the following):
    • /etc/opt/srlinux/cli/plugins

    • $HOME/cli/plugins

  3. Restart the SR Linux CLI by closing the current SSH session and reconnecting using SSH as the admin user.