tru.ID logo

Command Line Interface (CLI) Reference

Docs
Reference

Command Line Interface (CLI) Reference

Install

$ npm install -g @tru_id/cli

Usage

Every run of the CLI will check to see if all required configuration is in place.

$ npm install -g @tru_id/cli
$ tru COMMAND
running command...
$ tru (-v|--version|version)
@tru_id/cli/0.5.0 linux-x64 node-v15.4.0
$ tru --help [COMMAND]
USAGE
$ tru COMMAND
...

Commands

tru coverage:country CODE

Retrieve country based coverage and prices

USAGE
$ tru coverage:country CODE
ARGUMENTS
CODE two letter code ISO 3166-1 alpha-2 or country dialing code
OPTIONS
-h, --help show CLI help
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--debug Enables debug logging for the CLI
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--project-dir=project-dir The directory that contains the tru.json Project configuration file
--sort=sort property to sort by (prepend '-' for descending)

tru coverage:reach DEVICE-IP

Find if a certain device ip is reachable

USAGE
$ tru coverage:reach DEVICE-IP
ARGUMENTS
DEVICE-IP The device ip in ipv4 or ipv6 format
OPTIONS
-h, --help show CLI help
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--debug Enables debug logging for the CLI
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--project-dir=project-dir The directory that contains the tru.json Project configuration file
--sort=sort property to sort by (prepend '-' for descending)

tru help [COMMAND]

display help for tru

USAGE
$ tru help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI

tru oauth2:token

Creates an OAuth2 token

USAGE
$ tru oauth2:token
OPTIONS
-h, --help show CLI help
-x, --extended show extra columns
--debug Enables debug logging for the CLI
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--project-dir=project-dir The directory that contains the tru.json Project configuration file
EXAMPLES
# use workspace credentials to create token
$ tru oauth2:token
# use project credentials to create token
$ tru oauth2:token --project-dir path/to/project
# assign a token to a variable in shell
$ TOKEN=$(tru oauth2:token --project-dir path/to/project --no-header)
$ echo $TOKEN
Emesua0F7gj3qOaav7UaKaBwefaaefaAxlrdGom_mb3U.78Od2d9XpvTQbd44eM1Uf7nzz9e9nezs5TRjPmpDnMc

tru phonechecks:create [PHONE_NUMBER]

Creates a PhoneCheck within a project

USAGE
$ tru phonechecks:create [PHONE_NUMBER]
ARGUMENTS
PHONE_NUMBER The phone number to perform the Check on
OPTIONS
-h, --help show CLI help
--debug Enables debug logging for the CLI
--project-dir=project-dir The directory that contains the tru.json Project configuration file
--skip-qrcode-handler Skips using the tru hosted QR code handler with the `check_url`
--workflow Execute the Check Workflow from the CLI

tru phonechecks:list [CHECK_ID]

Lists details for all PhoneChecks or a specific PhoneCheck if the a check-id argument is passed

USAGE
$ tru phonechecks:list [CHECK_ID]
ARGUMENTS
CHECK_ID The check_id for the PhoneCheck to list
OPTIONS
-h, --help show CLI help
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--debug Enables debug logging for the CLI
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--page_number=page_number [default: 1] The page number to return in the list resource. Ignored if the "check_id"
argument is used.
--page_size=page_size [default: 10] The page size to return in list resource request. Ignored if the "check_id"
argument is used.
--project-dir=project-dir The directory that contains the tru.json Project configuration file
--search=search A RSQL search query. To ensure correct parsing put your query in quotes. For example
"--search 'status==COMPLETED'". Ignored if the "check_id" argument is used.
--sort=sort Sort query in the form "{parameter_name},{direction}". For example, "created_at,asc" or
"created_at,desc". Ignored if the "check_id" argument is used.

tru projects:create [NAME]

Creates a new Project

USAGE
$ tru projects:create [NAME]
ARGUMENTS
NAME the name of the project to create
OPTIONS
-h, --help show CLI help
--debug Enables debug logging for the CLI
--mode=live|sandbox Set the project mode to "live" or "sandbox"
--phonecheck-callback=phonecheck-callback set a callback to be invoked when a PhoneCheck reaches an end state
--project-dir=project-dir The directory that contains the tru.json Project configuration file
--quickstart Create a Project and also create a PhoneCheck in workflow mode.
EXAMPLES
$ tru projects:create
What is the name of the project?: My first project
Creating Project "My first project"
$ tru projects:create --phonecheck-callback https://example.com/callback
$ tru projects:create --mode sandbox
$ tru projects:create --mode live

tru projects:list [PROJECT_ID]

Lists details for all Projects or a Projects that match a given criteria

USAGE
$ tru projects:list [PROJECT_ID]
ARGUMENTS
PROJECT_ID The project_id for the Project to retrieve
OPTIONS
-h, --help show CLI help
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--debug Enables debug logging for the CLI
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--page_number=page_number [default: 1] The page number to return in the list resource. Ignored if the "project_id"
argument is used.
--page_size=page_size [default: 10] The page size to return in list resource request. Ignored if the "project_id"
argument is used.
--search=search A RSQL search query. To ensure correct parsing put your query in quotes. For example
"--search 'name=p*'". Ignored if the "check_id" argument is used.
--sort=sort Sort query in the form "{parameter_name},{direction}". For example, "created_at,asc" or
"created_at,desc". Ignored if the "check_id" argument is used.

tru projects:update [PROJECT-ID]

Update an existing Project

USAGE
$ tru projects:update [PROJECT-ID]
ARGUMENTS
PROJECT-ID the ID of the project to update
OPTIONS
-h, --help show CLI help
--debug Enables debug logging for the CLI
--mode=live|sandbox Set the project mode to "live" or "sandbox"
--phonecheck-callback=phonecheck-callback set a callback to be invoked when a PhoneCheck reaches an end state
--project-dir=project-dir The directory that contains the tru.json Project configuration file
--remove-phonecheck-callback remove the PhoneCheck callback configuration from the Project
EXAMPLES
$ tru projects:update --phonecheck-callback https://example.com/callback
$ tru projects:update --remove-phonecheck-callback
$ tru projects:update --mode sandbox
$ tru projects:update --mode live

tru setup:credentials CLIENT-ID CLIENT-SECRET DATA-RESIDENCY

Setup the CLI with workspace credentials

USAGE
$ tru setup:credentials CLIENT-ID CLIENT-SECRET DATA-RESIDENCY
ARGUMENTS
CLIENT-ID the workspace credentials id
CLIENT-SECRET the workspace credentials secret
DATA-RESIDENCY the data residency of this workspace e.g. EU

tru simchecks:create [PHONE_NUMBER]

Create SIMChecks within a Project

USAGE
$ tru simchecks:create [PHONE_NUMBER]
ARGUMENTS
PHONE_NUMBER The phone number to perform the SIMCheck on
OPTIONS
-h, --help show CLI help
--debug Enables debug logging for the CLI
--project-dir=project-dir The directory that contains the tru.json Project configuration file

tru simchecks:list [CHECK_ID]

Lists details for all SIMChecks or a specific SIMCheck if the a check-id argument is passed

USAGE
$ tru simchecks:list [CHECK_ID]
ARGUMENTS
CHECK_ID The check_id for the SIMCheck to list
OPTIONS
-h, --help show CLI help
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--debug Enables debug logging for the CLI
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--page_number=page_number [default: 1] The page number to return in the list resource. Ignored if the "check_id"
argument is used.
--page_size=page_size [default: 10] The page size to return in list resource request. Ignored if the "check_id"
argument is used.
--project-dir=project-dir The directory that contains the tru.json Project configuration file
--search=search A RSQL search query. To ensure correct parsing put your query in quotes. For example
"--search 'status==COMPLETED'". Ignored if the "check_id" argument is used.
--sort=sort Sort query in the form "{parameter_name},{direction}". For example, "created_at,asc" or
"created_at,desc". Ignored if the "check_id" argument is used.

tru subscriberchecks:create [PHONE_NUMBER]

Creates SubscriberChecks within a project

USAGE
$ tru subscriberchecks:create [PHONE_NUMBER]
ARGUMENTS
PHONE_NUMBER The phone number to perform the Check on
OPTIONS
-h, --help show CLI help
--debug Enables debug logging for the CLI
--project-dir=project-dir The directory that contains the tru.json Project configuration file
--skip-qrcode-handler Skips using the tru hosted QR code handler with the `check_url`
--workflow Execute the Check Workflow from the CLI

tru subscriberchecks:list [CHECK_ID]

Lists details for all SubscriberChecks or a specific SubscriberCheck if the a check-id argument is passed

USAGE
$ tru subscriberchecks:list [CHECK_ID]
ARGUMENTS
CHECK_ID The check_id for the SubscriberCheck to list
OPTIONS
-h, --help show CLI help
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--debug Enables debug logging for the CLI
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--page_number=page_number [default: 1] The page number to return in the list resource. Ignored if the "check_id"
argument is used.
--page_size=page_size [default: 10] The page size to return in list resource request. Ignored if the "check_id"
argument is used.
--project-dir=project-dir The directory that contains the tru.json Project configuration file
--search=search A RSQL search query. To ensure correct parsing put your query in quotes. For example
"--search 'status==COMPLETED'". Ignored if the "check_id" argument is used.
--sort=sort Sort query in the form "{parameter_name},{direction}". For example, "created_at,asc" or
"created_at,desc". Ignored if the "check_id" argument is used.

tru workspaces

Displays default workspace information

USAGE
$ tru workspaces
OPTIONS
-h, --help show CLI help
--debug Enables debug logging for the CLI
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
tru.ID logo

Mobile authentication, reimagined.

Made with ❤️ across the 🌍

Platform

Docs

© 2021 4Auth Limited. All rights reserved. tru.ID is the trading name of 4Auth Limited.