Page cover

create

The cldkctl token create command generates a new authentication token to access Cloudeka services. You can specify a name for the token and define its expiration date, either as a number (in days) or a date in DD/MM/YYYY format. This command is useful when you need to create a new API token for authentication without using the Cloudeka Service Portal.

Usage

cldkctl token create [flags]

Steps

Option 1 — Interactive Mode (TUI):

  1. Run the following command in your terminal:

  1. This will open an interactive token creation prompt in your terminal.

  2. In the Token Name field, type a custom name for your token. You cannot proceed by pressing Enter if this field is left empty.

  3. In the Expired field, enter either:

  • a number (for example 30 for 30 days), or

  • a date in the DD/MM/YYYY format (for example 31/12/2025).

You cannot proceed by pressing Enter if this field is left empty.

  1. The prompt will then ask:

  • Press Y to confirm and create the token.

  • Press N to cancel the process.

  • Press Shift + Tab to return to the previous field.

  1. Once confirmed, the system will display the success message and the generated token.

Option 2 — Using Flags (Non-Interactive Mode):

  1. Run the command with the --name and --expired flags to create a token directly without entering the interactive interface:

  1. The token will be generated immediately, and a success message will appear.

  2. You can then copy and store the token securely for future use

Flags

This command supports global flags. Refer to the Global Flags section for details.

Flag
Description

-e, --expired string

Token expiration date.

-h, --help

Help for the token create subcommand.

-n, --name string

Token name.

Last updated