37 stable releases (4 major)

new 5.2.0 May 5, 2025
5.1.0 Jan 30, 2025
5.0.0 Nov 4, 2024
4.1.1 Sep 3, 2024
1.0.0 Aug 13, 2020

#24 in #spl

Download history 1306/week @ 2025-01-13 1806/week @ 2025-01-20 1887/week @ 2025-01-27 1844/week @ 2025-02-03 1909/week @ 2025-02-10 1440/week @ 2025-02-17 1432/week @ 2025-02-24 1386/week @ 2025-03-03 1518/week @ 2025-03-10 1092/week @ 2025-03-17 973/week @ 2025-03-24 1012/week @ 2025-03-31 905/week @ 2025-04-07 1170/week @ 2025-04-14 838/week @ 2025-04-21 898/week @ 2025-04-28

3,927 downloads per month

Apache-2.0

1.5MB
37K SLoC

SPL Token program command-line utility

A basic command-line for creating and using SPL Tokens. See https://spl.solana.com/token for more details

Build

To build the CLI locally, simply run:

cargo build

Testing

The tests require locally built programs for Token, Token-2022, and Associated Token Account. To build these, you can run:

BUILD_DEPENDENT_PROGRAMS=1 cargo build

This method uses the local build.rs file, which can be error-prone, so alternatively, you can build the programs by running the following commands from this directory:

cargo build-sbf --manifest-path ../program/Cargo.toml
cargo build-sbf --manifest-path ../program-2022/Cargo.toml
cargo build-sbf --manifest-path ../../associated-token-account/program/Cargo.toml

After that, you can run the tests as any other Rust project:

cargo test

To run it locally you can do it like this:

cargo build --manifest-path token/cli/Cargo.toml
target/debug/spl-token <command>

Dependencies

~101MB
~2M SLoC