This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
EigenLayer DevKit is a CLI toolkit for scaffolding, developing, and testing EigenLayer Autonomous Verifiable Services (AVS). It's built in Go and focuses on the Hourglass task-based architecture. The DevKit is currently in closed alpha and intended for local experimentation and development only.
# Build the CLI binary
make build
# Run all tests (may be slow)
make tests
# Run fast tests (skips slow integration tests)
make tests-fast
# Install binary to ~/bin/ and set up shell completion
make install
# Format code
make fmt
# Run linter
make lint
# Clean up build artifacts
make cleanAfter building, test the CLI:
./bin/devkit --help
./bin/devkit avs --help# Build for specific platforms
make build/darwin-arm64
make build/darwin-amd64
make build/linux-arm64
make build/linux-amd64
# Build all platforms
make releaseThe CLI is built with urfave/cli/v2 and organized hierarchically:
- Main entry:
cmd/devkit/main.go - Core commands: All under
devkit avssubcommand - Command implementations:
pkg/commands/directory
Key commands:
devkit avs create- Scaffold new AVS projects from templatesdevkit avs build- Compile contracts and binaries via template scriptsdevkit avs devnet- Manage local Docker-based development networksdevkit avs call- Simulate task executiondevkit avs config/context- Configuration management
Multi-layered configuration with migration support:
- Global Config (
~/.config/devkit/config.yaml): User preferences, telemetry settings - Project Config (
config/config.yaml): Project metadata, template info - Context Config (
config/contexts/{context}.yaml): Environment-specific settings (devnet, testnet, mainnet)
Current Versions: Config v0.0.2, Context v0.0.6
The system includes automatic migrations between versions via pkg/migration/ that preserve user customizations.
Projects are scaffolded from versioned Git templates:
- Template registry:
config/templates.yamldefines available templates - Template fetching:
pkg/template/git_fetcher.gohandles Git operations - Project initialization: Templates provide
.devkit/scripts/initfor setup - Build/run integration: Templates provide
.devkit/scripts/buildand.devkit/scripts/run
The devnet management system (pkg/commands/devnet.go) provides:
- Local Docker-based Anvil chains with EigenLayer state forked from Holesky
- Automated contract deployment (L1/L2)
- Pre-funded test operators with BLS keystores
- AVS registration and operator management
pkg/commands/: CLI command implementationspkg/common/: Shared utilities, configuration, contracts, loggingpkg/template/: Git-based template managementpkg/telemetry/: PostHog analytics integrationpkg/migration/: Configuration migration systempkg/hooks/: Command lifecycle hooks
- Go 1.23.6+ required
- EigenLayer contracts:
github.com/Layr-Labs/eigenlayer-contracts - Hourglass AVS:
github.com/Layr-Labs/hourglass-monorepo/ponos - External tools: Docker, Foundry, Zeus (npm package
@layr-labs/zeus@1.5.2)
- Install prerequisites: Docker, Foundry, Go 1.23.6+, make, jq, yq
- Clone repository and run
make install - Zeus is automatically installed as npm global package during
make install
- Unit tests use standard Go testing
- Integration tests may require Docker and external dependencies
- Use
make tests-fastfor quick feedback during development - Integration tests in
test/integration/directory
When adding new configuration fields:
- Update config structs in
pkg/common/ - Create migration in
config/configs/migrations/orconfig/contexts/migrations/ - Update embedded config versions in
config/ - Test migration with existing project configs
Templates must provide:
.devkit/scripts/init- Project initialization.devkit/scripts/build- Build script for contracts/binaries.devkit/scripts/run- Run script for AVS components- Standard Go project structure for task-based architecture
Optional PostHog-based telemetry with:
- Global and project-level opt-in/opt-out
- Privacy-conscious data collection
- CI environment auto-detection (defaults to disabled)