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 COMMANDrunning command...$ tru (-v|--version|version)@tru_id/cli/0.9.2 linux-x64 node-v14.5.0$ tru --help [COMMAND]USAGE$ tru COMMAND...
Commands
tru coverage:country CODE
tru coverage:reach DEVICE-IP
tru help [COMMAND]
tru oauth2:token
tru phonechecks:create [PHONE_NUMBER]
tru phonechecks:list [CHECK_ID]
tru phonechecks:traces CHECK_ID
tru plugins
tru plugins:install PLUGIN...
tru plugins:link PLUGIN
tru plugins:uninstall PLUGIN...
tru plugins:update
tru projects:create [NAME]
tru projects:list [PROJECT_ID]
tru projects:update [PROJECT-ID]
tru setup:credentials CLIENT-ID CLIENT-SECRET DATA-RESIDENCY
tru simchecks:create [PHONE_NUMBER]
tru simchecks:list [CHECK_ID]
tru simchecks:traces CHECK_ID
tru subscriberchecks:create [PHONE_NUMBER]
tru subscriberchecks:list [CHECK_ID]
tru subscriberchecks:traces CHECK_ID
tru usage:daily
tru usage:hourly
tru usage:monthly
tru workspaces
tru coverage:country CODE
Retrieve country based coverage and prices
USAGE$ tru coverage:country CODEARGUMENTSCODE two letter code ISO 3166-1 alpha-2 or country dialing codeOPTIONS-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-IPARGUMENTSDEVICE-IP The device ip in ipv4 or ipv6 formatOPTIONS-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]ARGUMENTSCOMMAND command to show help forOPTIONS--all see all commands in CLI
tru oauth2:token
Creates an OAuth2 token
USAGE$ tru oauth2:tokenOPTIONS-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 fileEXAMPLES# 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 $TOKENEmesua0F7gj3qOaav7UaKaBwefaaefaAxlrdGom_mb3U.78Od2d9XpvTQbd44eM1Uf7nzz9e9nezs5TRjPmpDnMc
tru phonechecks:create [PHONE_NUMBER]
Creates a PhoneCheck within a project
USAGE$ tru phonechecks:create [PHONE_NUMBER]ARGUMENTSPHONE_NUMBER The phone number to perform the Check onOPTIONS-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]ARGUMENTSCHECK_ID The check_id for the PhoneCheck to listOPTIONS-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 phonechecks:traces CHECK_ID
Get the traces of a PhoneCheck
USAGE$ tru phonechecks:traces CHECK_IDARGUMENTSCHECK_ID The check_id for which we want to get the tracesOPTIONS-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)--trace-id=trace-id The trace-id for which we want to get the logs
tru plugins
list installed plugins
USAGE$ tru pluginsOPTIONS--core show core pluginsEXAMPLE$ tru plugins
tru plugins:install PLUGIN...
installs a plugin into the CLI
USAGE$ tru plugins:install PLUGIN...ARGUMENTSPLUGIN plugin to installOPTIONS-f, --force yarn install with force flag-h, --help show CLI help-v, --verboseDESCRIPTIONCan be installed from npm or a git url.Installation of a user-installed plugin will override a core plugin.e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' commandwill override the core plugin implementation. This is useful if a user needs to update core plugin functionality inthe CLI without the need to patch and update the whole CLI.ALIASES$ tru plugins:addEXAMPLES$ tru plugins:install myplugin$ tru plugins:install https://github.com/someuser/someplugin$ tru plugins:install someuser/someplugin
tru plugins:link PLUGIN
links a plugin into the CLI for development
USAGE$ tru plugins:link PLUGINARGUMENTSPATH [default: .] path to pluginOPTIONS-h, --help show CLI help-v, --verboseDESCRIPTIONInstallation of a linked plugin will override a user-installed or core plugin.e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'command will override the user-installed or core plugin implementation. This is useful for development work.EXAMPLE$ tru plugins:link myplugin
tru plugins:uninstall PLUGIN...
removes a plugin from the CLI
USAGE$ tru plugins:uninstall PLUGIN...ARGUMENTSPLUGIN plugin to uninstallOPTIONS-h, --help show CLI help-v, --verboseALIASES$ tru plugins:unlink$ tru plugins:remove
tru plugins:update
update installed plugins
USAGE$ tru plugins:updateOPTIONS-h, --help show CLI help-v, --verbose
tru projects:create [NAME]
Creates a new Project
USAGE$ tru projects:create [NAME]ARGUMENTSNAME the name of the project to createOPTIONS-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:createWhat is the name of the project?: My first projectCreating 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]ARGUMENTSPROJECT_ID The project_id for the Project to retrieveOPTIONS-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]ARGUMENTSPROJECT-ID the ID of the project to updateOPTIONS-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 ProjectEXAMPLES$ 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-RESIDENCYARGUMENTSCLIENT-ID the workspace credentials idCLIENT-SECRET the workspace credentials secretDATA-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]ARGUMENTSPHONE_NUMBER The phone number to perform the SIMCheck onOPTIONS-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]ARGUMENTSCHECK_ID The check_id for the SIMCheck to listOPTIONS-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 simchecks:traces CHECK_ID
Get the traces of a SIMCheck
USAGE$ tru simchecks:traces CHECK_IDARGUMENTSCHECK_ID The check_id for which we want to get the tracesOPTIONS-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)--trace-id=trace-id The trace-id for which we want to get the logs
tru subscriberchecks:create [PHONE_NUMBER]
Creates SubscriberChecks within a project
USAGE$ tru subscriberchecks:create [PHONE_NUMBER]ARGUMENTSPHONE_NUMBER The phone number to perform the Check onOPTIONS-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]ARGUMENTSCHECK_ID The check_id for the SubscriberCheck to listOPTIONS-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:traces CHECK_ID
Get the traces of a SubscriberCheck
USAGE$ tru subscriberchecks:traces CHECK_IDARGUMENTSCHECK_ID The check_id for which we want to get the tracesOPTIONS-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)--trace-id=trace-id The trace-id for which we want to get the logs
tru usage:daily
Get Daily Usage. The date range defaults to current date.
USAGE$ tru usage:dailyOPTIONS-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--group-by=group-by Group results by one or more fields e.g product_id or project_id or product_id,project_id--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.--page_size=page_size [default: 10] The page size to return in list resource request.--search=search The RSQL query for usage. date is required e.g --search='date>=2021-03-29'--sort=sort property to sort by (prepend '-' for descending)
tru usage:hourly
Get Hourly Usage. The date range defaults to current date.
USAGE$ tru usage:hourlyOPTIONS-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--group-by=group-by Group results by one or more fields e.g product_id or project_id or product_id,project_id--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.--page_size=page_size [default: 10] The page size to return in list resource request.--search=search The RSQL query for usage. date is required e.g --search='date>=2021-03-29'--sort=sort property to sort by (prepend '-' for descending)
tru usage:monthly
Get Monthly Usage. The date range defaults to the current calendar month.
USAGE$ tru usage:monthlyOPTIONS-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--group-by=group-by Group results by one or more fields e.g product_id or project_id or product_id,project_id--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.--page_size=page_size [default: 10] The page size to return in list resource request.--search=search The RSQL query for usage. date is required e.g --search='date>=2021-03-29'--sort=sort property to sort by (prepend '-' for descending)
tru workspaces
Displays default workspace information
USAGE$ tru workspacesOPTIONS-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