Skip to content
Getting started

First session

Five minutes from install to a running SVM sandbox that thinks it's mainnet. We'll create a project, clone a program, patch a field, and send a transaction.

Create a project

Projects are long-lived workspaces with their own program catalog, keypair vault, and one or more sessions.

terminal
$ pnpm cli project create "First flight" --rpc mainnet
✓ project j_a91  ·  First flight
  rpc:    https://api.mainnet-beta.solana.com
  root:   ~/.relay-cli-project/j_a91

Clone a program

Add the SPL Memo program by pubkey. Reley fetches the Program, resolves the IDL if one is registered, and caches the blob locally.

terminal
$ pnpm cli program add MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr \
    --project j_a91
↻ fetching Program       21 KB
↻ resolving IDL      none on-chain
✓ cloned             MEMO_v2

Open a session

A session is one SVM sandbox instance hydrated with the project's programs and accounts. Patches apply on session creation. Reset to discard mutations.

terminal
$ pnpm cli session create main --project j_a91
✓ session s_42f  ·  main
  slot:   348,201,118 (synthetic genesis + cloned state)
  funded: wallet $W ← 1000 SOL

Send a transaction

Build a Memo instruction with a raw data buffer and one signer account. The CLI prints a tx tree, CU per frame, and the touched account set.

terminal
$ pnpm cli tx send --session s_42f \
    --program MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr \
    --data 68656c6c6f \
    --account "$W:false:true"
▾ MEMO_v2                 312 cu
✓ ok  ·  log lines: 1

Publish as JSON-RPC

Promote the session to a Solana-compatible endpoint. Point any client at the URL.

terminal
$ pnpm cli session serve --session s_42f
⠿ JSON-RPC live  http://127.0.0.1:8899/session/main
note
The session URL is wire-compatible with @solana/web3.js, Anchor, and Phantom dev mode. No mock layer, no proxy. The bytes are the bytes.