Skip to content

Webapp CLI

The IQRF Gateway Webapp manager is a command-line interface that can be used to manage the Webapp database and features from a command shell.

Synopsis

The basic syntax for using the CLI tool is as follows:

iqrf-gateway-webapp-manager <command> [options] [arguments]

Use iqrf-gateway-webapp-manager help <command> to display help message for specified command. Commands, their parameters and usage can be found below. Commands can either be used in interactive mode by not specifying options,or non-interactive mode if all options are specified or the --no-interaction option is used. Commands are split into several sections, options for each command group are at the end of the respective section.

General options

General options applicable to any command.

ShortLongDescription
-h--helpDisplays the CLI tool help message
-q--quietDo not output any message
-v--versionDisplay version of this application
--ansiForce ANSI output
--no-ansiDisable ANSI output
-n--no-interactionDo not ask any interactive questions
-v|vv|vvv--verboseIncreases verbosity of messages: v for normal output, vv for more verbose output and vvv for debug output

General commands

General commands for usage of the CLI tool.

help

Displays help message for a specific command with description, arguments and usage.

Usage:

iqrf-gateway-webapp-manager help <command>

list

Lists all available commands.

Usage:

iqrf-gateway-webapp-manager list

nette:cache:purge

Clears webapp cache.

Usage:

iqrf-gateway-webapp-manager nette:cache:purge

API key commands

Commands used to manage API keys stored in the webapp database.

api-key:list

Lists all existing API keys and their meta data.

Usage:

iqrf-gateway-webapp-manager api-key:list

api-key:add

Creates a new API key and stores it in the database.

Usage:

iqrf-gateway-webapp-manager api-key:add [-d|--description DESCRIPTION] [-e|--expiration EXPIRATION] [--no-formatting]

Note: To create API key with no expiration date, use the --no-interaction option and omit the -e|--expiration option. Alternatively, submit empty value in interactive mode.

api-key:edit

Edits an existing API key and stores changes in the database.

Usage:

iqrf-gateway-webapp-manager api-key:edit [-i|--id ID] [-d|--description DESCRIPTION] [-e|--expiration EXPIRATION]

api-key:delete

Removes an existing API key from the database.

Usage:

iqrf-gateway-webapp-manager api-key:delete [-i|--id ID]

Options

Options for API key commands.

ShortLongDescription
-i--idAPI key ID
-d--descriptionAPI key description
-e--expirationAPI key expiration
N/A--no-formattingOutputs API key without formatting

Database commands

Commands used to manage the webapp database.

database:create

Creates a new database for webapp.

Usage:

iqrf-gateway-webapp-manager database:create

migrations:migrate

Executes database migration to the latest version.

Usage:

iqrf-gateway-webapp-manager migrations:migrate

Feature commands

Commands used to manage webapp features.

feature:list

Lists all available webapp features.

Usage:

iqrf-gateway-webapp-manager feature:list

feature:enable

Enables a feature. Multiple features can be specified to be enabled at once.

Usage:

iqrf-gateway-webapp-manager feature:enable <feature_name>
iqrf-gateway-webapp-manager feature:enable <feature1_name> <feature2_name> ...

feature:disable

Disables a feature. Multiple features can be specified to be disabled at once.

Usage:

iqrf-gateway-webapp-manager feature:disable <feature_name>
iqrf-gateway-webapp-manager feature:disable <feature1_name> <feature2_name> ...

Mapping commands

Commands used to manage board pin mappings stored in webapp database.

mapping:list

Lists all existing mappings in database and their properties.

Usage:

iqrf-gateway-webapp-manager mapping:list

mapping:add

Creates a new board mapping and stores it in the database.

Usage:

iqrf-gateway-webapp-manager mapping:add [-t|--type TYPE] [-N|--name NAME] [-I|--interface INTERFACE] [-b|--bus-pin BUS_PIN] [-p|--pgm-pin PGM_PIN] [-P|--power-pin POWER_PIN] [-r|--baud-rate BAUD_RATE]

Note: Baud rate is an optional argument unless the mapping type is set to UART.

mapping:edit

Edits an existing board mapping and stores changes in the database.

Usage:

iqrf-gateway-webapp-manager mapping:add [-i|--id ID] [-t|--type TYPE] [-N|--name NAME] [-I|--interface INTERFACE] [-b|--bus-pin BUS_PIN] [-p|--pgm-pin PGM_PIN] [-P|--power-pin POWER_PIN] [-r|--baud-rate BAUD_RATE]

mapping:remove

Removes an existing board mapping from the database.

Usage:

iqrf-gateway-webapp-manager mapping:remove [-i|--id ID]

Mapping command options

Options for board mapping commands.

ShortLongDescription
-i--idMapping ID
-t--typeMapping type, available options: spi, uart
-N--nameMapping name
-I--interfaceMapping device name, example: /dev/ttyS0
-b--bus-pinMapping bus enable GPIO pin number
-p--pgm-pinMapping programming mode switch GPIO pin number
-P--power-pinMapping power enable GPIO pin number
-r--baud-rate(optional) Baud rate for mapping type UART, available options: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400

User commands

Commands used to manage user profiles stored in the webapp database.

user:list

Lists all existing user profiles.

Usage:

iqrf-gateway-webapp-manager user:list

user:add

Creates a new user profile and stores it in the database.

Usage:

iqrf-gateway-webapp-manager user:add [-u|--username USERNAME] [-p|--password PASSWORD] [-r|--role ROLE] [-l|--language LANGUAGE]

user:edit

Edits an existing user profile and stores changes in the database.

Usage:

iqrf-gateway-webapp-manager user:edit [-u|--username USERNAME] [-r|--role ROLE] [-l|--language LANGUAGE]

user:password

Changes password of an existing user profile and stores changes in the database.

Usage:

iqrf-gateway-webapp-manager user:password [-u|--username USERNAME] [-p|--password PASSWORD]

user:remove

Removes an existing user profile from the database.

Usage:

iqrf-gateway-webapp-manager user:remove [-u|--username USERNAME]

User command options

Options for user commands.

ShortLongDescription
-u--userUsername
-p--passwordUser's password
-r--roleUser's role, available options: normal, power
-l--languageUser's interface language, available options: en

WireGuard VPN commands

Commands used to manage WireGuard VPN tunnels stored in the webapp database.

wireguard:list

Lists all existing WireGuard VPN tunnels.

Usage:

iqrf-gateway-webapp-manager wireguard:list

wireguard:activate

Activates specified WireGuard VPN tunnel

Usage:

iqrf-gateway-webapp-manager wireguard:activate <tunnel_name>

wireguard:deactivate

Deactivates specified WireGuard VPN tunnel

Usage:

iqrf-gateway-webapp-manager wireguard:deactivate <tunnel_name>