# Step 1: Create token

### Prerequisites&#x20;

Solana CLI: <https://docs.solana.com/cli/install-solana-cli-tools>

RLY CLI: <https://github.com/rally-dfs/rly-ts/tree/main/packages/cli>

RLY TS: <https://github.com/rally-dfs/rly-ts/tree/main/packages/ts>

{% tabs %}
{% tab title="CLI" %}

```
npm i -g rly-cli
```

or

```
yarn global add rly-cli
```

{% endtab %}

{% tab title="TS" %}

```
$ npm i rly-js
```

or

```
yarn add i rly-js
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
If you're experiencing permission issues installing the npm package globally on your local machine, please visit [https://docs.npmjs.com/downloading-and-installing-node-js-and-npm](<https://docs.npmjs.com/downloading-and-installing-node-js-and-npm&#xA;>)
{% endhint %}

### Additional resources

* Example React app: <https://rly-ts-eight.vercel.app/>
* Example TS tests: <https://github.com/rally-dfs/dfs-ts/tree/main/ts/tests>

## Create your token&#x20;

{% hint style="info" %}
If you have already created an SPL token via Solana's Token Program, skip to [Step 2: Initializing Token Bonding Curve (TBC).](/rly-protocol/get-started/tbc-on-solana/step-2-initialize-token-bonding-curve-tbc.md)
{% endhint %}

### Step 1: Create Token

Configure your token parameters, additional metadata, and the initial token supply to mint. A balance of at least 1 SOL is required.&#x20;

{% tabs %}
{% tab title="CLI" %}

```
rly-cli create-token [options]

Options:
  -e, --env <string>     Solana cluster env name (default:
                         "devnet")
  -k, --keypair <path>   Solana wallet location (default:
                         "--keypair not provided")
  -n, --name <string>    token name
  -s, --symbol <string>  token symbol
  -d, --dec <number>     token decimals (default: "9")
  --supply <number>      initial supply (integer value)
  -h, --help             display help for command
```

{% endtab %}

{% tab title="TS" %}

```
// token

import { Keypair, Connection, clusterApiUrl } from 'solana/web3js`;
import { createToken, getMetadata } from 'rly-js';

const initialSupply = new BN(1_000_000);
const name = "TestToken";
const symbol = "TKNSYMBL";
const decimals = 9

const walletKeyPair = Keypair.generate();
const connection = new Connection(clusterApiUrl("devnet"))
const wallet = new NodeWallet(walletKeyPair)

//create token

const { tx, tokenMint } = await createToken({
            initialSupply,
            tokenData: { name, symbol, decimals },
            connection,
            wallet
        })

// fetch metadata

const metadata await getMetadata({ tokenMint: tokenMint.publicKey, connection })
```

Examples: <https://github.com/rally-dfs/dfs-ts/tree/main/ts/tests>
{% endtab %}
{% endtabs %}

{% hint style="info" %}
The default configuration allows you to mint additional tokens after the initial mint.
{% endhint %}

{% hint style="success" %}
The initial token supply will be minted to the associated token account for the keypair creating the token.
{% endhint %}

## That's it!

In this section you should have:&#x20;

1. Created your on-chain SPL app token&#x20;
2. Minted an initial token supply to the associated token account
3. Verified your token and supply on chain&#x20;
4. Verified your token name, symbol, and logo on an explorer/wallet

### Additional Resources

* Solana CLI guide: <https://docs.solana.com/cli/install-solana-cli-tools>
* Solana wallet guide: <https://docs.solana.com/wallet-guide/cli>


---

# 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://wiki.rly.network/rly-protocol/get-started/tbc-on-solana/step-1-create-token.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.
