> For the complete documentation index, see [llms.txt](https://docs.cloudeka.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudeka.ai/cloudeka-api-list/command-reference/cldkctl-token/edit.md).

# 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.                         |
