---
title: Setup the DevKit
description: Install, configure, and verify the Thru CLI
source_url:
  html: https://thru.org/docs/program-development/setting-up-thru-devkit/
  md: https://thru.org/docs/program-development/setting-up-thru-devkit.md
---

# Setup the DevKit

Use this guide to install the Thru CLI, configure the RPC endpoint, and verify everything works with a live request.

> **Caution:**
>
> This install workflow will change frequently until v1.0.0. Check back for updates when upgrading between versions.

## Prerequisites

- **Recommended install**: Install Node.js 18 or newer from [nodejs.org](https://nodejs.org/).

- **Linux package install**: Use an x86\_64 or arm64 Linux VM with `curl` and `sudo` access.

- **Linux C toolchain**: The prebuilt toolchain from `thru dev toolchain install` supports x86\_64 only and requires glibc 2.38 or newer. Ubuntu 24.04, Debian 13, and Fedora 39 meet this requirement. It also needs the GMP, MPFR, MPC, and zlib runtime libraries.

  Check your glibc version:

  ```bash
  getconf GNU_LIBC_VERSION
  ```

  Install the runtime libraries on Debian or Ubuntu:

  ```bash
  sudo apt install libgmp10 libmpfr6 libmpc3 zlib1g
  ```

  On Fedora or RHEL:

  ```bash
  sudo dnf install gmp mpfr libmpc zlib
  ```

  > **Note:**
  >
  > On older glibc versions, installation fails with `Toolchain verification failed: gcc not executable`.

## Setup

1. **Install the CLI**

   Install the Thru CLI globally using npm:

   ```bash
   npm i -g thru
   ```

   The npm package installs a prebuilt binary for macOS, Windows, and Linux; no Rust toolchain is required.

   More installation methods:

   Debian or Ubuntu (.deb)

   Install the Debian package for your architecture:

   ```bash
   # x86_64
   curl -fsSLO https://github.com/Unto-Labs/thru/releases/latest/download/thru_amd64.deb
   sudo apt install ./thru_amd64.deb
   ```

   ```bash
   # arm64
   curl -fsSLO https://github.com/Unto-Labs/thru/releases/latest/download/thru_arm64.deb
   sudo apt install ./thru_arm64.deb
   ```

   RHEL-compatible Linux (.rpm)

   Install the RPM package for your architecture (`dnf` accepts a URL directly):

   ```bash
   # x86_64
   sudo dnf install https://github.com/Unto-Labs/thru/releases/latest/download/thru-x86_64.rpm
   ```

   ```bash
   # aarch64
   sudo dnf install https://github.com/Unto-Labs/thru/releases/latest/download/thru-aarch64.rpm
   ```

   > **Note:**
   >
   > To build from source instead, `cargo install thru` is still available. It requires the Rust toolchain ([rustup.rs](https://rustup.rs/)) and the Buf CLI ([buf.build/docs/cli/installation](https://buf.build/docs/cli/installation/)).

   Verify the install:

   ```bash
   thru --help
   ```

2. **Install the SDKs**

   Install the Thru toolchain and C SDK using the CLI:

   ```bash
   # Install RISC-V toolchain
   thru dev toolchain install

   # Install C SDK
   thru dev sdk install c
   ```

   > **Note:**
   >
   > The SDK will be installed to `~/.thru/sdk/c/` by default. The toolchain will be installed to `~/.thru/sdk/toolchain/`.
   >
   > Keep your C projects under your home directory. `make` finds the toolchain by searching up from the project directory for `.thru/sdk/toolchain`. For a project outside `$HOME`, set `RISCV_TOOLCHAIN_ROOT=$HOME/.thru/sdk/toolchain`.

3. **Make an initial call**

   Try a simple command:

   ```bash
   thru getversion
   ```

   > **Caution:**
   >
   > The default RPC endpoint is `https://rpc.alphanet.thru.org`. You may change this to access other nodes.

4. **Configure RPC endpoint**

   Edit your CLI configuration file at `~/.thru/cli/config.yaml`

   Set the base URL:

   ```yaml
   rpc_base_url: https://rpc.alphanet.thru.org
   ```

5. **Verify with getversion**

   Run again:

   ```bash
   thru --json getversion
   ```

   > **Tip:**
   >
   > If you can see the `thru-node` version your CLI can reach the alphanet endpoint.

6. **Check your keypair**

   The first `thru` command that loads the config, `thru dev toolchain install` in this guide, already created a keypair named `default` in `~/.thru/cli/config.yaml`. The rest of this guide uses that keypair. Confirm it is listed:

   ```bash
   thru keys list
   ```

   To add another keypair, use a new name for `$NAME`:

   ```bash
   thru keys generate $NAME
   ```

   > **Caution:**
   >
   > The CLI generated a private key. **Never share your private key** with anyone. It’s stored locally as plaintext hex in `~/.thru/cli/config.yaml`. Keep your files safe.

   > **Note:**
   >
   > This keypair will be stored locally and used to sign transactions. You may replace this key later with `thru keys generate --overwrite default`

7. **Create your first account**

   Create an account on-chain using your keypair:

   ```bash
   thru account create $NAME
   ```

   For example, to create an account named `default`:

   ```bash
   thru account create default
   ```

   You’ll see output similar to this:

   ```plaintext
   Info: Creating account with fee payer proof...
   Info: Account public key: tayzC11YgWrPpXBon_hBxI_Szh3eUqsHxEelsHxFroPsAB
   Info: Using slot: 776
   Info: Calling makeStateProof RPC method...
   Success: State proof created successfully
   Info: Building transaction with fee payer proof...
   Info: Signing transaction...
   Info: Submitting transaction...
   Account Creation
     Key Name: default
     Public Key: tayzC11YgWrPpXBon_hBxI_Szh3eUqsHxEelsHxFroPsAB
     Signature: tsRIKKU4-Hu9nqzwlaZxcHjv7etbguo6g1AUMt5q9ga96dXxvqnTRTm8w6XH9C6OGSgcPc94TMmKzczNg8qqMTCyXX
     Status: success
   Success: Account creation transaction completed. Signature: tsRIKKU4-Hu9nqzwlaZxcHjv7etbguo6g1AUMt5q9ga96dXxvqnTRTm8w6XH9C6OGSgcPc94TMmKzczNg8qqMTCyXX
   ```

## Updating the CLI

When the CLI changes, update it with the same install method you used. For npm installs, run:

```bash
npm i -g thru@latest
```

For Debian, Ubuntu, or RHEL-compatible installs, re-run the install command you used above. The `releases/latest/download/` URLs always resolve to the newest release, so the command does not change between versions:

```bash
curl -fsSLO https://github.com/Unto-Labs/thru/releases/latest/download/thru_amd64.deb
sudo apt install ./thru_amd64.deb
```

> **Note:**
>
> Packages installed this way are not picked up by `apt upgrade` or `dnf upgrade` — there is no hosted package repository. Install the newer package the same way.
