redpesk infrastructure access

In order to correctly communicate with the redpesk infrastructure, rp-cli needs to have the right parameters set. To set these parameters easily and interactively, use the rp-cli onboard command.

$ rp-cli onboard
-- rp-cli configuration requested by user --
Current available connections: [NONE]

Please enter the alias of the connection you want to change/create, then press enter:
If you want to change/create the default connection, press enter directly

Please enter the URL of the redpesk backend you want to interact with, then press enter:

Please visit with your favorite browser to create your access token!
The token section is available in your profile page. Please, paste your token here and press enter:
> 7b1f5f04-bbb8-42b4-96bc-bde36beee1e3_a28fef78-320b-4d43-a676-ce68d48d2c71
Deleting the previous configuration files...    [OK]
Creation of the configuration file...           [OK]
Modification of the token file...               [OK]

rp-cli first asks for an alias for the connection. Unless there are several redpesk servers you want to connect to, simply press enter. Then, this command asks for the redpesk URL. In our example, we use the URL of the community redpesk infrastructure, i.e. Then it requests an access token. This access token needs to be created through the webUI, following the steps here below.

  • Go on the redpesk webUI, in your “Profile”

Go to profile

  • A new access token can be generated at the bottom of the page

Generate token

  • Set the client ID as “rp-cli” and choose an expiration date that suits you

Fill the fields

  • Once the access token generated, copy it in your clipboard. Be careful, your access token is just displayed once!

Copy the access token

Shell Completion

The rp-cli user experience takes advantage of the shell completion. All the installation and configuration steps needed by completion are automatically handled when installing the redpesk-cli package.

Autocompletion usage

Using rp-cli’s autocompletion is really simple, and as you may already know, autocompletion can really be a timesaver! In order to use it, simply start typing the command line you want, and then hit [TAB][TAB]. Depending on what you are currently typing, the completion suggests you the end of your command.

It even looks for the projects/applications list from the backend to suggest them to you. You can find some examples here below.

# Get the list of sub-commands with autocompletion
$ rp-cli [TAB][TAB]
applications    help    misc    onboard    projects    teams    users

# Get the list of mandatory flags in "applications add" sub-command
$ rp-cli applications add -[TAB][TAB]
-n             --name=        --pkg-name=    --source-url=

# Get the list of available applications to build
$ rp-cli applications build [TAB][TAB]
borderland-3-my-app-0  iot-project-iot-app-0

# Etc.