> For the complete documentation index, see [llms.txt](https://docs.citrea.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.citrea.xyz/essentials/using-clementine/clementine-cli.md).

# Clementine CLI

A wallet-agnostic command-line tool for depositing 10 BTC from Bitcoin to Citrea and withdrawing 10 cBTC from Citrea to Bitcoin.

For more information about the Clementine bridge, visit [Clementine: trust-minimized Bitcoin Bridge](/essentials/clementine-trust-minimized-bitcoin-bridge.md).

Clementine can also be used through the [Clementine Web App](/essentials/using-clementine/clementine-web-app.md): [clementine.citrea.xyz](https://clementine.citrea.xyz) for mainnet and [clementine.testnet.citrea.xyz](https://clementine.testnet.citrea.xyz) for testnet.

If you are looking for bridging smaller amounts, you can use third party bridges. Visit <https://citrea.xyz/bridge> for more information.

If you encounter any issues, email us at <clementine-cli@citrea.xyz>.

## Installation

Choose one of the following installation paths.

### Option A: Build from source

Install Rust:

```sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

Install Clementine CLI:

```sh
cargo install --git https://github.com/chainwayxyz/clementine-cli --tag v0.1.0 --locked --force
```

### Option B: Download a pre-built binary and verify it

See [Download & Verify](/essentials/using-clementine/clementine-cli/download-verify.md) for instructions on downloading pre-built binaries and verifying signatures.

### Initialize and configure

Install the default configuration by running the CLI init command which creates the `~/.clementine/bridge_cli_config.toml` file for you:

```sh
clementine-cli init
```

Show configuration:

```sh
clementine-cli show-config
```

Show help:

```sh
clementine-cli --help
```

## Quick Usage

By default, `clementine-cli` uses `bitcoin` (mainnet) network. If you wish to make deposits and withdrawals on testnet, please provide `--network testnet` flag every time you invoke `clementine-cli`. Throughout the docs, network aliases are used interchangeably: `bitcoin`/`mainnet`, `testnet4`/`testnet`, `signet`/`devnet`, and `regtest`.

### Deposit

```sh
# Create wallet for deposit (Recovery Taproot Address)
clementine-cli wallet create my-deposit-wallet deposit

# Start deposit (generate deposit address)
clementine-cli deposit start <RECOVERY_TAPROOT_ADDRESS> <CITREA_ADDRESS>

# Send 10 BTC to the shown address as prompted by the start command

# Monitor deposits
clementine-cli deposit status <DEPOSIT_ADDRESS>
```

### Withdrawal

```sh
# Create wallet for withdrawal (Withdrawal Signer Address)
clementine-cli wallet create my-withdrawal-wallet withdrawal

# Start withdrawal (Generate Withdrawal Address)
clementine-cli withdraw start <WITHDRAWAL_TAPROOT_ADDRESS> <DESTINATION_ADDRESS>

# Send 330 sats to the shown address as prompted by the start command
# Then run withdrawal scan command to find available withdrawal UTXOs
clementine-cli withdraw scan <WITHDRAWAL_TAPROOT_ADDRESS> <DESTINATION_ADDRESS>

# Run the prompted commands to generate withdrawal signatures and send withdrawal request to Citrea for optimistic withdrawal

# Monitor withdrawals
clementine-cli withdraw status <WITHDRAWAL_ADDRESS>
```

## Two-Device Security

We suggest using Clementine CLI with two devices for maximum security:

* **Airgapped device:**\
  All wallet creation, key generation, and signing operations\
  `clementine-cli wallet create`\
  `clementine-cli deposit create-signed-recovery-tx`\
  `clementine-cli withdraw generate-withdrawal-signatures`
* **Online device:**\
  Status monitoring, address generation, broadcasting

## Documentation

* [Download & Verify](/essentials/using-clementine/clementine-cli/download-verify.md) - Download pre-built binaries and verify signatures
* [Wallet Guide](/essentials/using-clementine/clementine-cli/wallet.md) - Wallet operations
* [Deposit Guide](/essentials/using-clementine/clementine-cli/deposit.md) - Deposit Bitcoin to Citrea
* [Withdrawal Guide](/essentials/using-clementine/clementine-cli/withdraw.md) - Withdrawal from Citrea to Bitcoin
* [Advanced Usage](/essentials/using-clementine/clementine-cli/advanced.md) - Advanced users only: signet/regtest config, API/RPC selection, hidden CLI commands
* [Reproducible Builds](/essentials/using-clementine/clementine-cli/reproducible-builds.md) - Build and verify binaries reproducibly
