Skip to content

SeerApp/cli

Repository files navigation

Seer CLI

Commandline tool for tracing Solana transactions using Seer.


Getting Started

Create an account at app.seer.run and generate an API key.

Installation

This CLI can be installed using either the installation script or from source.

Script

curl -fsSL https://seer.run/install.sh | sh

Source

  1. Download this repo:
git clone https://github.com/SeerApp/cli .
  1. Create a Buf account and generate token at: https://buf.build/

  2. Login to Buf registry:

cargo login --registry buf "Bearer {token}"
  1. From root, build:
cargo build --release
  1. Install seer globally:
./target/release/seer install

Updating

Use the built-in updater:

seer update

For non-interactive use:

seer update --yes

Sessions

A Seer session is a special Solana Validator which processes your transactions and outputs your transaction traces in the Seer App. It works exactly like a regular Solana Test Validator, with the difference that it runs on a remote server, has access to mainnet state, and connects your transaction execution flow to your source code.

Log into your Seer CLI with the API key you generated in the app:

seer login <API_KEY>

Then, from inside of your Solana project, run:

seer run

This will compile your local programs with debug data, list the files necessary for the Seer debugger, ask for your consent to upload them, and start your Seer session.

This command works in both native Solana and Anchor projects.

If you wish to give consent to upload all files necessary by default, run:

seer run --consent

After the command executes successfully, you will see your Seer session URL, in the following format:

New Seer session at: https://rpc.seer.run/...

The Seer session currently automatically ends after 15 minutes, or when the CLI stream is closed.


Tracing

You need to point your Solana tooling at the Seer session URL so that the transaction you want to trace is routed through Seer.

Anchor project:

anchor test --skip-deploy --provider.cluster https://rpc.seer.run/...
# or set it in Anchor.toml:
# [provider]
# cluster = "https://rpc.seer.run/..."

Native project:

Specify your Seer session URL inside your test.

⚠️ Make sure to disable executable program deployments in your tests. Seer sessions only support launching the programs you specify under ./target/. Outside of that, they use default mainnet account state for all execution logic.


Requirements

  • Rust toolchain
  • A Seer API key (get one at Seer)

⚠️ Seer will not include program traces when compiling programs on Solana CLI versions before 3.0.0. This is due to a bug in the Solana toolchain on these versions. All other Seer features work as usual.

Bug Reports

Seer is in early beta, so occasional bugs are expected. To report a bug, open an issue on this repo, DM us on X or contact support.

About

CLI for running Seer sessions. Deploys program files and metadata to Seer, catches and displays session URL to user.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages