> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sophon.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# ZKsync CLI

The [ZKsync CLI](https://github.com/matter-labs/zksync-cli) is a powerful tool designed to simplify the setup, development, testing, and deployment of contracts on ZK Chains. It also provides a way to scaffold dApps using templates leveraging various frontend and web3 libraries.

<Tip>**ZKsync CLI** is published on npm as [**`zksync-cli`**](https://www.npmjs.com/package/zksync-cli). Commands are invoked using `npx zksync-cli` in the terminal.</Tip>

<Note>
  **Prerequisites**

  * [Node.js v18 or higher](https://nodejs.org/en)
  * [Git](https://git-scm.com/downloads)
  * [Docker](https://www.docker.com/get-started/) (for `zksync-cli dev` commands)
</Note>

## Usage

You can run commands without installation: `npx zksync-cli` (For example: `npx zksync-cli dev start`).

## Available Commands

<Tip>To learn more about the available commands in ZKsync CLI, see the [**CLI reference**](https://docs.zksync.io/zksync-era/tooling/zksync-cli/reference).</Tip>

Here are the main command categories and their common use cases:

### Bridge

Transfer assets between L1 and L2.

```bash theme={null}
npx zksync-cli bridge deposit        # Move funds from Ethereum (L1) to ZKsync (L2)
npx zksync-cli bridge withdraw       # Initiate withdrawal from L2 to L1
npx zksync-cli bridge withdraw-finalize  # Complete the withdrawal process to L1
```

### Config Chains

Manage custom chain configurations.

```bash theme={null}
npx zksync-cli config chains add     # Add a new custom chain
npx zksync-cli config chains edit    # Modify existing chain settings
```

### Contract

Interact with smart contracts.

```bash theme={null}
npx zksync-cli contract read         # Execute read-only contract methods
npx zksync-cli contract write        # Send transactions to contracts
npx zksync-cli contract encode       # Generate calldata from contract methods
```

### Create

Bootstrap new projects using templates.

```bash theme={null}
npx zksync-cli create               # Create new projects with various templates:
                                    # - Frontend (Vue, React, Next.js, Nuxt, Vite)
                                    # - Contracts (Hardhat with Solidity/Vyper)
                                    # - Scripting (Node.js automation)
```

### Dev

Manage local development environment.

```bash theme={null}
npx zksync-cli dev start            # Start local dev environment
npx zksync-cli dev clean            # Clean data for configured modules
npx zksync-cli dev config           # Select modules to run locally
```

### Transaction

Query transaction details.

```bash theme={null}
npx zksync-cli transaction info     # Get detailed information about a transaction
```

### Wallet

Manage wallet operations.

```bash theme={null}
npx zksync-cli wallet balance       # Check token balance for an address
npx zksync-cli wallet transfer      # Send funds on L2 to another account
```
