Package Exports
- zksync-cli
- zksync-cli/bin/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (zksync-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
‣ zkSync Era CLI

This CLI tool simplifies the process of developing applications and interacting with zkSync Era.
🛠 Prerequisites
- Node.js v18.x
- NPM / Yarn
📥 Installation
You can install this program globally with npm i -g zksync-cli or run the commands directly via NPX with npx zksync-cli@latest {COMMAND}.
💻 Commands
zksync-cli deposit: deposits funds from Ethereum (L1) to zkSync (L2)zksync-cli withdraw: withdraws funds from zkSync (L2) to Ethereum (L1)zksync-cli withdraw-finalize: finalizes withdrawal of funds from zkSync (L2) to Ethereum (L1)zksync-cli create-project {FOLDER_NAME}: creates project from template in the specified folderzksync-cli help: Provides information about all supported commandszksync-cli help <command>: Provides detailed information about how to use a specific command. Replacewith the name of the command you want help with (e.g., create-project, deposit, withdraw, withdraw-finalize) zksync-cli --version: Returns the current version
🔗 Supported chains
By default zkSync CLI supports Era Testnet and Era Mainnet. You can also use other networks by overwriting L1 and L2 RPC URLs. For example: zksync-cli deposit --l2-rpc=http://... --l1-rpc=http://...
If you're using local setup (dockerized testing node) with default L1 and L2 RPC URLs, you can select Local Dockerized node option in the CLI or provide option --chain local-dockerized.
⚙️ Options (flags)
--zeek: zeek, the dev cat, will search for an inspirational quote and provide to you at the end of any command.
👩💻 Developing new features
Run in development mode
- Install all dependencies with
npm i. - To use CLI in development mode run
NODE_ENV=development npx ts-node --transpile-only src/index.ts.
Building for production
- Install all dependencies with
npm i. - This project was build with Typescript. Run
npm run buildto compile the code into/bin. - You can run your local build with
node ./bin
Testing
⚠️ This project does not have unit tests yet 🤕
Proper tests will be included soon. For now, you can test new changes manually by running your build (refer to Install and build).
📊 Tracking
zkSync-cli tracks its usage for the single purpose of providing data so it can be improved. Data is fully anonymized. If you want to disable the tracking, set the environment variable NO_TRACKING to true.
🌍 Official Links
📜 License
This project is licensed under MIT.