@techdigger/humanode-agentlink-cli
v0.4.1
Published
Scaffold, link, and inspect Biomapper-ready agent projects.
Maintainers
Readme
@techdigger/humanode-agentlink-cli
Scaffold, link, and inspect Biomapper-ready agent projects.
agentlink is the default entrypoint for agent developers:
agentlink keystorestores, reads, or removes the encrypted local agent keyagentlink initscaffolds a starter for LangChain, Vercel AI SDK, or MCPagentlink linkgenerates agent consent, builds a self-contained local/dev linker URL, and can open it in your browseragentlink statuschecks whether an agent is linked and activeagentlink requestsends signed test requests to protected endpointsagentlink authorize-linkremains available for lower-level manual linking flows
Generated starters also include local link, status, and authorize-link package scripts, so you can run them from inside the scaffolded project after installing dependencies.
Quick start
pnpm dlx @techdigger/humanode-agentlink-cli init my-agent
cd my-agentFill in .env.local with non-secret local settings such as BIOMAPPER_NETWORK and BIOMAPPER_REGISTRY, then generate a linker URL for the owner wallet:
agentlink link --owner 0xOwner --openAfter the owner completes linking in the browser, check the result:
agentlink statusLinked agents can use AgentLink-aware services such as the Humanode two-for-one flow. In that flow, the agent pays $1.00 USDC through x402, the service verifies the signed agentlink header, and a linked first-call agent receives $2.00 USDC back for that Biomapper generation. See the Agent Developer Guide for the full caller setup.
For the first protected-route test, start with a free-trial route before moving to stricter gating or more complex payment flows.
Send a signed request to a protected route:
agentlink request https://api.example.com/data --network base-sepoliaCommands
agentlink init
Scaffold a TypeScript starter for:
langchainvercel-ai-sdkmcp
Example:
agentlink init my-agent --template langchain --network base-sepolia --registry 0xRegistryWhen you scaffold from this repo checkout, init automatically uses local file: dependencies for the Biomapper packages. Add --package-source npm to force npm package versions instead.
agentlink link
Generate consent, create a self-contained local/dev linker URL, and optionally open it:
agentlink link --owner 0xOwner --registry 0xRegistry --network base-sepolia --openThe CLI does not submit linkAgent(...) itself. The owner still completes the on-chain transaction in the linker UI.
agentlink link is the local/self-contained flow. Hosted production linkers should create and store sessions server-side with buildHostedLinkUrl(...) and the same-origin session lookup endpoint instead of embedding the full session in the URL.
Prefer agentlink keystore set, --private-key-stdin, or an external secret manager for private keys. --private-key remains available for compatibility, but it is best treated as a dev-only shortcut because argv can leak into shell history and process inspection.
agentlink status
Check whether the current agent is linked and active:
agentlink status --registry 0xRegistry --network base-sepoliaPass --agent 0xAgent to check a specific agent without loading a key, or provide a private key via agentlink keystore set, --private-key-stdin, or --private-key when you want the CLI to derive the agent address for you.
agentlink authorize-link
Generate the raw one-time EIP-712 consent blob for manual or platform-managed flows:
agentlink authorize-link --owner 0xOwner --registry 0xRegistry --deadline 1735689600 --network base-sepoliaEnvironment
agentlink automatically loads .env and .env.local for non-secret configuration.
BIOMAPPER_NETWORKBIOMAPPER_REGISTRYBIOMAPPER_RPC_URLBIOMAPPER_LINKER_URLAGENT_PRIVATE_KEY— used automatically when--private-keyis not passed
For the full flow, examples, and hosted-link details, see the Agent Developer Guide.
