# How to Use the Tornado-CLI Command Line Tool

By [加密奥特man john](https://paragraph.com/@man-john) · 2024-12-15

---

**How to Use the Tornado-CLI Command Line Tool**
================================================

by Doris.M,translated by John

If you encounter issues accessing the Tornado web version, you can try using the Tornado CLI version (command line).

Currently, there are two versions available:

*   [https://github.com/tornadocash/tornado-cli](https://github.com/tornadocash/tornado-cli) (Official Original Version)
    
*   [https://git.tornado.ws/tornadocash/tornado-cli](https://git.tornado.ws/tornadocash/tornado-cli) (Theo Maintained Version)
    

I have tried all two versions, and only the Theo version works for me.

### **How to Install Tornado CLI:**

(❗️❗️The following steps use the Theo version on Windows 10 as an example!)

#### **🟢 Step 1: Download the Tornado CLI Source Code**

Open the Theo Maintained Version link: [https://git.tornado.ws/tornadocash/tornado-cli](https://git.tornado.ws/tornadocash/tornado-cli)

![Download the CLI source code package.](https://storage.googleapis.com/papyrus_images/d54e8ea2f8df9451f71c689f1842266c5ce9cb29f4fe58b0b4f61452fbcccd81.png)

Download the CLI source code package.

After downloading, you’ll have the tornado-cli-master.zip source code package. Place it anywhere, preferably in a dedicated folder for easier management (e.g., create a tornado folder in drive D).

Extract tornado-cli-master.zip to the tornado folder, resulting in a folder named tornado-cli.

![Extract the CLI installation package.](https://storage.googleapis.com/papyrus_images/ae69aa0c1fbfc7784847576aabb8be48d22ded90aecd434a7d66bea9ee58e5bb.png)

Extract the CLI installation package.

**🟢 Step 2: Install Node.js Runtime Environment**

Open the Node.js official website:

[https://nodejs.org/](https://nodejs.org/)

![Download the Node.js installer: node-v20.17.0-x64.msi.](https://storage.googleapis.com/papyrus_images/90f53d3c9e7df302e866b38a7952fa752e39f5c115ffcc28a91a6ffb65ab6bb9.png)

Download the Node.js installer: node-v20.17.0-x64.msi.

Run the installer and proceed with the default “Next” options until completed.

Check the Node.js installation by verifying the version:Open the tornado-cli extracted directory (e.g., D:\\tornado\\tornado-cli).

Open Windows PowerShell as an administrator from the “File” menu.

![open Windows PowerShell](https://storage.googleapis.com/papyrus_images/c7bf20a8f09d713f2bc806f35ede6f8306d6378e35854763e2bfb5d9f72fc6a2.png)

open Windows PowerShell

In the terminal, type node -v and press Enter. If the version number (v20.17.0) appears, the installation was successful.

Similarly, check the npm version by typing npm -v. Ensure it is at least version 10.5.0. Lower versions may not work properly.

![Check Node.js version](https://storage.googleapis.com/papyrus_images/36277378ff9d26232bcdf2aef68e8112ea322acdf27ecc03e8feec3ad368b3cd.png)

Check Node.js version

#### **🟢 Step 3: Install Tornado CLI Dependencies**

In the same PowerShell window, type npm install and press Enter.

This will begin downloading the required dependency libraries for Tornado CLI (❗️❗️It may take some time; do not close the window).

![Download CLI dependencies](https://storage.googleapis.com/papyrus_images/ccbc20ff8144864001a3258950ead05c7963fe742ba3446f105a44eab3486781.png)

Download CLI dependencies

If you see “Error” messages during the process, repeat the npm install command until it completes without errors.

![Download CLI dependencies](https://storage.googleapis.com/papyrus_images/db5aec1729898d4906619f94723b8085aaaa6eee3a4cd4e36be7f1b9d07f063d.png)

Download CLI dependencies

Note: If the dependency download is slow or fails, you can set the npm registry to a local mirror by running:

    npm config set registry https://registry.npmmirror.com
    

Then Run `npm install` again.

#### **🟢 Step 4: Use Tornado CLI for Deposits and Withdrawals**

#### **Deposit Command Format (using BSC network as an example):**

    node cli.js deposit <currency> <amount> --rpc <rpc url> --tor <torPort> --private-key <private key>
    

Parameter Details:

*   : The cryptocurrency (e.g., eth, bnb).
    
    *   : Deposit amount (e.g., 0.1, 1, 10, 100).
        
        *   : RPC URL (e.g., [https://bscrpc.com/](https://bscrpc.com/)).
            
            *   : Proxy port (optional; omit if not using a proxy).
                
                *   : Your wallet’s private key (without the 0x prefix).
                    
                
                Example: To deposit 0.1 bnb:
                
                    node cli.js deposit bnb 0.1 --rpc https://tornadocash-rpc.com/mainnet --private-key <your-wallet-private-key>
                    
                
                If using a proxy, add --tor at the end. deposit **Withdrawal Command Format (using BSC network as an example):** node cli.js withdraw <note> <recipient> --rpc <rpc url> --relayer <relayer url> --tor <torPort> Parameter Details: : Deposit note (e.g., tornado-bnb-0.1-56-0x1111111111111). : Recipient wallet address (e.g., 0x176F3DAb24a159341c0509bB36B833E7fdd0a132). : RPC URL (e.g., [https://bscrpc.com/](https://bscrpc.com/)). : Relayer URL (e.g., [https://bsc.gm777.xyz/](https://bsc.gm777.xyz/)). : Proxy port (optional; omit if not using a proxy). Example: To withdraw 0.1 bnb: node cli.js withdraw tornado-bnb-0.1-56-0x1111111111111 <recipient-address> --rpc https://tornadocash-rpc.com/mainnet --relayer https://bsc.gm777.xyz/ If using a proxy, add --tor at the end. Withdrawal (Synchronizing Deposit Events) When executing the withdrawal command, the tool will first synchronize the historical deposit event logs up to the latest block (**❗️❗️ This may take some time, so please be patient**). You can also pre-synchronize the deposit events using a dedicated command and complete the synchronization before running the withdrawal command. **Synchronization Commands** For example, to sync events for **100 BNB** and **10 BNB** on the BSC network (each amount must be synchronized separately): node cli.js syncEvents deposit bnb 100 --rpc https://bscrpc.com node cli.js syncEvents deposit bnb 10 --rpc https://bscrpc.com **❤️ Note**:For Ethereum, replace `bnb` with `eth` in the command and use an Ethereum RPC URL. **After Synchronization** Once the deposit events are retrieved, you'll see the prompt:`Computing deposit events merkle tree and its root` The speed of this process depends on your computer's CPU performance. **Be patient while it completes.** After computing, the prompt will ask:`Confirm the transaction [Y/n]`Type `Y` and press Enter to finalize the withdrawal. **If Errors Occur** If you encounter errors, repeat the command or try using a different RPC URL. **🚨 Common Errors and Solutions:** Request timeout or connection error: Try a different RPC or register new ones at: [https://blockpi.io/](https://blockpi.io/) [https://1rpc.io/](https://1rpc.io/) [https://meganode.nodereal.io/](https://meganode.nodereal.io/) [https://getblock.io/](https://getblock.io/) Contract address not allowed: Switch to another RPC. Merkle tree is corrupted: Replace the local deposit event files from the original source and sync again. Block not found: Switch RPCs and try again. The note is already spent: Indicates the deposit has already been withdrawn. The deposit is not found in the tree: Ensure deposit events are fully synced or verify the note is correct. ❤️ If this guide helped you, consider buying me(@DorisMM) a drink! 😘 💹 Wallet Address (any chain): 0x089c03c1601543a405362176ff055C8AB41D65d4

---

*Originally published on [加密奥特man john](https://paragraph.com/@man-john/how-to-use-the-tornado-cli-command-line-tool)*
