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

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# Quickstart: create a token with the CLI

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

Run the commands in your browser in
[Solana Playground](https://playground.solana.com/new), or run them locally. The
`spl-token` CLI ships with the
[Solana CLI](/developers/docs/intro/installation/dependencies#install-solana-cli),
so a local Solana CLI install already includes it. To install `spl-token` on
its own, run `cargo install spl-token-cli --locked`. The addresses in your
output will differ from the examples below.

In Playground, the terminal opens inside a project: under **Start from
scratch**, click **Start**, then press **Ctrl+J** or click **Terminal** at the
bottom of the editor. Enter one command at a time: in a multi-line paste,
Playground runs the first line, then joins each later line onto the lines before
it, so those commands fail.

## 1. Connect to devnet

Point the CLI at devnet:

```bash Terminal
solana config set --url devnet
```

In Playground, the first command asks
`Your Playground wallet is not connected. Connect it? [Y/n]`. Type `y`, then
click **Continue** in the **Playground Wallet** dialog. The Playground wallet
pays the fees and signs every command on this page, so skip `solana-keygen`
below: Playground doesn't have that command.

Locally, create a keypair if you don't have one. The CLI uses
`~/.config/solana/id.json` as your wallet: it pays the fees and signs every
command on this page.

```bash Terminal
solana-keygen new
```

Next, get devnet SOL for account deposits and transaction fees. The devnet RPC
faucet is closed, so `solana airdrop` fails on devnet. Instead, print your
wallet address:

```bash Terminal
solana address
```

Paste the address into the [Solana Faucet](https://faucet.solana.com), request
devnet SOL, then check your balance with `solana balance`. For other faucets,
see [Airdrops and faucets](/developers/cookbook/development/airdrops-and-faucets).

Locally, you can skip the faucet by running the quickstart against a local
validator: start `solana-test-validator` in a second terminal, run
`solana config set --url localhost`, and fund your wallet with
`solana airdrop 2`, which still works there.

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

## 2. Create a token

Create the mint account that identifies your token:

```bash 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.

```bash 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:

```bash Terminal
spl-token create-account <MINT_ADDRESS>
```

This creates your
[associated token account](/developers/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:

```bash Terminal
spl-token mint <MINT_ADDRESS> 100
```

Check your balance:

```bash Terminal
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 `--fund-recipient` option
creates the recipient's associated token account if it does not exist. If the
recipient wallet holds no SOL, also pass `--allow-unfunded-recipient`, or the
CLI refuses to send:

```bash Terminal
spl-token transfer <MINT_ADDRESS> 10 <RECIPIENT_WALLET_ADDRESS> --fund-recipient --allow-unfunded-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. Run this section with the local
`spl-token` CLI: the version in Solana Playground doesn't support
`--enable-metadata` or `initialize-metadata`.

```bash Terminal
spl-token create-token \
  --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb \
  --enable-metadata
```

Then use the new mint address printed by that command:

```bash 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](/developers/docs/tokens/extensions/metadata) for the account model
and code examples.

## Where to go next

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