E5C5 GitHub - JOeLi6tbypoint43/datahaven-cli: DataHaven CLI — Management tool for DataHaven AI-first decentralized storage secured by EigenLayer AVS with local network orchestration, E2E testing, Solidity contract toolchain (Foundry), Rust operator builds, WAGMI codegen, Docker integration, and Rich terminal UI · GitHub
[go: up one dir, main page]

Skip to content

JOeLi6tbypoint43/datahaven-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

datahaven-cli

DataHaven CLI — Management tool for DataHaven AI-first decentralized storage secured by EigenLayer AVS with local network orchestration, E2E testing, Solidity contract toolchain (Foundry), Rust operator builds, WAGMI codegen, Docker integration, and Rich terminal UI

  ██████╗  █████╗ ████████╗ █████╗ ██╗  ██╗ █████╗ ██╗   ██╗███████╗███╗   ██╗
  ██╔══██╗██╔══██╗╚══██╔══╝██╔══██╗██║  ██║██╔══██╗██║   ██║██╔════╝████╗  ██║
  ██║  ██║███████║   ██║   ███████║███████║███████║██║   ██║█████╗  ██╔██╗ ██║
  ██║  ██║██╔══██║   ██║   ██╔══██║██╔══██║██╔══██║╚██╗ ██╔╝██╔══╝  ██║██╗██║
  ██████╔╝██║  ██║   ██║   ██║  ██║██║  ██║██║  ██║ ╚████╔╝ ███████╗██║╚████║
  ╚═════╝ ╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝  ╚═══╝  ╚══════╝╚═╝ ╚═══╝

License: GPL-3.0 Python 3.10+ Rich DataHaven

CLI tool for DataHaven — AI-First Decentralized Storage secured by EigenLayer

Verifiable storage for AI agents, ML models, and Web3 applications

FeaturesGetting StartedConfigurationUsageProject StructureFAQ


Official Links

Resource URL
Website https://datahaven.xyz
Documentation https://docs.datahaven.xyz
Litepaper https://datahaven.xyz/litepaper
GitHub Ecosystem https://github.com/datahaven-xyz/ecosystem
EigenLayer https://docs.eigenlayer.xyz
StorageHub https://github.com/polkadot-storage-hub/storage-hub
Snowbridge https://docs.snowbridge.network

Features

  • One-command dev workflow — Install, launch, test from a single menu
  • Local network orchestration — Launch DataHaven testnet via Kurtosis + Bun
  • E2E testing — Sequential and parallel test runners with contract injection
  • Contract toolchain — Forge build & test for Solidity smart contracts
  • Operator build — Cargo release builds with fast-runtime feature
  • Code generation — WAGMI bindings and Substrate runtime types
  • Docker integration — Build operator container images
  • Rich terminal UI — Interactive menu with panels and tables
  • Configurable paths — Override project root via DATAHAVEN_PROJECT_ROOT
  • CI-friendlyINJECT_CONTRACTS for faster E2E in pipelines
  • Cross-platform — Windows, macOS, Linux support
  • Minimal deps — Single dependency (Rich)
  • Settings panel — View paths and folder existence at a glance
  • Prerequisites checker — Lists required tools (Bun, Docker, Foundry, etc.)
  • About section — Project info and official links
  • GPL-3.0 licensed — Same as DataHaven ecosystem

Getting Started

Prerequisites

Tool Version Purpose
Python 3.10+ CLI runtime
Bun 1.3.2+ TypeScript/JS runtime for test suite
Docker Latest Container management
Foundry Latest Solidity (forge)
Rust Stable Operator build
Kurtosis Latest Network orchestration
Helm 3.x (optional) Kubernetes deployment
Zig Latest (optional) macOS cross-compilation

Install

cd datahaven-cli
pip install -r requirements.txt
python main.py

Dependencies

Package Version Purpose
rich ≥13.7.0 Terminal formatting, panels, tables

Configuration

Environment Variables

Variable Default Description
DATAHAVEN_PROJECT_ROOT Parent of datahaven-cli Root path for test/, contracts/, operator/
INJECT_CONTRACTS false Set to true to inject contracts in E2E (faster CI)

Example .env (optional)

# Use custom DataHaven monorepo location
DATAHAVEN_PROJECT_ROOT=/home/user/datahaven-ecosystem

# Enable contract injection for faster E2E in CI
INJECT_CONTRACTS=true

Expected Project Layout

The CLI expects the following structure under DATAHAVEN_PROJECT_ROOT:

datahaven-ecosystem/
├── test/          # E2E tests, Bun scripts, WAGMI generation
├── contracts/     # Solidity smart contracts (Foundry)
├── operator/      # Rust operator (Substrate)
├── deploy/        # Deployment configs
└── tools/         # Build and utility scripts

Usage

CLI Menu

┌─────────────────────────────────────────────────────────────────┐
│                            Menu                                  │
├────┬────────────────────────────────────────────────────────────┤
│ 1  │ Install Dependencies (test: bun i)                          │
│ 2  │ Launch Local Network (bun cli launch)                        │
│ 3  │ Run E2E Tests (bun teste2e)                                 │
│ 4  │ Run E2E Tests Parallel (bun teste2eparallel)                 │
│ 5  │ Contracts: Build (forge build)                              │
│ 6  │ Contracts: Test (forge test)                                 │
│ 7  │ Operator: Build (cargo build --release --features fast-runtime) │
│ 8  │ Operator: Test (cargo test)                                  │
│ 9  │ Regenerate WAGMI bindings                                    │
│ 10 │ Regenerate runtime types                                     │
│ 11 │ Build Docker image (operator)                                │
│ s  │ Settings (paths & env)                                       │
│ p  │ Prerequisites                                                │
│ a  │ About                                                        │
│ q  │ Quit                                                         │
└────┴────────────────────────────────────────────────────────────┘
Choice: _

Quick Start Workflow

# 1. Install CLI and run
pip install -r requirements.txt
python main.py

# 2. From menu: 1 (Install Dependencies)
# 3. From menu: 2 (Launch Local Network)
# 4. From menu: 3 or 4 (Run E2E Tests)

Project Structure

datahaven-cli/
├── main.py           # Entry point, Rich menu loop
├── actions.py        # Command handlers (bun, forge, cargo, docker)
├── config.py         # Paths, env vars, PATHS dict
├── requirements.txt  # Python dependencies
├── README.md
├── tags.txt          # GitHub topics
└── about/
    ├── README.md     # Short description
    └── TAGS.txt      # Topic list

FAQ

What is DataHaven?

DataHaven is an AI-first decentralized storage network secured by EigenLayer. It provides verifiable, tamper-proof storage for AI training data, ML models, and Web3 applications. Files are chunked, Merkle-rooted, and anchored on-chain for auditability.

Do I need the full DataHaven monorepo to use this CLI?

Yes. The CLI is a launcher for the DataHaven ecosystem. It expects test/, contracts/, and operator/ directories under the project root. Clone the datahaven-xyz/ecosystem repo and place datahaven-cli inside it, or set DATAHAVEN_PROJECT_ROOT to point to your monorepo.

Why does "Launch Local Network" fail?

Ensure Kurtosis and Bun are installed and in your PATH. The launch command runs bun cli launch from the test/ directory, which orchestrates the local network. Check that the test/ folder exists and contains the required scripts.

What does INJECT_CONTRACTS do?

When set to true, the CLI passes this env var to E2E tests. It enables contract injection, which can speed up test runs in CI by reusing pre-built contracts instead of rebuilding them each time.

Can I run this on Windows?

Yes. The CLI uses subprocess with shell=True on Windows for command execution. Ensure Bun, Docker, Foundry, and Rust are available in your environment (e.g., via WSL2 or native Windows installs).

How do I contribute?

Fork the repo, make changes, and open a PR. The project follows GPL-3.0. For DataHaven ecosystem contributions, see github.com/datahaven-xyz/ecosystem.

Is this production-ready?

This CLI is a developer tool for local development and testing. It is not intended for production deployment. Use it to build, test, and iterate on the DataHaven ecosystem locally.


Disclaimer

This project is for educational and testnet use only. DataHaven and this CLI are provided as-is. Use at your own risk. Always verify contracts and configurations before interacting with mainnet or real assets.


Support the project

0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1

Ethereum donations appreciated. If this tool helped you, consider giving it a ⭐

About

DataHaven CLI — Management tool for DataHaven AI-first decentralized storage secured by EigenLayer AVS with local network orchestration, E2E testing, Solidity contract toolchain (Foundry), Rust operator builds, WAGMI codegen, Docker integration, and Rich terminal UI

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

0