Documentation

Kanari Documentation

Quick Start

Learn how to set up and run the Kanari Network CLI.

Last updated

Quick Start

Welcome to Kanari Network. This guide walks you through building the workspace, running a local node, and using the Kanari CLI against the current JSON-RPC stack.

Prerequisites

Before you begin, ensure you have the following installed:

  • Rust (Stable channel recommended)
  • Git

Building the CLI

1. Install Ubuntu & macOS

Install dependencies

sudo apt  install git curl cmake make gcc lld pkg-config libssl-dev libclang-dev libsqlite3-dev g++ protobuf-compiler

Install Rust

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

Clone the repository

git clone https://github.com/kanari-network/kanari-sdk.git

Compile the Kanari CLI and node

cd kanari-sdk
cargo build --release -p kanari -p kanari-node

# kanari
cp target/release/kanari ~/.cargo/bin
# kanari-node
cp target/release/kanari-node ~/.cargo/bin

2. Install Windows

Install dependencies

To compile kanari on Windows, you'll need to install the following dependencies:

  1. Build Tools for Visual Studio 2022
  2. LLVM
  3. Git

Install Rust

  1. Download the Rust installer from the official Rust website.
  2. Run the installer and follow the on-screen instructions.
  3. After installation, open a new Command Prompt or PowerShell window and verify the installation by running:
rustc --version

Clone the repository

git clone https://github.com/kanari-network/kanari-sdk.git

Compile the Kanari CLI and node

cd kanari-sdk
cargo build --release -p kanari -p kanari-node

# kanari
Copy-Item target\release\kanari.exe $env:USERPROFILE\.cargo\bin\
# kanari-node
Copy-Item target\release\kanari-node.exe $env:USERPROFILE\.cargo\bin\

Run a local node

For a local single-node devnet:

kanari-node local

The local RPC endpoint is:

http://127.0.0.1:6767/rpc

The runtime can load embedded framework bytecode from the binary. You should not need to set KANARI_FRAMEWORK_PATH for normal node startup.

Running the CLI

Once built, you can use the CLI to interact with the network.

List Wallets

To see the list of available wallets and their balances:

cargo run -p kanari -- keytool list

Note: Node state is stored under the configured node data directory. The default user data layout uses .kanari paths, for example %USERPROFILE%\.kanari on Windows.

Query node stats

cargo run -p kanari -- client stats --rpc http://127.0.0.1:6767/rpc

Transfer tokens

cargo run -p kanari -- client transfer \
  --rpc http://127.0.0.1:6767/rpc \
  --to <RECIPIENT_ADDRESS> \
  --amount 1 \
  --password <PASSWORD>

After the transaction commits, checkpoint height advances. If no transactions are submitted, checkpoint height should remain stable.

Move VM Integration

Kanari Network leverages the Move VM. You can run Move subcommands directly through the Kanari CLI:

# Create a new Move package
cargo run -p kanari -- move new <package-name>

# Run tests for a Move package
cargo run -p kanari -- move test <path-to-move-package>