Skip to content

CLI Reference

This page provides documentation for our command line tools.

⚙ Configuration

It is simple enough to pass the proper flags to eve-ng specify details for your EVE-NG host. However, you may also pass the connection details as environment variables. You can set the following evengsdk environment variables:

  • EVE_NG_HOST - EVE-NG host name or IP address
  • EVE_NG_USERNAME - EVE-NG username
  • EVE_NG_PASSWORD - EVE-NG API/GUI password
  • EVE_NG_PORT - EVE-NG API port. Default 80
  • EVE_NG_PROTOCOL - EVE-NG API protocol. Default http
  • EVE_NG_SSL_VERIFY - Verify SSL. Default False
  • EVE_NG_INSECURE - Suppress insecure warnings. Default False
  • EVE_NG_LAB_PATH - EVE-NG default lab path. Ex. /myLab.unl

You may set the variables and export them to your shell environment. You can also define your environment variables in a .env folder that will automatically be sourced. The example. below shows the contents of a .env file that will permit you to both source the file and automatically load the variables as needed.

export EVE_NG_HOST=192.168.2.100
export EVE_NG_USERNAME=admin
export EVE_NG_PASSWORD=eve
export EVE_NG_PORT=80
export EVE_NG_PROTOCOL=http
export EVE_NG_SSL_VERIFY=False
export EVE_NG_INSECURE=True
export EVE_NG_LAB_PATH='/mylab.unl'

⌨ Commands

eve-ng

CLI application to manage EVE-NG objects

Usage:

eve-ng [OPTIONS] COMMAND [ARGS]...

Options:

  --version             Show the version and exit.
  --host TEXT           [required]
  --username TEXT       [default: (current user); required]
  --password TEXT       [required]
  --port INTEGER        HTTP port to connect to. Default is 80
  --protocol TEXT       Protocol to use. Default is http
  --insecure TEXT       Disable SSL
  --verify BOOLEAN      Verify SSL certificate
  --debug / --no-debug  Enables or disables debug mode.
  -v, --verbose         Enables verbosity.
  --help                Show this message and exit.

eve-ng folder

folder sub commands

Manage EVE-NG folders

Usage:

eve-ng folder [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.

eve-ng folder list

List folders on EVE-NG host

Examples: eve-ng folder list

Usage:

eve-ng folder list [OPTIONS]

Options:

  --output [json|text|table]
  --help                      Show this message and exit.

eve-ng folder read

Get folder details EVE-NG host

Examples: eve-ng folder read /path/to/folder

Usage:

eve-ng folder read [OPTIONS] FOLDER

Options:

  --help  Show this message and exit.

eve-ng lab

lab sub commands

Manage EVE-NG labs

Usage:

eve-ng lab [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.

eve-ng lab create

Create a new lab

Examples: eve-ng lab create --name lab1 --author "John Doe" --description "My lab"

Usage:

eve-ng lab create [OPTIONS]

Options:

  --path TEXT         folder to create lab in
  --name TEXT         lab name  [required]
  --author TEXT       lab author
  --description TEXT  lab description
  --version TEXT      lab version
  --help              Show this message and exit.

eve-ng lab create-from-topology

Create a new lab

Examples: eveng lab create-from-topology --topology examples/test_topology.yml

Usage:

eve-ng lab create-from-topology [OPTIONS]

Options:

  -t, --topology PATH      Toplogy file to import  [required]
  -d, --template-dir PATH  Template directory
  --help                   Show this message and exit.

eve-ng lab delete

Delete a lab on EVE-NG host

Examples: eve-ng lab delete --path /lab1

Usage:

eve-ng lab delete [OPTIONS]

Options:

  --path TEXT  folder to create lab in
  --help       Show this message and exit.

eve-ng lab edit

Edit a lab on EVE-NG host. EVE-NG API supports updating a single field at a time.

Examples: eve-ng lab edit --author "Tafsir Thiam" eve-ng lab edit --body "Lab to demonstrate VXLAN/BGP-EVPN on vEOS"

Usage:

eve-ng lab edit [OPTIONS]

Options:

  --author TEXT       lab author NOTE: This argument is mutually exclusive
                      with  arguments: [version, description, body]. The API
                      supports editing a single field at a time.
  --description TEXT  lab description. NOTE: This argument is mutually
                      exclusive with  arguments: [version, author, body]. The
                      API supports editing a single field at a time.
  --version TEXT      lab version. NOTE: This argument is mutually exclusive
                      with  arguments: [author, description, body]. The API
                      supports editing a single field at a time.
  --body TEXT         long description for lab. NOTE: This argument is
                      mutually exclusive with  arguments: [version, author,
                      description]. The API supports editing a single field at
                      a time.
  --path TEXT
  --help              Show this message and exit.

eve-ng lab export

Export and download lab file as ZIP archive

Examples: eve-ng lab export

Usage:

eve-ng lab export [OPTIONS]

Options:

  --dest PATH  destination path
  --path TEXT
  --help       Show this message and exit.

eve-ng lab import

Import lab into EVE-NG from ZIP archive

Usage:

eve-ng lab import [OPTIONS]

Options:

  --src PATH     source path to ZIP lab file
  --folder TEXT  folder on EVE-NG to import lab to
  --help         Show this message and exit.

eve-ng lab list

List the available labs in EVE-NG host

Examples: eve-ng lab list

Usage:

eve-ng lab list [OPTIONS]

Options:

  --output [json|text|table]
  --help                      Show this message and exit.

eve-ng lab read

Get EVE-NG lab details

Examples: eve-ng lab read eve-ng lab read --path /folder/to/lab.unl

Usage:

eve-ng lab read [OPTIONS]

Options:

  --path TEXT
  --output [json|text]
  --help                Show this message and exit.

eve-ng lab set-active

Set current lab path

Usage:

eve-ng lab set-active [OPTIONS]

Options:

  --path TEXT  path to lab to activate
  --help       Show this message and exit.

eve-ng lab show-active

Show active lab

Examples: eve-ng lab show-active

Usage:

eve-ng lab show-active [OPTIONS]

Options:

  --help  Show this message and exit.

eve-ng lab start

Start all nodes in lab

Examples: eve-ng lab start eve-ng lab start --path /lab1

Usage:

eve-ng lab start [OPTIONS]

Options:

  --path TEXT
  --help       Show this message and exit.

eve-ng lab stop

Stop all nodes in lab

Examples: eve-ng lab stop eve-ng lab stop --path /lab1

Usage:

eve-ng lab stop [OPTIONS]

Options:

  --path TEXT
  --help       Show this message and exit.

eve-ng lab topology

Retrieve lab topology

Examples: eve-ng lab topology

Usage:

eve-ng lab topology [OPTIONS]

Options:

  --path TEXT
  --output [json|text|table]
  --help                      Show this message and exit.

eve-ng list-network-types

list EVE-NG network types

Examples: eveng list-network-types

Usage:

eve-ng list-network-types [OPTIONS]

Options:

  --output [json|text|table]
  --help                      Show this message and exit.

eve-ng list-node-templates

list EVE-NG node templates

Examples: eveng list-node-templates

Usage:

eve-ng list-node-templates [OPTIONS]

Options:

  --output [json|text|table]
  --help                      Show this message and exit.

eve-ng list-user-roles

list EVE-NG user roles

Examples: eveng list-user-roles

Usage:

eve-ng list-user-roles [OPTIONS]

Options:

  --output [json|text|table]
  --help                      Show this message and exit.

eve-ng node

node sub commands

Manage EVE-NG lab nodes

Usage:

eve-ng node [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.

eve-ng node config

Upload device configuration

Examples: eveng node config -n 1 # view startup config eveng node config -n 4 --config "hostname testing" # upload config from string eveng node -config -n 4 -src config.txt # load config from file

Usage:

eve-ng node config [OPTIONS]

Options:

  --path TEXT
  -n, --node-id TEXT  [required]
  -s, --src PATH      config file to upload
  -c, --config TEXT   config to upload
  --help              Show this message and exit.

eve-ng node create

Create lab node

Example: eve-ng node create --name leaf05 --template veos --image veos-4.22.0F

Usage:

eve-ng node create [OPTIONS]

Options:

  --name TEXT                     node name
  --node-type [iol|qemu|dynamips]
  --template TEXT                 node template to create node from
                                  [required]
  --image TEXT                    image to boot node with
  --ethernet INTEGER              number of ethernet interfaces.
  --serial INTEGER                number of serial interfaces.
  --console-type [telnet|vnc]     number of serial interfaces.
  --ram INTEGER                   RAM for node
  --cpu INTEGER                   CPU count for node
  --path TEXT
  --help                          Show this message and exit.

eve-ng node delete

Delete lab node with specified id

Example: eve-ng node delete -n 4 # delete node with id 4

Usage:

eve-ng node delete [OPTIONS]

Options:

  --path TEXT
  -n, --node-id TEXT  [required]
  --help              Show this message and exit.

eve-ng node export

Create export node configuration (save)

Example: eve-ng node export -n 4 # export node with id 4 eve-ng node export # export all nodes

Usage:

eve-ng node export [OPTIONS]

Options:

  --path TEXT
  -n, --node-id TEXT
  --help              Show this message and exit.

eve-ng node list

list lab nodes

Example: eve-ng node list # list all nodes

Usage:

eve-ng node list [OPTIONS]

Options:

  --output [json|text|table]
  --path TEXT
  --help                      Show this message and exit.

eve-ng node read

Retrieve lab node details

Example: eve-ng node read -n 4 # read node with id 4

Usage:

eve-ng node read [OPTIONS]

Options:

  --path TEXT
  -n, --node-id TEXT    [required]
  --output [json|text]
  --help                Show this message and exit.

eve-ng node start

start node in lab

Example: eve-ng node start -n 4

Usage:

eve-ng node start [OPTIONS]

Options:

  --path TEXT
  -n, --node-id TEXT  [required]
  --help              Show this message and exit.

eve-ng node stop

stop node in lab

Example: eve-ng node stop -n 1

Usage:

eve-ng node stop [OPTIONS]

Options:

  --path TEXT
  -n, --node-id TEXT  [required]
  --help              Show this message and exit.

eve-ng node wipe

Create lab node

Example: eve-ng node wipe -n 4 # wipe node with id 4 eve-ng node wipe # wipe all nodes

Usage:

eve-ng node wipe [OPTIONS]

Options:

  --path TEXT
  -n, --node-id TEXT
  --help              Show this message and exit.

eve-ng show-status

View EVE-NG server status

Examples: eveng show-status

Usage:

eve-ng show-status [OPTIONS]

Options:

  --output [json|text|table]
  --help                      Show this message and exit.

eve-ng show-template

get EVE-NG node template details

Examples: eveng show-template veos

Usage:

eve-ng show-template [OPTIONS] TEMPLATE_NAME

Options:

  --help  Show this message and exit.

eve-ng user

user sub commands

Manage EVE-NG users

Usage:

eve-ng user [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.

eve-ng user create

Create EVE-NG user

Examples: eve-ng user create -u user1 -p password1 -e -1 --role user --name "John Doe"

Usage:

eve-ng user create [OPTIONS]

Options:

  -n, --name TEXT           User's name
  -u, --username TEXT       login username  [required]
  -p, --password TEXT       login password
  -e, --expiration INTEGER  expiration date for accout (UNIX timestamp). -1
                            means never expire. default is -1.
  -r, --role TEXT           user role
  --email TEXT              user email
  --help                    Show this message and exit.

eve-ng user delete

Delete EVE-NG user

Usage:

eve-ng user delete [OPTIONS]

Options:

  -u, --username TEXT  User's name  [required]
  --help               Show this message and exit.

eve-ng user edit

Update EVE-NG user eve-ng user edit -u user1 --name "Jane Doe"

Usage:

eve-ng user edit [OPTIONS]

Options:

  -n, --name TEXT           User's name
  -u, --username TEXT       login username  [required]
  -p, --password TEXT       login password
  -e, --expiration INTEGER  expiration date for accout (UNIX timestamp). -1
                            means never expire. default is -1.
  -r, --role TEXT           user role
  --email TEXT              user email
  --help                    Show this message and exit.

eve-ng user list

list EVE-NG users

Examples: eve-ng user list

Usage:

eve-ng user list [OPTIONS]

Options:

  --output [json|text|table]
  --help                      Show this message and exit.

eve-ng user read

Retrieve EVE-NG user details

Usage:

eve-ng user read [OPTIONS]

Options:

  -u, --username TEXT  user ID to get details for  [required]
  --help               Show this message and exit.
Back to top