Skip to main content
Version: v2.10.0

Setup

We ship the Yeedu CLI (Command Line Interface) as a standard CLI to run interactively with Yeedu's RESTful-API.

You need to run the commands below from the project directory to set up the Yeedu CLI in your environment.

  • PyPI

PyPI version

pip install yeedu-cli==4.13.0

Environment Variable Setup

Create a .env file in the project directory and provide below environment variables.

# Below mentioned values are the default values of Environment Variables 
YEEDU_RESTAPI_URL="http://localhost:8080"
YEEDU_CLI_LOG_DIR=~/.yeedu/cli/logs/
YEEDU_CLI_MAX_LOG_FILES=5 # Number of log files as an integer
YEEDU_CLI_MAX_LOG_FILE_SIZE=30 # Log file size in MB as an integer
YEEDU_USERNAME=USER
YEEDU_PASSWORD=PASS
YEEDU_RESTAPI_TOKEN=<YOUR_TOKEN>
YEEDU_RESTAPI_TOKEN_FILE_PATH=/home/user/yeedu_cli.config

⚠️ Security Warning: Never commit actual tokens to .env files or version control. Always use placeholder values like <YOUR_TOKEN> and set real tokens at runtime.

Alternative of .env file

SET YEEDU_RESTAPI_URL="http://localhost:8080"
SET YEEDU_CLI_LOG_DIR=~/.yeedu/cli/logs/
SET YEEDU_CLI_MAX_LOG_FILES=5
SET YEEDU_CLI_MAX_LOG_FILE_SIZE=30
SET YEEDU_USERNAME=USER
SET YEEDU_PASSWORD=PASS
SET YEEDU_RESTAPI_TOKEN=<YOUR_TOKEN>
SET YEEDU_RESTAPI_TOKEN_FILE_PATH=/home/user/yeedu_cli.config

Authentication Setup

  • Below mentions ways of storing the credentials which will be used [Environment Variables will be given a priority] to generate the token.

Storing the credentials as Environment Variables

YEEDU_USERNAME=USER
YEEDU_PASSWORD=PASS

Storing the credentials inside a yeedu_credentials.config file

  • The yeedu_credentials.config file needs to be created inside the directory home/user/.yeedu/ which consists of JSON as shown below:
{
"YEEDU_USERNAME": "USER",
"YEEDU_PASSWORD": "PASS"
}

Storing the Yeedu Session Token inside a file

  • If you already have the Yeedu Session Token, you can save the token at any location and provide the file path in the environment variable YEEDU_RESTAPI_TOKEN_FILE_PATH
    • For example YEEDU_RESTAPI_TOKEN_FILE_PATH="/home/user/Documents/YeeduToken/{FileName}"
  • Format to store the token is as shown below:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJpYXQiOjE2ODg3MjA0MjIsImV4cCI6MTY4ODg5MzIyMn0.EfxuXKPBISQB4ep-sPQbo6R7tg2irlnAC_krqnuXJ5Q"
}

Rules for Using Tokens

  1. Tenant-Specific Tokens
    • Each token for a user must be tied to a single tenant and must not be shared or used across multiple tenants under any circumstances while scheduling jobs.
  2. Timeout Configuration
    • --timeout accepts a duration such as 24h, 2 days or 1700s, or the literal infinity for a token that never expires.
    • Defaults differ by command: yeedu configure issues a 48h token, yeedu token create a 30 days token.
    • Choose the shortest timeout that covers the job. Reserve infinity for cases where a non-expiring token is genuinely required, since such a token stays valid until it's revoked.
  3. Purpose-Specific Usage
    • Tokens must only be used for their designated purposes and shouldn't be repurposed for any other functionalities or operations.