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. Use zksync-cli dev stop [module name] to stop specific modules.
  • Restart: zksync-cli dev restart or zksync-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, use zksync-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:

  1. Use zksync-cli dev stop to cease all operations.
  2. Reinstall the problematic module with zksync-cli dev clean [module name].
  3. Restart with zksync-cli dev start. Check Docker container logs for detailed errors, accessible through Docker Desktop.
  4. Persisting issues? Please report them in our GitHub discussions.

Made with ❤️ by the ZKsync Community