Skip to content

ankara020/eigenlayer-cli

 
 

Repository files navigation

Tests Linter Build

EigenLayer CLI

EigenLayer CLI is used to manage core operator functionalities like local key management, operator registration and updates.

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 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>

Install eigenlayer CLI using Go

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

Eigenlayer is only supported on Linux. Make sure you install Go for Linux in a Linux environment (e.g. WSL2, Docker, etc.)

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

As the repository is private, you need to set the GOPRIVATE variable properly by running the following command: export GOPRIVATE=github.com/Layr-Labs/eigenlayer-cli,$GOPRIVATE. Git will automatically resolve the private access if your Git user has all the required permissions over the repository.

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

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

Releases

No releases published

Packages

No packages published

Languages

  • Go 78.8%
  • Shell 18.9%
  • Makefile 2.3%