Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Tangle CLI
Create, run, and operate blueprints on the Tangle EVM and EigenLayer.
Table of Contents
- Tangle CLI
Overview
The CLI bundles every workflow needed for the EVM-only SDK:
cargo tangle blueprint createscaffolds a new blueprint from the templates.cargo tangle blueprint run --protocol tangleboots a manager connected to the Tangle v2 contracts.cargo tangle blueprint register-tangleregisters an operator againstITangle,MultiAssetDelegation, andOperatorStatusRegistry.cargo tangle key *manages local and remote k256 keys viablueprint-keystore.
All Substrate helpers have been removed; the CLI now targets EVM-first flows only.
Installation
Linux, macOS, and Windows (WSL2) are supported.
Feature flags
The CLI supports optional features that can be enabled at build time:
remote-providers - Enables cloud deployment functionality
Adds support for deploying blueprints to AWS, GCP, Azure, DigitalOcean, and Vultr. This enables the cargo tangle cloud subcommand and the --remote flag for blueprint deployment.
Without this feature, cloud commands are not available and using --remote will show:
❌ Remote deployment requires the 'remote-providers' feature.
Build with: cargo build --features remote-providers
vm-debug - Enables VM sandbox debugging (Linux only)
Creating a New Blueprint
The scaffold asks for a source template, optional variables, and whether to skip prompts. The generated workspace already depends on blueprint-sdk with the tangle feature.
For Tangle blueprints, the scaffold also includes a
metadata/blueprint-metadata.json file. Publish that JSON to IPFS or HTTPS,
then set the resulting URI as metadata_uri in your deploy definition. Add
either metadata_hash or metadata_file as well so the deploy manifest pins
the expected payload digest onchain. The URI is what lands onchain; the full
JSON stays offchain and is what
tangle-cloud ingests to render tier-2 hosted blueprint surfaces.
For production tier-2 hosting, publish to ipfs:// and include an owner-signed
metadata attestation. If the shared host cannot verify provenance, it falls
back to the protocol-controlled generic blueprint UI.
Running a Blueprint on Tangle
The runner expects RPC URLs, a keystore, and the EVM contract coordinates. You can provide them via CLI flags or a settings.env file that the command loads before boot.
BLUEPRINT_ID=0 \
SERVICE_ID=0 \
TANGLE_CONTRACT=0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9 \
STAKING_CONTRACT=0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0 \
STATUS_REGISTRY_CONTRACT=0x5f3f1dBD7B74C6B46e8c44f98792A1dAf8d69154 \
| Variable | Description |
|---|---|
BLUEPRINT_ID |
Blueprint registered on ITangle. |
SERVICE_ID |
Optional fixed service (leave unset to process all). |
TANGLE_CONTRACT |
ITangle contract address. |
STAKING_CONTRACT |
MultiAssetDelegation staking contract. |
STATUS_REGISTRY_CONTRACT |
OperatorStatusRegistry heartbeat contract. |
The CLI automatically ensures an ECDSA key exists under --keystore-path and derives the operator address from it.
Registering an Operator
register-tangle performs the on-chain registration + announcement flow in one command:
You can optionally set --rpc-endpoint to push metadata to a remote operator directory service during registration.
Service Lifecycle Commands
The cargo tangle blueprint service namespace mirrors everything exposed in Tangle.sol:
service requestsubmits a pending service with per-operator exposures, rich config payloads, and optional asset security requirements.service approve/service rejectlets operators respond to a request; approvals can include explicit asset commitments when the request included requirements.service join/service leavelet operators participate in dynamic membership services; leaving succeeds when the service's exit queue allows the legacy helper.service listandservice requestssurface active services vs. pending requests, with a--jsontoggle for scripting.
Requesting a Service
- Provide one
--operator-exposure-bpsper operator (basis points, 10_000 = 100%). Leave unset to fall back to the default BPS of 100% per operator. - Security requirements use the format
KIND:TOKEN:MIN:MAXwhereKINDisnativeorerc20. Use_/0for the native token placeholder. - TTLs are expressed in seconds to match the
Tangle.solschema.
Approving or Rejecting
# Simple staking approval
# Approval that matches request-level security requirements
--security-commitmentmirrors theKIND:TOKEN:EXPOSUREstructure expected byapproveServiceWithCommitments.- Use
service reject --request-id <ID>to decline participation.
Listing Services/Requests
Both commands read via TangleClient::{list_services,list_service_requests} and print either friendly tables or JSON for automation.
Blueprint Upgrade Flow
Shipping a new build of a blueprint touches three actors. The CLI gives each of them a first-class subcommand surface so nobody has to hand-craft calldata.
┌─────────────────────┐
│ blueprint owner │ publish-version → set-active-version
└─────────┬───────────┘
│
▼
┌─────────────────────┐
│ auditor / scanner │ attest submit → (optional) attest revoke
└─────────┬───────────┘
│
▼
┌─────────────────────┐
│ service operator │ service set-policy → service ack-version
└─────────────────────┘
1. Publish a new version (blueprint owner)
# Hash the artifact locally, pin to IPFS, and submit publishBinaryVersion.
--binary <path>is hashed (sha256) locally; the digest becomessha256Hashon-chain.- Provide either
--binary-uri ipfs://<cid>(you've already pinned) or--pin-to-ipfs(the CLI pins viaIPFS_API_URL+IPFS_API_TOKENif set, orPINATA_JWTas a fallback). --attestation-bundle <path>is hashed and stored asattestationHash. Pass--attestation-hash <hex>to override directly (e.g. when the bundle lives off-disk).
The command prints the new version_id and tx hash. In JSON mode the
output is a single line you can pipe to jq:
Promote (or roll back) the active pointer once you're ready:
2. Attest as an auditor
# Hash the audit report locally, pin it, and emit attestBinaryVersion.
--reportaccepts either a local file (which is hashed; optionally pinned via--pin-report-to-ipfs) or a remote URL (https://...,ipfs://...). When passing a URL, pre-compute the hash and feed it via--report-hash <hex>.--kindis one ofAUDIT,FUZZ,FORMAL,BUG_BOUNTY,SELF.--severitymaps to the on-chain uint8 ladder:none/info/low/med/high/critical.--expires-inaccepts human durations (6m,30d,1y,90d12h); omit for non-expiring.
Other attest commands:
3. Adopt the upgrade as an operator
Set the policy once, then ack each new version under APPROVE:
# Pick a policy: AUTO (follow blueprint owner), APPROVE (opt-in), MANUAL (pin to genesis).
# Opt in to a specific version.
# Inspect what's actually running and how far ahead the upstream is.
upgrade-status prints the policy, the operator's acked version, the
blueprint's active version, the effective version the manager will dispatch
against, and the latest published version — exactly what an operator-facing
dashboard needs.
CI gating: trust score
# Compute the weighted trust score the dapp would render for version 3.
The score walks every non-revoked, non-expired attestation, looks each
attester up in BlueprintAuditors, and produces a normalized 0..=100
number plus per-attestation diagnostics. Without --auditors-contract the
score collapses to zero (all attesters treated as anonymous) — the flag
should always be set in production.
IPFS configuration
Two environment knobs:
# Generic (Kubo / w3up / any service that accepts multipart/form-data + Bearer):
IPFS_API_URL=https://api.web3.storage/upload IPFS_API_TOKEN=eyJ...
# Pinata fallback (only used if IPFS_API_URL is unset):
PINATA_JWT=eyJhbGciOi...
Pin endpoints must return JSON containing one of cid, Hash, or
IpfsHash; the resulting ipfs://<cid> URI is what lands on-chain.
One-command shipping (cargo tangle blueprint ship)
For the common case — "I just landed a feature, build the binary, pin it,
publish the new version, and promote it" — there is cargo tangle blueprint ship.
It composes all the above steps into a single interactive flow:
$ cargo tangle blueprint ship
🚀 Shipping blueprint: blueprintId=7 (/home/me/my-blueprint)
RPC https://sepolia.base.org
Wallet 0xAbC...123 ✓ blueprint owner
? Build a release binary now? › Yes
> Building: cargo build --release -p my-blueprint
sha256 0x9af3… (6.21 MB)
? Pin binary to IPFS? › Yes
binaryUri ipfs://bafyb…
? Publish v? on-chain (blueprint=7)? › Yes
✓ Published v3 (block 184221)
? Promote to active version? › Yes
✓ Promoted v3 (tx 0x…)
── Shipped v3 ─────────────────────────────
sha256 0x9af3…
binaryUri ipfs://bafyb…
promoted true
block 184221
tx_hash 0x…
Auto-detection
The wizard tries (in order) --blueprint-id, BLUEPRINT_ID= in
./settings.env, then blueprintId in ./metadata/blueprint-metadata.json.
It picks the first non-zero value.
CI mode
Skip all prompts with --yes:
In --yes mode the wizard prints one JSON event per phase, with the final
ship_complete event carrying the new version_id, the publish tx, and
whether setActiveBinaryVersion ran. The
tangle-network/blueprint/.github/actions/ship-release
composite action consumes that JSON to populate its outputs.
Common flag matrix
| Flag | Effect |
|---|---|
--yes |
Accept every prompt; switch output to JSON |
--dry-run |
Hash + (optionally) pin + report; submit nothing |
--no-build --binary <path> |
Skip cargo build; ship a pre-built artifact |
--binary-uri ipfs://… |
Skip IPFS pin; assume URI is already addressable |
--no-promote |
Publish but don't setActiveBinaryVersion |
--policy-services 42,43 |
Bulk-flip listed services into AUTO policy |
--attestation-bundle <path> |
Hash the bundle and store its sha256 on-chain |
--attestation-hash 0x… |
Use a pre-computed attestationHash |
Manual-with-assist (operator local-authz)
For operators on MANUAL policy who want the manager to swap into specific
versions but don't want to (a) move out of MANUAL on-chain or (b) spend gas
on ackBinaryVersion, the manager exposes a local authorization layer.
Pre-authorized swaps still run the full sha256+attestation gate — the only
thing the operator is sidestepping is the audit-trail tx.
# List what versions the manager sees on-chain (no chain calls — talks to the
# local manager's /upgrades/{service_id}/available).
# Pre-authorize a single one-shot swap to v3 the next time it becomes effective.
# Stage a fleet-wide rollout: every version in this list is acceptable.
# Explicitly skip v3 (canary regression). Reason lands in the manager's audit log.
# Show what local-authz state the manager is holding for this service.
Manager URL resolution (highest wins): --manager-url → BLUEPRINT_MANAGER_URL
env → http://127.0.0.1:9000. The pre-authorization persists in
<manager-data-dir>/upgrade-authz/<serviceId>.json, so the operator can stage
a pin/whitelist during a maintenance window and walk away — a restart of
the manager rebuilds the state cleanly.
Cloud Deployment
Note: Cloud deployment requires the
remote-providersfeature flag. See Feature flags for installation instructions.
The Tangle CLI supports deploying blueprints to cloud providers for scalable, distributed execution:
Configure Cloud Provider
# Configure AWS
# Configure GCP
# Configure other providers
Cost Estimation
# Compare costs across all providers
# Estimate for specific provider with spot pricing
# GPU-enabled instances
Deploy Blueprint to Cloud
# Deploy with remote deployment flag
# Deploy with specific policy
Monitor Cloud Deployments
# Check status of all deployments
# Check specific deployment
# Terminate deployment
Preflight and TEE Readiness
# Validate credentials/provider readiness and print manager bootstrap env
# Validate fail-closed TEE readiness (including cryptographic verifier requirements)
# Write bootstrap env directly to file
Spawning a Service Runtime
Kick off the blueprint manager using a specific runtime without re-running the full deploy flow:
The command reuses the same manager wiring as cargo tangle blueprint run, so any RPC endpoint + runtime combo works (VM/native/container). For devnet, omit the overrides and the defaults point at the local harness.
Key Management
All keys are EVM-native. Use the cargo tangle key subcommands to handle k256 material:
# Generate a new operator key
# Import an existing hex secret into the keystore
# List local keys
The keystore supports filesystem, in-memory, and remote HSM backends through blueprint-keystore.
EigenLayer Helpers
EigenLayer support remains available under cargo tangle blueprint eigenlayer <subcommand>. Use it to register AVSs, list allocations, or run the EigenLayer manager by supplying the addresses exported from the EigenLayer contracts.
Operator Status
Inspect the latest heartbeat/online status from OperatorStatusRegistry:
Omit --operator to query the locally configured operator. Add --json for machine-friendly output (timestamp, raw status code, online boolean).
Need More?
- End-to-end demos and advanced options live on the CLI reference.
- For pricing/QoS flows, combine the CLI with
crates/pricing-engineand the newOPERATOR_*env vars described in that README.
The manager will:
- Read all active AVS registrations from
~/.tangle/eigenlayer_registrations.json - Spawn a separate blueprint instance for each AVS
- Monitor rewards and slashing events
- Auto-restart failed blueprints
5. Deregister from an AVS
EigenLayer Command Reference
eigenlayer register
Register with a new EigenLayer AVS.
Arguments:
--config: Path to JSON configuration file--keystore-uri: Keystore path (default:./keystore)--runtime: Runtime target (native,hypervisor,container) - overrides config file--verify: Perform on-chain verification (optional)
Aliases: reg
eigenlayer deregister
Deregister from an EigenLayer AVS.
Arguments:
--service-manager: Service manager contract address--keystore-uri: Keystore path (default:./keystore)
Aliases: dereg
eigenlayer list
List all registered AVS services.
Arguments:
--active-only: Show only active registrations--format: Output format:table(default) orjson
Aliases: ls
eigenlayer sync
Synchronize local registrations with on-chain state.
Arguments:
--http-rpc-url: HTTP RPC endpoint (default:http://127.0.0.1:8545)--keystore-uri: Keystore path (default:./keystore)--settings-file: Protocol settings file (optional)
Runtime Targets
Each AVS can specify its execution runtime:
-
native- Bare process (no sandbox)- Fastest startup and lowest overhead
- For testing only - no isolation
- Direct process execution
-
hypervisor- cloud-hypervisor VM (default)- Production-ready VM isolation
- Strong security boundaries
- Resource limits enforced
- Recommended for production
-
container- Docker/Kata containers (Coming Soon)- Not yet implemented
- For now, use
nativefor testing orhypervisorfor production
Set via config file or override via CLI --runtime flag.
Generating Keys from the Command Line
The following command will generate a keypair for a given key type:
cargo tangle blueprint generate-keys -k <KEY_TYPE> -p <PATH> -s <SURI/SEED> --show-secret
where it is optional to include the path, seed, or the show-secret flags.
Flags
-kor--key-type: Required flag. The key type to generate (sr25519, ecdsa, bls_bn254, ed25519, bls381).-por--path: The path to write the generated keypair to. If not provided, the keypair will be written solely to stdout.-sor--seed: The suri/seed to generate the keypair from. If not provided, a random keypair will be generated.--show-secret: Denotes that the Private Key should also be printed to stdout. If not provided, only the public key will be printed.
For all of our features for created and using keys, see the key management section of our CLI docs.