#zk-vm #zero-knowledge #sdk #sindri

bin+lib sindri-cli

A command-line interface for interacting with Sindri's API

3 releases

new 0.2.3 Apr 5, 2025
0.2.2 Mar 15, 2025
0.2.1 Mar 13, 2025

#1268 in Command line utilities

Download history 185/week @ 2025-03-09 76/week @ 2025-03-16 4/week @ 2025-03-23

265 downloads per month

MIT license

170KB
3K SLoC

Sindri Rust CLI

A command-line interface for interacting with Sindri's API distributed as a cargo binary. An alternative Sindri CLI, written in typescript and distributed as a npm package, can be found here.

Installation

Install the latest Sindri rust CLI via:

cargo install sindri-cli --force --locked

Usage

Login

Most functionalities within the Sindri Rust SDK and CLI require you to supply your API key. This method allows you to create an API key by providing your Sindri username and password via:

cargo sindri login [OPTIONS]

Options

  • --username <USERNAME>: Sindri username (optional, will prompt if not provided)
  • --password <PASSWORD>: Sindri password (optional, will prompt if not provided)
  • --keyname <KEYNAME>: Name to identify your new key (optional, will prompt if not provided)
  • --teamname <TEAMNAME>: Sindri team which the key should be created for (optional, will prompt if not provided)
  • --base-url <URL>: Sindri API base URL (overrides SINDRI_BASE_URL env var)

The login command will prompt for your Sindri credentials (if not provided via options) and allow you to select a team to generate an API key for.

After successful login, you can use the generated API key by either:

  • Setting the SINDRI_API_KEY environment variable
  • Using the --api-key flag with any cargo sindri command

Clone a Circuit

Retrieve the original source code that was uploaded to Sindri for a given project build via:

cargo sindri clone <CIRCUIT> < [OPTIONS]

Arguments

  • <CIRCUIT>: UUID or project build identifier to clone

Options

  • --directory <DIR>: Path where the circuit should be saved (defaults to circuit name)
  • --api-key <KEY>: Sindri API key (overrides SINDRI_API_KEY env var)
  • --base-url <URL>: Sindri API base URL (overrides SINDRI_BASE_URL env var)

Deploy a Circuit

Upload your local DSL circuit or zkVM code to Sindri so that you can generate proofs via:

cargo sindri deploy <PATH> [OPTIONS]

Arguments

  • <PATH>: Path to a local project directory or an archive file (.zip, .tar, .tar.gz, .tgz)

Options

  • --api-key <KEY>: Sindri API key (overrides SINDRI_API_KEY env var)
  • --base-url <URL>: Sindri API base URL (overrides SINDRI_BASE_URL env var)
  • --tags <TAGS>: Optional comma-separated tags to identify the circuit
  • --meta <KEY1=VALUE1,KEY2=VALUE2>: Optional metadata key-value pairs (comma-separated)

Example

# Deploy with tags and metadata
cargo sindri deploy ./my-circuit --tags test,v1 --meta version=1.0,env=staging --api-key=your-api-key

# Deploy using environment variables for authentication
export SINDRI_API_KEY="your-api-key"
cargo sindri deploy ./my-circuit

After successful deployment, the CLI will output the circuit's UUID and human-readable identifier which can be used for future proof requests.

Dependencies

~25–41MB
~631K SLoC