npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@eigenlayer/compute-cli

v0.1.0-alpha.14

Published

CLI for compute operations

Downloads

25

Readme

EigenCompute CLI

Build decentralized compute services. Generate server implementations and smart contracts from Solidity interfaces, then deploy them to EigenCompute.

⚠️ Alpha Software: This CLI is in early development. APIs and generated code may change between versions.

Quick Start

1. Install

npm install -g @eigenlayer/compute-cli

2. Create Your Project

compute init my-service

This creates a new project with:

  • Template Solidity interface (IMyServiceSpec.sol)
  • Foundry project structure
  • Package.json with gen script

3. Define Your Interface

cd my-service

Edit the generated interface file to add your compute functions:

// IMyServiceSpec.sol
interface IMyServiceSpec {
    function calculateSum(uint256 a, uint256 b) external returns (uint256);
    // Add your functions here
}

4. Generate Code

npm run gen

This generates:

  • Complete server implementation (Rust)
  • Smart contracts for EigenCompute
  • Docker configuration
  • Deployment scripts

5. Implement Your Logic

Server logic (e.g., src/main.rs for Rust):

// Find the generated function stub and add your implementation
async fn calculate_sum(a: U256, b: U256) -> Result<U256> {
    Ok(a + b)  // Your compute logic here
}

Contract customization:

  • Modify contracts/src/MyService.sol for additional on-chain logic
  • Add access controls, state variables, or events as needed

6. Deploy

export PRIVATE_KEY=0x123...
npm run deploy

Choose to deploy:

  • Offchain only: Docker image to EigenDA
  • Onchain only: Smart contract with forge
  • Both: Complete deployment

That's it! Your decentralized compute service is ready.


Interactive Mode

Run without arguments for a guided experience:

compute

Commands

init - Create New Project

compute init [project-name] [-l language] [-o directory]

gen - Generate from Interface

compute gen [interface.sol] [-l language] [-o directory]

deploy - Deploy Your Service

compute deploy [options]

How It Works

  1. Users call your deployed contract
  2. Operators execute using your generated server
  3. Results return to your contract with proofs
  4. Contract acts on computed results

Detailed Documentation

Supported Languages

  • Rust (rust, rs) - Fully supported
  • Python (python, py) - Alpha support
  • TypeScript (typescript, ts) - Coming soon
  • Go (golang, go) - Coming soon

Resource Constraints

You can modify the generated server code to build your application. However, there are some resource constraints you need to be aware of. Currently we only support building for x86_64/amd64 architecture and only allow certain external calls

The following external calls are allowed. If you need access to them, read from these environment variables in your application:

  • ETH_RPC_URL (Ethereum RPC URL)
  • ARBITRUM_RPC_URL (Arbitrum RPC URL)
  • BASE_RPC_URL (Base RPC URL)
  • DA_PROXY_URL (EigenDA proxy URL)

Project Structure

my-service/
├── src/                   # Server implementation
├── contracts/             # Smart contracts
├── Dockerfile             # Container config
└── package.json           # Project config

Deployment Options

Networks

  • base-sepolia (default) - EigenLayer testnet
  • localhost - Local development
  • Custom chains - Via chain ID and RPC URL

Deploy Command Options

compute deploy
  --network <network>          # Target network (default: base-sepolia)
  --dockerfile <path>          # Custom Dockerfile path
  --image <id>                 # Use existing Docker image
  --contract-path <path>       # Contract file location
  --private-key <key>          # Alternative to PRIVATE_KEY env var
  --offchain                   # Deploy only Docker image
  --onchain                    # Deploy only smart contract
  --all                        # Deploy both (same as no flag)

Requirements

  • Node.js 16+
  • For development: Rust toolchain, Foundry
  • For deployment: Docker, private key with funds

Advanced Usage

Testing Locally

cd my-service
cargo run                    # Run server
docker build -t my-service . # Test with Docker

Contract Development

cd my-service/contracts
forge soldeer install        # Install dependencies
forge build                  # Compile
forge test                   # Run tests

Updating Your Deployment

cd my-service
npm run deploy:offchain      # Update server logic (keeps same contract)
npm run deploy:onchain       # Deploy new contract instance
npm run deploy               # Deploy both (new contract + server)

Note: Use deploy:offchain when you've only changed computation logic but kept the same interface. Your existing contract will automatically use the updated server code.

Using npx (No Installation)

npx @eigenlayer/compute-cli init
npx @eigenlayer/compute-cli gen interface.sol
npx @eigenlayer/compute-cli deploy

Command Aliases

  • initinitialize, new
  • gengenerate, create

Generated Files

Server Code:

  • Complete async implementation
  • Type definitions from Solidity
  • Docker configuration

Smart Contracts:

  • EigenCompute receiver contract
  • Implementation contract
  • Deployment scripts
  • Foundry configuration

Environment Variables

  • PRIVATE_KEY - Required for deployment
  • Custom RPC endpoints and contract addresses available via flags

Examples

See examples/ directory for sample projects.

License

BUSL-1.1