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:

bash
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 help message for the given command
--silentDo not output any message
-q--quietOnly errors are displayed, all other output is suppressed
-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

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 [--format FORMAT] [--raw] <command>

list ​

Lists all available commands, optionally only commands in the specified namespace (e.g. user).

Usage:

iqrf-gateway-webapp-manager list [--format FORMAT] [--raw] [--short] [<namespace>]

completion ​

Dumps the shell completion script. Supported shells are bash, fish and zsh. If the shell is not specified, the value of the $SHELL environment variable is used.

Usage:

iqrf-gateway-webapp-manager completion [--debug] [<shell>]

To enable bash completion, dump the script to a global completion file and restart your shell:

iqrf-gateway-webapp-manager completion bash | sudo tee /etc/bash_completion.d/iqrf-gateway-webapp-manager

nette:cache:purge ​

Clears webapp cache.

Usage:

iqrf-gateway-webapp-manager nette:cache:purge [--recreate]

nette:latte:purge ​

Clears cache of compiled Latte templates.

Usage:

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

nette:latte:warmup ​

Compiles Latte templates into cache.

Usage:

iqrf-gateway-webapp-manager nette:latte:warmup

open-api:specification ​

Prints OpenAPI specification of the webapp REST API.

Usage:

iqrf-gateway-webapp-manager open-api:specification

General command options ​

Options for general commands.

ShortLongCommandDescription
N/A--formathelp, listOutput format, available options: txt, xml, json, md
N/A--rawhelp, listOutputs raw command help or command list
N/A--shortlistSkips describing commands' arguments
N/A--debugcompletionTails the completion debug log
N/A--recreatenette:cache:purgeRecreates cache folders

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]

API key command 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.

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> ...

IQRF OS patch commands ​

Commands used to manage IQRF OS patches stored in the webapp database.

iqrf-os:list-patches ​

Lists all IQRF OS patches stored in the database.

Usage:

iqrf-gateway-webapp-manager iqrf-os:list-patches

iqrf-os:import-patches ​

Imports IQRF OS patches distributed with the webapp into the database.

Usage:

iqrf-gateway-webapp-manager iqrf-os:import-patches

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] [-d|--device-type DEVICE_TYPE] [-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:edit [-i|--mapping-id ID] [-t|--type TYPE] [-N|--name NAME] [-d|--device-type DEVICE_TYPE] [-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|--mapping-id ID]

Mapping command options ​

Options for board mapping commands.

ShortLongDescription
-i--mapping-idMapping ID
-t--typeMapping type, available options: spi, uart
-N--nameMapping name
-d--device-typeMapping device type, available options: adapter, board
-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 [-J|--output-json]

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:remove-all ​

Removes all user profiles from the database, optionally only users with the specified role.

Usage:

iqrf-gateway-webapp-manager user:remove-all [-r|--role ROLE]

User command options ​

Options for user commands.

ShortLongDescription
-u--usernameUsername
-p--passwordUser's password
-r--roleUser's role, available options: admin, normal, basic
-l--languageUser's interface language, available options: en, cs
-J--output-jsonOutputs the user list as JSON

WebSocket proxy commands ​

websocket:proxy:run ​

Starts the WebSocket proxy.

Usage:

iqrf-gateway-webapp-manager websocket:proxy:run

WireGuard VPN commands ​

WARNING

WireGuard VPN commands are available only in IQRF Gateway Webapp versions before 2.7.0.

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>