Skip to content

Layr-Labs/eigenlayer-cli

Repository files navigation

Tests Linter Build

EigenLayer CLI

EigenLayer CLI is used to interact with EigenLayer core contracts.

Supported Features

  • Operator Keys Creation and Management via local keystore (ECDSA and BLS over bn254 curve) - eigenlayer keys --help
  • Operator Registration, Updates and Status check - eigenlayer operator --help
  • Reward Claiming and Setting Claimers - eigenlayer rewards --help

Supported Key Management Backends

Supported Operating Systems

Operating System Architecture
Linux amd64
Linux arm64
Darwin amd64
Darwin arm64

Install eigenlayer CLI using a binary

To download a binary for the latest release, run:

curl -sSfL https://raw.githubusercontent.com/layr-labs/eigenlayer-cli/master/scripts/install.sh | sh -s

The binary will be installed inside the ~/bin directory.

To add the binary to your path, run:

export PATH=$PATH:~/bin

Installing a particular binary version

To download a binary for a particular version, run:

curl -sSfL https://raw.githubusercontent.com/layr-labs/eigenlayer-cli/master/scripts/install.sh | sh -s -- <version>

Example: To install version v0.11.0, run:

curl -sSfL https://raw.githubusercontent.com/layr-labs/eigenlayer-cli/master/scripts/install.sh | sh -s -- v0.11.0

Installing in a custom location

To download the binary in a custom location, run:

curl -sSfL https://raw.githubusercontent.com/layr-labs/eigenlayer-cli/master/scripts/install.sh | sh -s -- -b <custom_location>

We collect anonymous usage data to improve the CLI. To disable telemetry, set the environment variable EIGENLAYER_CLI_TELEMETRY_ENABLED to false.

Install eigenlayer CLI using Go

Note: Some commands might not work as expected as we use some build time variables. We recommend using binary installation for best experience.

First, install the Go programming language following the official instructions. You need at least the 1.21 version.

This command will install the eigenlayer executable along with the library and its dependencies in your system:

go install github.com/Layr-Labs/eigenlayer-cli/cmd/eigenlayer@latest

The executable will be in your $GOBIN ($GOPATH/bin).

To check if the GOBIN is not in your PATH, you can execute echo $GOBIN from the Terminal. If it doesn't print anything, then it is not in your PATH. To add GOBIN to your PATH, add the following lines to your $HOME/.profile:

export GOBIN=$GOPATH/bin
export PATH=$GOBIN:$PATH

Changes made to a profile file may not apply until the next time you log into your computer. To apply the changes immediately, run the shell commands directly or execute them from the profile using a command such as source $HOME/.profile.

Install eigenlayer CLI from source

Note: Some commands might not work as expected as we use some build time variables. We recommend using binary installation for best experience.

With this method, you generate the binary manually (need Go installed), downloading and compiling the source code:

git clone https://github.com/Layr-Labs/eigenlayer-cli.git
cd eigenlayer-cli
mkdir -p build
go build -o build/eigenlayer cmd/eigenlayer/main.go

or if you have make installed:

git clone https://github.com/Layr-Labs/eigenlayer-cli.git
cd eigenlayer-cli
make build

The executable will be in the build folder.


In case you want the binary in your PATH (or if you used the Using Go method and you don't have $GOBIN in your PATH), please copy the binary to /usr/local/bin:

# Using Go
sudo cp $GOPATH/bin/eigenlayer /usr/local/bin/

# Build from source
sudo cp eigenlayer-cli/build/eigenlayer /usr/local/bin/

Documentation

Please refer to the full documentation here.

Links to specific sections are provided below.

If you see any issues in documentation please create an issue or PR here

Release Process

To release a new version of the CLI, follow the steps below:

Note: You need to have write permission to this repo to release new version

  1. Checkout the master branch and pull the latest changes:

    git checkout master
    git pull origin master
  2. In your local clone, create a new release tag using the following command:

     git tag v<version> -m "Release v<version>"
  3. Push the tag to the repository using the following command:

    git push origin v<version>
  4. This will automatically start the release process in the GitHub Actions and will create a draft release to the GitHub Releases with all the required binaries and assets

  5. Check the release notes and add any notable changes and publish the release