Command Line Interface (CLI)

KintoHub provides a command line interface (CLI) which can be used to debug and interact with your services.

The CLI is currently an open source ALPHA utility that we are working on. Contributions are welcomed at kintoproj/kinto-cli

Installation#

You can install kinto-cli with the following command within your terminal:
curl -L https://raw.githubusercontent.com/kintoproj/kinto-cli/main/install.sh | bash

Upgrade#

To upgrade the CLI to the latest version, re-run the commands in the installation step.

Commands#

Init#

kinto init {coreHost}

Switches the coreHost of KintoHub instance for future CLI commands.

Reset#

kinto init reset

Will reset your CLI coreHost and set it to null

Environment#

  • Fetch Environments:#

    kinto env

    Lists all environments on the current cluster

    โžœ nodejs git:(master) kinto-env
    SUCCESS: Available environments:
    +--------------------------+--------------------------+
    | ENV ID | NAME |
    +--------------------------+--------------------------+
    | 600adbfe463f2bc6d33be6d3 | staging |
    +--------------------------+--------------------------+
    | 600f12ceb32a91c8d7b3f72d | dev |
    +--------------------------+--------------------------+
    | 60137e1851b6d4295d39d422 | production |
    +--------------------------+--------------------------+
  • Port-Forward environment:#

    kinto env access [environment-id]

    Allows you to port-forward all remote services inside a particular environment to your local machine. You will be prompted to choose an environment if the optional [environment-id] argument was not supplied.

Status#

kinto status

Lists all environments that current .git repository has been deployed to.

Requirements -- Command must be executed from within a .git repository

โžœ nodejs git:(master) kinto-status
SUCCESS: Repo is deployed to these environments:
+------------+--------------+
| ENV NAME | SERVICE NAME |
+------------+--------------+
| dev | nodejs |
+------------+--------------+
| staging | nodejs |
+------------+--------------+

Service#

  • Fetch Services#

    kinto svs [environment-id]

    List all services within the chosen environment. You will be prompted to choose an environment if the optional [environment-id] argument is not supplied.

  • Port-Forward Service#

    kinto svs access {environmentId} {serviceId}

    Allows you to port-forward a specific remote service inside a particular environment to your local machine. You need to pass the mandotary {environmentId} and {serviceId} for this command.

Access#

kinto access

Requirements -- Command must be executed from within a .git repository

This command will port-forward all of your remote services belonging to your local git repository , from the chosen environment, to your local machine. You will be prompted to choose an environment.

โžœ nodejs git:(master) kinto-access
? Select environment: 1. staging
INFO: Starting Tunnel
INFO: Forwarding > localhost:5360 => nodejs:80
INFO: Forwarding > localhost:5361 => testfluentd:80
SUCCESS: Connected!
Press CTRL+C to close the tunnel

Teleport#

kinto teleport

Requirements -- Command must be ran within a .git repository

This command will redirect all the traffic for a single remote service, belonging to your local git repository and port-forward rest of the remaining remote services, from the chosen environment to your local machine. You will be prompted to choose an environment.

โžœ nodejs git:(master) kinto-cli teleport
? Select environment: 1. staging
INFO: Starting Tunnel
INFO: Teleporting > localhost:8080 => R:0.0.0.0:3000
INFO: Forwarding > localhost:5361 => testfluentd:80
WARNING: Please start your local server at PORT => 8080
SUCCESS: Connected!
Press CTRL+C to close the tunnel

Version#

kinto version

Displays the current CLI version.

Help#

kinto help

Displays a list of available commands.