Skip to main content

Configure the LandingLens CLI

This section explains how to configure the LandingLens CLI so that it can interact with the LandingLens servers.

Generate Credentials#

Log into LandingLens platform. Click on API in the platform page menu and select API key.


Click on the Generate API Key button.

A pop-up window will appear with the API Key and Secret credentials.


The API key and secret are only valid within the same Org. If you are working with different organizations, you need to get credentials for all your accounts.

Quick Configuration#

After you get your credentials, you need to configure llens. For general use cases, llens configure set-profile is the fastest way to set up.

Run the following command.

llens configure set-profile

When you enter this command, LandingLens CLI will ask you for the basic settings that are required to interact with the LandingLens platform. That includes your LandingLens key, secret and Project ID.

Copy and paste them in the CLI, and you're good to go.

NOTE: Remember to keep your credentials in a secure place. If you lose them, you'll need to re-generate the credentials and reconfigure the LandingLens CLI.

Advanced Configurations#

LendingLens CLI configuration is stored in ~/.landinglens/config.ini. It has the following format.

[DEFAULT]default_profile = primary
[primary]api_key = <KEY>api_secret = <SECRET>project_id = <PROJECT_ID>

Named Profiles#

You can create named profiles, by specifying --profile as an additional argument.

llens configure set-profile --profile=staging

This can be useful when working with multiple organizations in Production or running in multiple environments.

[DEFAULT]default_profile = primary
[primary]api_key = <KEY>api_secret = <SECRET>project_id = <PROJECT_ID>
[staging]api_key = <KEY>api_secret = <SECRET>project_id = <PROJECT_ID>

Currently, our CLI does not allow you to choose which profile you want to use when running a job. Therefore, you need to change the default profile before you run a new job. You can achieve this by using the following command:

llens configure set-default <profile name>

Custom Endpoints#

By default, CLI calls Landing production servers. To send API calls to staging or other servers, add the following lines to the profile manually.

[staging]api_key = <KEY>api_secret = <SECRET>project_id = <PROJECT_ID># Staging server URLs for all APIslanding_api = https://staging.platform.landingai.iolanding_model_api = Print detailed output from request and response to serverdebug = true

CLI Configure commands#

# Get list of commandsllens
# Set Configurationsllens configure set-profile  # Set Configurations for "primary" profilellens configure set-profile [--profile=]<profile_name>
# Get list of profilesllens configure ls
# Set default profile (when working with local, dev, staging and prod)llens configure set-default <profile name>
# Get profile credentialsllens configure get-profile  # Will print the default or primary profilellens configure get-profile [--profile=]<profile name>