8000 GitHub - sssionggg/token-cli: A way to sweep accounts on a wallet to another wallet.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sssionggg/token-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solana Token CLI

A command-line tool for managing Solana token accounts. Uses your local Solana CLI config for wallet and RPC settings.

Installation

bun install

Commands

View Wallet Address

Display your wallet's public key:

bun run index.ts address

List Token Balances

Show token accounts sorted by USD value:

bun run index.ts balances [--limit <number>]

Options:

  • --limit, -l: Number of accounts to display (default: 20, use 0 for all)

Transfer Tokens

Send tokens to another wallet:

bun run index.ts transfer --mint <address> --to <address> --amount <number>

Options:

  • --mint, -m: Token mint address
  • --to, -t: Destination wallet address
  • --amount, -a: Amount to transfer (use 'max' for full balance)

Sweep Tokens

Transfer multiple token accounts to another wallet based on USD value:

bun run index.ts sweep --to <address> [--limit <number>]

Options:

  • --to, -t: Destination wallet address
  • --limit, -l: Number of top token accounts to transfer (default: 5)

Features

  • Real-time token pricing via Jupiter API
  • Automatic compute unit estimation
  • Handles token account creation
  • Reliable transaction confirmation with retries
  • Support for max balance transfers
  • USD value-based sorting and filtering

Requirements

  • Bun runtime
  • Solana CLI config file (~/.config/solana/cli/config.yml)
  • Valid keypair file

About

A way to sweep accounts on a wallet to another wallet.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0