matter-labs/zksync-cli(opens in a new tab)
Language: TypeScript
CLI tool that simplifies ZKsync development
- stars
- 167
- watchers
- 7
- forks
- 99
- open issues
- 8
- Last updated
- 10/28/2026
Language: TypeScript
CLI tool that simplifies ZKsync development
This CLI tool simplifies the process of developing applications and interacting with ZKsync.
zksync-cli dev commands)You can run commands without installation: npx zksync-cli. For example: npx zksync-cli dev start.
npx zksync-cli dev - Manage local ZKsync development environment. It allows to easily start ZKsync stack locally, for example: local Ethereum and ZKsync nodes, Block Explorer, Wallet and Bridge.
npx zksync-cli dev start - start local development environment (will ask to configure if starting for the first time)npx zksync-cli dev clean - clean data for configured modulesnpx zksync-cli dev config - select modules to run in local development environmentRun npx zksync-cli dev to see the full list of commands.
npx zksync-cli create: Create a project using updated templates.
See full documentation and advanced examples here.
npx zksync-cli contract read: run read-only contract methodsnpx zksync-cli contract write: send transactions to the contractnpx zksync-cli contract encode: get calldata from the contract methodSee full documentation and advanced examples here.
npx zksync-cli transaction info: get information about a transactionnpx zksync-cli wallet transfer: send funds on L2 to another accountnpx zksync-cli wallet balance: displays token balance of the specified addressnpx zksync-cli bridge deposit: deposits funds from Ethereum (L1) to ZKsync (L2)npx zksync-cli bridge withdraw: withdraws funds from ZKsync (L2) to Ethereum (L1)npx zksync-cli bridge withdraw-finalize: finalizes withdrawal of funds from ZKsync (L2) to Ethereum (L1)npx zksync-cli config chains: Add or edit custom chainsnpx zksync-cli help: Provides information about all supported commandsnpx zksync-cli <command> --help: Provides detailed information about how to use a specific command. Replace <command> with the name of the command you want help with (e.g., create, dev config, bridge withdraw-finalize)npx zksync-cli --version: Returns the current versionNote: currently you might face issues interacting with custom ZK Chains. Fix is in progress. By default zksync-cli bridge commands support ZKsync Sepolia Testnet and ZKsync Mainnet. You can also use other networks by using one the options below:
npx zksync-cli config chains command.npx zksync-cli deposit --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.
npm i.npm run dev -- [command] [options] (e.g. npm run dev -- bridge deposit --chain=zksync-sepolia).npm i.npm run build to compile the code into /bin.node ./binAt the moment, we don't have any tests, but we are working on it. In the meantime, you can test the code manually by running the code in development mode.
This project is licensed under MIT.
Encountering issues with zksync-cli? Below are some common problems with step-by-step recommendations for resolving them:
`unknown command` ErrorIf you encounter an unknown command error, follow these steps:
a. Check the zksync-cli Version
npx zksync-cli --version to check your current version.npx zksync-cli help for a list of current commands or refer to the documentation.b. Verify Local Installation
npm list zksync-cli to check if zksync-cli is installed in the current directory or any parent directories from where you are running your terminal.npm uninstall zksync-cli in its installation location. Remove all instances of zksync-cli until there are no more found by npm list zksync-cli.c. Verify Global Installation
npm list -g zksync-cli to check if zksync-cli is installed globally.npm uninstall -g zksync-cli.d. Clean npm Cache
npm cache clean --force.e. Use the Latest Version
npx zksync-cli@latest [command], for example, npx zksync-cli@latest dev start.If npx zksync-cli is not running the latest version:
If you receive a command not found: npx error, it means Node.js is not installed or not correctly set up on your system:
npm and npx.npx zksync-cli again.For all other issues, we encourage you to ask for help or report them in our GitHub Discussions.