> ## Documentation Index
> Fetch the complete documentation index at: https://docs.idyl.network/llms.txt
> Use this file to discover all available pages before exploring further.

# idyl join-token

> Manage the tokens that join machines to a Fleet

Create, list, and revoke JoinTokens.

A JoinToken lets machines join one Fleet as Nodes without anyone signing in on
them. Any number of machines may join with the same token until it expires,
one hour after creation unless --expires-after says otherwise. Revoking a
token ends it early: no machine can join with it afterwards, and the Nodes
that already joined stay in the Fleet.

The token secret is shown once, when the token is created, and cannot be
recovered. On the machine, idyld join reads it from the IDYL\_JOIN\_TOKEN
environment variable or from one line of standard input.

## Usage

```bash theme={null}
idyl join-token
```

## Aliases

* `join-tokens`

## Commands

| Command | Description |
| - | - |
| `idyl join-token create` | Create a JoinToken for a Fleet |
| `idyl join-token get` | Get a JoinToken, or list them |
| `idyl join-token revoke` | Revoke a JoinToken |

## Inherited flags

| Flag | Description |
| - | - |
| `-a <string>, --account-id <string>` | Account ID to use, overriding the current context. |
| `-c <string>, --context <string>` | Use the named context for this command. |
| `--homedir <string>` | Override the configuration directory. Defaults to \~/.config/idyl. |
| `-n <string>, --namespace <string>` | Namespace to address, overriding the entered context. |
| `--network <string>` | Override the Network for this command. |
| `-p <string>, --profile <string>` | Override the access profile for this command. |
| `-s <string>, --subnet <string>` | Subnet to use for this command, overriding the current context. |

## Examples

```bash theme={null}
idyl join-token create --fleet <fleet-id>
idyl join-token create --fleet <fleet-id> --expires-after 4h
idyl join-token list
idyl join-token list --fleet <fleet-id>
idyl join-token get <join-token-id>
idyl join-token revoke <join-token-id>
```

## Subcommand reference

### `idyl join-token create`

Create a JoinToken that lets machines join a Fleet as Nodes.

The token is valid for one hour unless --expires-after states another
lifetime between 1m and 24h. Any number of machines may join with it until it
expires or is revoked.

The token secret is printed once, to standard output, and cannot be shown
again. Anyone holding it can add machines to the Fleet until it expires, so
pass it to the machine without writing it into logs or shell history: idyld
join reads it from the IDYL\_JOIN\_TOKEN environment variable or from one line
of standard input.

#### Usage

```bash theme={null}
idyl join-token create [flags]
```

#### Flags

| Flag | Description |
| - | - |
| `--expires-after <string>` | How long the token stays valid, from 1m to 24h. Defaults to 1h. |
| `--fleet <string>` | Required. Fleet ID the joining machines are added to. |
| `-o <string>, --output <string>` | Output format: table, json, yaml. Default: `table`. |

#### Examples

```bash theme={null}
idyl join-token create --fleet <fleet-id>
idyl join-token create --fleet <fleet-id> --expires-after 15m
idyl join-token create --fleet <fleet-id> -o json
```

### `idyl join-token get`

Get one JoinToken, or list the account's JoinTokens.

With no argument, lists every JoinToken in the account; --fleet narrows the
list to one Fleet's tokens. With a JoinToken ID, shows that token: its Fleet,
when it expires, and how many machines have joined with it. Neither form shows
the token secret, which exists only in the output of create.

#### Usage

```bash theme={null}
idyl join-token get [join-token-id] [flags]
```

#### Aliases

* `list`
* `ls`

#### Flags

| Flag | Description |
| - | - |
| `--fleet <string>` | List only the JoinTokens of this Fleet ID. |
| `-o <string>, --output <string>` | Output format: table, json, yaml. Default: `table`. |

#### Examples

```bash theme={null}
idyl join-token get
idyl join-token get --fleet <fleet-id>
idyl join-token get <join-token-id>
```

### `idyl join-token revoke`

Revoke a JoinToken. It stops admitting machines at once and is removed;
Nodes that already joined with it stay in their Fleet.

#### Usage

```bash theme={null}
idyl join-token revoke <join-token-id> [flags]
```

#### Flags

| Flag | Description |
| - | - |
| `-y, --yes` | Skip confirmation prompts. |

#### Examples

```bash theme={null}
idyl join-token revoke <join-token-id>
idyl join-token revoke <join-token-id> --yes
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.