Skip to content

CLI commands

Every script in scripts/, one at a time.

scripts/deploy.mjs

Deploy all three contracts (or a subset).

bash
node --env-file=.env scripts/deploy.mjs
EnvPurpose
DEPLOYER_PRIVATE_KEYcreator wallet for deployment
RPC_URLdefaults to https://sepolia.base.org
CHAIN_IDdefaults to 84532
ONLYcomma-separated subset: AgentMemory,AgentReputation
AGENT_REGISTRY_ADDRESSskip AgentRegistry, reuse this address

scripts/verify.mjs

Verify deployed contracts via Etherscan V2 API.

bash
node --env-file=.env scripts/verify.mjs
EnvPurpose
ETHERSCAN_API_KEYrequired — get at etherscan.io/myapikey
CHAIN_IDdefault 84532

scripts/agent-register.mjs

Register a new agent with IPFS metadata pinning and auto-delegation.

bash
node --env-file=.env scripts/agent-register.mjs examples/my-agent.json [flags]
FlagEffect
--dry-runprint plan, no txs
--no-delegateregister without delegation
--keyfile <path>reuse existing agent wallet
EnvPurpose
DEPLOYER_PRIVATE_KEY or CREATOR_PRIVATE_KEYcreator
PINATA_JWTrequired (or PIN_PROVIDER=none)
W3S_TOKENoptional, for dual-pinning
PIN_PROVIDERSe.g., pinata,storacha
KEYSTORE_PASSWORDskip interactive password prompt
DELEGATION_DAYSdefault 365
AGENT_REGISTRY_ADDRESSoverride deployments.json

scripts/agent-action.mjs

Act as a registered agent from its keystore.

bash
node scripts/agent-action.mjs agents/<keystore>.json <command> [args]
CommandArgsAccess
statusread-only
balanceread-only
update-capabilities"<text>"requires password
update-endpoint"<url>"requires password
set-statusactive / paused / retiredrequires password
request-attestation<issuer-addr> "<desc>"requires password
help

scripts/issue-attestation.mjs

Authority-side: issue, fulfill, revoke, list.

bash
# Issue
node --env-file=.env scripts/issue-attestation.mjs <agent-id> \
  --type "skill:..." --description "..." [--uri "ipfs://..."]

# Fulfill a pending request
node --env-file=.env scripts/issue-attestation.mjs --fulfill <request-id> \
  --type "..." --description "..."

# Revoke your own attestation
node --env-file=.env scripts/issue-attestation.mjs --revoke <attestation-id>

# List pending requests to your address
node --env-file=.env scripts/issue-attestation.mjs --list-requests
FlagPurpose
--keyfile <path>use a specific authority keystore
EnvPurpose
AUTHORITY_PRIVATE_KEYpreferred — dedicated authority key
DEPLOYER_PRIVATE_KEYfallback — same as deployer

scripts/migrate-keystore.mjs

Convert a v1 (plaintext) keystore to v2 (encrypted).

bash
node scripts/migrate-keystore.mjs agents/<keystore>.json

Writes a .v1-backup-<timestamp> file alongside the original. Delete the backup after confirming the encrypted version works.

scripts/pin-asset.mjs

Pin any binary file (SVG, PNG, JSON, etc.) to Pinata.

bash
node --env-file=.env scripts/pin-asset.mjs landing/assets/avatar.svg

Prints the CID, ipfs:// URI, and gateway URL.

scripts/preview-site.sh

Locally assemble and serve the full site (landing + app + docs).

bash
./scripts/preview-site.sh          # localhost:8081
./scripts/preview-site.sh 9000     # custom port

Mirrors the GitHub Pages workflow.

Further reading

A public-good project — no token, no fees, no gatekeepers. Released under the MIT License.