# 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):

<figure><img src="/files/MmAhpwwRjQodpGum7WZ9" alt=""><figcaption></figcaption></figure>

1. Run the following command in your terminal:

```
cldkctl token create
```

2. This will open an interactive token creation prompt in your terminal.
3. In the Token Name field, type a custom name for your token. You cannot proceed by pressing Enter if this field is left empty.
4. 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.

5. The prompt will then ask:

```
Create Token?
```

* Press Y to confirm and create the token.
* Press N to cancel the process.
* Press Shift + Tab to return to the previous field.

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

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

<figure><img src="/files/UDo0tXp5dN5WoCVT1x4r" alt=""><figcaption></figcaption></figure>

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

```
cldkctl token create \
  --name "dokumentasiCTL" \
  --expired "31/12/2025"
```

2. The token will be generated immediately, and a success message will appear.
3. You can then copy and store the token securely for future use

## Flags

{% hint style="info" %}
This command supports[ global flags](/cloudeka-api-list/global-flags.md). Refer to the Global Flags section for details.
{% endhint %}

| Flag                 | Description                           |
| -------------------- | ------------------------------------- |
| -e, --expired string | Token expiration date.                |
| -h, --help           | Help for the token create subcommand. |
| -n, --name string    | Token name.                           |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloudeka.ai/cloudeka-api-list/command-reference/cldkctl-token/create.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
