@yamo/cli
v1.3.13
Published
YAMO Protocol v0.4 - Command-line tools for blockchain integration
Readme
💻 YAMO CLI 
The Command Line Interface for the YAMO Protocol. Now powered by @yamo/core.
📦 Installation
# Global installation (recommended)
npm install -g @yamo/cli
# Or use npx (no installation needed)
npx @yamo/cli <command>⚙️ Configuration
Set environment variables or create a .env file:
CONTRACT_ADDRESS=0x3c9440fa8d604E732233ea17095e14be1a53b015
RPC_URL=https://ethereum-sepolia-rpc.publicnode.com
PRIVATE_KEY=0xYOUR_PRIVATE_KEY
# IPFS Settings (optional)
USE_REAL_IPFS=false
PINATA_JWT=your_pinata_jwt_if_using_real_ipfsNetworks
Sepolia Testnet (default):
- Contract:
0x3c9440fa8d604E732233ea17095e14be1a53b015 - RPC:
https://ethereum-sepolia-rpc.publicnode.com(free public RPC)
Local Development:
- Contract: Deploy using
@yamo/contracts - RPC:
http://127.0.0.1:8545
📖 Commands
yamo init <agent_name>
Creates a new block.yamo template.
# With global install
yamo init MyAgent
# With npx
npx @yamo/cli init MyAgentyamo hash <file>
Calculates the content hash formatted for blockchain submission.
yamo hash block.yamoyamo submit <file>
Submits a block to the chain.
--ipfs: Uploads content to IPFS. If the YAMO file containsoutput: file.json;, it will automatically create a Deep Bundle containing both the trace and the artifact.-e, --encrypt: Encrypts the IPFS bundle using AES-256-GCM.-k, --key <string>: The passphrase for encryption (or useYAMO_ENCRYPTION_KEYenv var).
# Basic submission
yamo submit block.yamo
# With IPFS
yamo submit block.yamo --ipfs
# With encryption
yamo submit block.yamo --ipfs --encrypt --key "my-secret"yamo audit <blockId>
Performs a cryptographic integrity check.
- Fetches block data from the chain.
- Downloads content from IPFS.
- Re-hashes the content locally.
- Asserts
LocalHash === ChainHash.
-k, --key <string>: Passphrase to decrypt the content if the bundle is encrypted.
# Audit without encryption
yamo audit block_001
# Audit encrypted content
yamo audit block_001 --key "my-secret"🔒 Encryption
YAMO v1.0 supports optional client-side encryption for IPFS bundles.
- Algorithm: AES-256-GCM (Authenticated Encryption).
- Key Derivation: Keys are derived from your passphrase using
scryptwith a random salt. - Metadata: Encrypted bundles include an
encryption_metadata.jsonfile with the salt and IVs. The actual content is opaque.
Example Encrypted Workflow:
# Submit with encryption
yamo submit task.yamo --ipfs --encrypt --key "my-secret"
# Audit encrypted block
yamo audit block_001 --key "my-secret"