---
title: "CLI Deployment"
description: "CLI Deployment explains how to deploy GenLayer Intelligent Contracts with genlayer deploy, RPC targets, and constructor args."
source: https://docs.genlayer.com/developers/intelligent-contracts/deploying/cli-deployment
last_updated: 2026-06-11
---

# CLI Deployment

CLI Deployment is the process of using the GenLayer CLI to deploy Intelligent Contracts directly from the command line. The GenLayer CLI provides a straightforward `deploy` command for deploying a contract file, optionally selecting an RPC endpoint and passing constructor arguments.

## Direct Contract Deployment

Deploy a single contract using the `deploy` command:

```bash
genlayer deploy --contract <contractPath> [options]
```

**Options:**
- `--contract <contractPath>`: Path to the Python contract file
- `--rpc <rpcUrl>`: Custom RPC URL (optional)
- `--args <args...>`: Constructor arguments (space-separated)

## Basic Examples

### Simple Contract Deployment

```bash
# Deploy a simple contract
genlayer deploy --contract contracts/my_contract.py
```

### Contract with Constructor Arguments

```bash
# Deploy with constructor arguments
genlayer deploy --contract contracts/betting_contract.py --args "World Cup 2024" 1000
```

### Deploy to Specific Networks

You can deploy to different networks by using the `--rpc` option or by setting your default network:

```bash
# Deploy to localnet with custom RPC
genlayer deploy --contract contracts/my_contract.py --rpc http://localhost:4000/api

# Deploy to studionet
genlayer deploy --contract contracts/my_contract.py --rpc https://studio.genlayer.com/api

# Deploy scripts to specific network
genlayer deploy --rpc https://custom-network.com/api
```

**Alternative: Set default network first**
```bash
# Set network then deploy
genlayer network testnet-bradbury
genlayer deploy --contract contracts/my_contract.py
```

## Constructor Arguments

When deploying contracts with constructor parameters, provide them as space-separated arguments:

### String Arguments

```bash
# Single string argument
genlayer deploy --contract contracts/my_contract.py --args Hello
```

### Multiple Arguments

```bash
# Multiple arguments (string, number, boolean)
genlayer deploy --contract contracts/my_contract.py --args "Contract Name" 100 true
```

### Multi-word Strings

```bash
# Multi-word strings (use quotes)
genlayer deploy --contract contracts/my_contract.py --args "Multi word string" 42
```

## Argument Types

The CLI automatically handles different argument types:

| Python Type | CLI Example | Notes |
|-------------|-------------|-------|
| `str` | `"Hello World"` | Use quotes for multi-word strings |
| `int` | `42` | Numbers without quotes |
| `float` | `3.14` | Decimal numbers |
| `bool` | `true` or `false` | Lowercase boolean values |
| `list` | Not supported | Use deploy scripts for complex types |

> **Note:**
> For complex data types like lists, dictionaries, or objects, use [Deploy Scripts](./deploy-scripts) instead of CLI deployment.

## Deployment Output

When a deployment succeeds, you'll see output similar to:

```bash
✅ Contract deployed successfully!
Transaction Hash: 0x1234567890abcdef...
Contract Address: 0xabcdef1234567890...
```

## Quick Deployment Workflow

1. **Prepare your contract**: Ensure your `.py` file is ready
2. **Choose your network**: Use `genlayer network` to set the target
3. **Deploy**: Run the deploy command with appropriate arguments
4. **Verify**: Note the contract address for future interactions

```bash
# Example workflow
genlayer network localnet
genlayer deploy --contract contracts/token.py --args "MyToken" "MTK" 1000000
```

## Next Steps

- Learn about [Deploy Scripts](./deploy-scripts) for more complex deployments
- Configure networks with [Network Configuration](./network-configuration)
