# edit

The cldkctl token edit command updates the details of an existing authentication token. This command allows you to rename an existing token by specifying its Token ID and the new name

## Usage

```
cldkctl token edit [id] [flags]
```

## Steps

Option 1 — Interactive Mode (TUI):

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

1. Run the command below with the target Token ID:

```
cldkctl token edit <token_id>
```

Replace `<token_id>` with the actual token ID you want to rename.

2. This will open an interactive token creation prompt in your terminal.
3. In the Token Name field, enter the name for the token. You cannot proceed by pressing Enter if this field is left empty.
4. After entering the new name, the interface will ask:

```
Create Token?
```

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

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

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

![](/files/QWH60u4Ix069J2lnOJcY)

1. Run the command below to rename the token directly without using the interactive interface:

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

Replace `<token_id>` with the actual token ID.

2. Once executed, the system will immediately rename the token and confirm success **“Cldkctl token updated”.**

## 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                         |
| ----------------- | ----------------------------------- |
| -h, --help        | Help for the token edit 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/edit.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.
