Skip to content

wallet-cli

A command-line wallet for TRON and selected EVM networks — interactive in Java, agent-first in TypeScript.

This repository holds two independent implementations that share the same purpose but target different users:

  • Java — the original, full-featured reference CLI. An interactive prompt (REPL) you drive by hand.
  • TypeScript — an agent-first rewrite for automation. Standard subcommands with a stable JSON envelope, built for scripts, CI, and AI agents.

Both manage the same kind of wallet, but their account stores are not interchangeable. The same mnemonic gives the same address only for the first account: beyond it the two walk different BIP44 paths — Java increments the address index (m/44'/195'/0'/0/i), TypeScript the account level (m/44'/195'/i'/0/0). A wallet restored in the other CLI therefore shows different addresses; the funds are not missing. Check the BIP44 path recorded with the account before migrating between the two. They cover the same TRON feature surface and differ in how you install and drive them — and the TypeScript implementation additionally speaks EVM networks (Ethereum, BNB Smart Chain and their testnets), which the Java implementation does not. Pick one and read its own README for depth; this page gives you the basics of each so you can choose.

At a glance

Java — the original TypeScript — agent-first rewrite
What it is The mature, full-feature reference CLI. A newer rewrite focused on programmatic integration.
Runtime JVM — built with Gradle, run as a .jar. Uses the Trident SDK. Node.js 20+.
Install git clone + cd wallet-cli/java && ./gradlew build (see Setup) npm install -g @tron-walletcli/wallet-cli
How you drive it An interactive prompt only — start it, then type commands at >. One-shot subcommandswallet-cli <command> from your shell. Prompts appear only on a short allowlist (create, import *, backup, change-password, delete); every other command errors instead of asking.
Command style PascalCase verbs: RegisterWallet, SendCoin, GetBalance. Amounts in SUN (1 TRX = 1,000,000 SUN). Noun-verb subcommands: create, tx send, account balance, with --flags.
Output for scripts Human-readable text. Stable JSON via -o json (wallet-cli.result.v1) + fixed exit codes (0/1/2).
Config / networks config.conf endpoints, or SwitchNetwork at runtime. Mainnet · Nile · Shasta · custom. --network flag / config command. CAIP-2 ids with short aliases: tron:728126428 (tron) · tron:3448148188 (nile) · tron:2494104990 (shasta) · eip155:1 (ethereum) · eip155:11155111 (sepolia) · eip155:56 (bsc) · eip155:97 (bsc-testnet).
Signing Software keystore · Ledger. Encrypted local keystore · Ledger. Secrets enter via stdin/TTY, never argv or dedicated secret environment variables.
Feature scope The full surface — wallets and transfers, staking, voting and rewards, governance, contracts, TRC10, and the on-chain exchange. The full surface — HD wallets, TRX/TRC20/TRC10 transfers, staking & delegation, voting & rewards, governance proposals & super-representative operation, contract call/deploy/governance, TRC10 issuance, the on-chain Bancor exchange, multi-sig, GasFree transfers, message signing, and on-chain queries.
Best for People at a terminal who want every TRON capability. Scripting, CI pipelines, and AI agents.
Full docs Java CLI TypeScript CLI

Java — get a taste

Interactive only. Build it, start the prompt, then type commands:

$ git clone https://github.com/tronprotocol/wallet-cli.git
$ cd wallet-cli/java && ./gradlew build && cd build/libs
$ java -jar wallet-cli.jar        # opens the interactive prompt
> RegisterWallet                  # prompts twice for the password, then for mnemonic length
> Login                           # unlock it
> GetAddress                      # your TRON address
> GetBalance                      # TRX balance

Full setup (config.conf, connecting to a node), the complete A–Z command list, and features like GasFree and multi-sig live in Java CLI — jump to Setup, Quickstart, Commands, or GasFree.

TypeScript — get a taste

Install from npm, then run subcommands directly from your shell:

$ npm install -g @tron-walletcli/wallet-cli
$ wallet-cli create --label main               # prompts for a master password
$ wallet-cli account balance --network tron:3448148188
$ wallet-cli account balance -o json           # one wallet-cli.result.v1 JSON frame

Every command has a reference page, and the JSON contract, exit codes, and agent integration are documented in depth. Start at TypeScript CLI, then:

Which should I use?

  • Scripting, CI, or building an AI agent? → the TypeScript version — the JSON envelope and deterministic exit codes exist for exactly this.
  • Working interactively — one long-running session at a > prompt, with the wallet unlocked once for the whole session? → the Java version.
  • Just sending TRX/tokens or staking from your own machine? → either works; the TypeScript CLI is the lighter install (npm install -g, no build step).