---
title: "Quickstart: create a token with the CLI"
description:
  Create a token, open a token account, mint supply, and transfer tokens using
  the SPL Token CLI on devnet.
---

This quickstart walks through the complete token lifecycle with the
_sh`spl-token`_ CLI. You will create a mint, create an account that can hold the
token, mint 100 tokens, and transfer some to another wallet.

Use [Solana Playground](https://beta.solpg.io/) to run the commands in your
browser, or install the CLI locally with `cargo install spl-token-cli`. The
addresses in your output will differ from the examples below.

## 1. Connect to devnet

Create or connect a wallet in Solana Playground, then select devnet and request
SOL for account deposits and transaction fees:

```terminal
$ solana config set --url devnet
$ solana airdrop 2
```

Use devnet tokens only for testing. They have no financial value.

## 2. Create a token

Create the mint account that identifies your token:

```terminal
$ spl-token create-token
```

Copy the token address from the output. This is the mint address you will use in
the remaining commands. A new mint starts with a supply of zero.

```terminal
$ spl-token supply <MINT_ADDRESS>
```

## 3. Create a token account

Your wallet needs a token account for this mint before it can hold a balance:

```terminal
$ spl-token create-account <MINT_ADDRESS>
```

This creates your
[associated token account](/docs/tokens#associated-token-account), whose address
is derived from your wallet and the mint.

## 4. Mint tokens

Mint 100 tokens into your associated token account:

```terminal
$ spl-token mint <MINT_ADDRESS> 100
$ spl-token balance <MINT_ADDRESS>
```

The mint authority must sign this operation. Minting increases both your token
account balance and the total supply recorded by the mint.

## 5. Transfer tokens

Send 10 tokens to another devnet wallet. The _sh`--fund-recipient`_ option
creates the recipient's associated token account if it does not exist:

```terminal
$ spl-token transfer <MINT_ADDRESS> 10 <RECIPIENT_WALLET_ADDRESS> --fund-recipient
```

The transfer changes the balances in the sender and recipient token accounts; it
does not change the mint's total supply.

## Optional: add Token-2022 metadata

To store a name, symbol, and URI directly on a new Token-2022 mint, create it
with the metadata extension enabled:

```terminal
$ spl-token create-token \
  --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb \
  --enable-metadata
```

Then use the new mint address printed by that command:

```terminal
$ spl-token initialize-metadata \
  <MINT_ADDRESS> \
  "Example Token" \
  "EXAMPLE" \
  "https://example.com/token.json"
```

The URI should return a public JSON metadata document. See
[Token-2022 metadata](/docs/tokens/extensions/metadata) for the account model
and code examples.

## Where to go next

- [Token basics](/docs/tokens/basics) - perform the same operations in
  TypeScript or Rust
- [Token extensions](/docs/tokens/extensions) - add transfer fees, metadata,
  pausing, and other Token-2022 features
- [Asset issuance and tokenization](/docs/tokenization) - design and operate
  production tokenized assets
