zksync-cli dev
Manage a local node with zksync-cli.
Utilize zksync-cli
to effortlessly initiate a local development environment.
Using the command, zksync-cli dev start
, you can spin up local ZKsync and Ethereum nodes, along with Block Explorer, Wallet, and Bridge
for a seamless development experience.
Prerequisites
Before beginning, ensure you have installed:
Starting and Stopping Nodes
- Start:
zksync-cli dev start
initiates your local environment. On the first run, it prompts to select a node and additional modules. - Stop:
zksync-cli dev stop
terminates the local environment. Usezksync-cli dev stop [module name]
to stop specific modules. - Restart:
zksync-cli dev restart
orzksync-cli dev restart [module name]
restarts your environment or specific modules.
Configuring Your Environment
zksync-cli dev config
allows the selection of nodes and additional modules like block explorer and bridge. Run modules such as Block Explorer against an already running node by adding a new chain.
Managing Modules
zksync-cli dev modules
lists all installed modules, providing a clear overview of your environment's components.
Viewing Logs
zksync-cli dev logs
displays logs for all active modules, essential for monitoring and debugging.
Cleaning Modules
zksync-cli dev clean
removes all module data from your computer. For specific modules, usezksync-cli dev clean [module name]
.
Updating Modules
zksync-cli dev update [module name]
updates individual modules, ensuring you're running the latest versions.
Troubleshooting
If modules malfunction, e.g., failing to start:
- Use
zksync-cli dev stop
to cease all operations. - Reinstall the problematic module with
zksync-cli dev clean [module name]
. - Restart with
zksync-cli dev start
. Check Docker container logs for detailed errors, accessible through Docker Desktop. - Persisting issues? Please report them in our GitHub discussions.