About the CLI commands
The Command Line Interface (CLI) commands for administering the gateway are organized into three categories:
- CLI session: these commands are for applying settings for an interactive user session.
- CLI operational mode: these commands apply primarily when the CLI is in operational mode.
- CLI configuration mode: these commands apply only when the CLI is in configuration mode.
CLI session commands
The CLI session commands are a group of settings that apply to the interactive CLI sessions. You can configure settings such as idle timeout for the CLI session, and the settings are persisted across sessions. When a user logs out, the settings that were configured expire with the termination of the CLI session.
To see a list of available settings for session commands, enter show cli.
> show cli
history : 100
idle-timeout : 1200
paginate : true
path : /
Note: The gateway handles two types of sessions.
- Admin sessions: for users who administer the gateway.
- Client sessions: for apps on a mobile device, used when they log in to obtain access from the gateway.
This section only describes admin sessions.
CLI operational mode commands
These are the available top-level commands when the CLI is in operational mode.
Operation mode command | Purpose |
---|---|
clone | Make a copy of a named datastore |
command | Execute a custom command |
configure | Enter configuration mode |
exit | Exit the CLI session (same as quit) |
file | Perform file operations |
help | Display help information |
history | Display CLI command history |
log | Show or clear system log |
network | Perform network operations |
path | Set relative path for operational status |
quit | Exit the CLI session (same as exit) |
remove | Remove a named datastore |
request | Make a device-level request |
set | Set the value for a CLI property |
show | Show information about the device |
source | Execute commands from a file |
top | Navigate/reset configuration path to the top level of navigation tree |
up | Navigate/reset configuration path up one level |
CLI configuration mode commands
These are the available top-level commands when the CLI is in configuration mode.
Configuration mode command | Purpose |
---|---|
commit | Commit current configuration and modifications to the datastore |
compare | Compare the current configuration to the configuration data in the gateway's datastore |
context | Change to a different multi-tenant configuration context |
delete | Remove a data element |
edit | Edit a data element |
exit | Leave configuration mode |
help | Display help information |
insert | Insert a new data element |
load | Load data for a configuration from a file into the current configuration |
quit | Leave configuration mode |
rename | Rename a data element |
revert | Revert current configuration back to start of the transaction |
rollback | Go back to a previously committed configuration setting |
run | Run operational commands while in configuration mode |
save | Save the current configuration to a file |
set | Set the value for a data element. (Use commit to make a change persistent.) |
show | Display the current configuration |
top | Navigate to the top level of navigation tree |
up | Set configuration path up one level |
validate | Validate changes to the current configuration |
Note: The operational commands can also run in configuration mode if you prefix the operational command with the word “run”. In other words, these commands are identical:
> show status
% run show status
For more details about the elements for the CLI, see the specific command-line examples for the function you want to perform.