@guardlabs/guardrail-cli
v0.1.6
Published
CLI for provisioning and using Guardrail, the Guard Labs wallet-control product for agents.
Maintainers
Readme
@guardlabs/guardrail-cli
CLI for provisioning and using Guardrail, the Guard Labs wallet-control product for agents.
Usage
Run without installing globally:
npx @guardlabs/guardrail-cli create --chain-id 84532Or install it globally:
npm install -g @guardlabs/guardrail-cli
guardrail --helpThe installed command name is guardrail.
By default, the CLI targets the hosted Guard Labs backend at https://api.guardlabs.ai.
Use --backend-url only when you want to target a local or self-hosted backend.
Examples in this README omit --backend-url for the hosted path. Add it back only for custom deployments.
Quickstart
Create a wallet request with an official USDC budget limited to $10 per trailing 24 hours:
npx @guardlabs/guardrail-cli create \
--chain-id 84532 \
--usdc-period daily \
--usdc-max 10 \
--usdc-allow transfer,approve,increaseAllowance,permit,transferWithAuthorizationWait for readiness:
npx @guardlabs/guardrail-cli await wal_xxxWhen the wallet reaches ready, the JSON output includes localStatePath and an agentMemoryReminder hint so agent runtimes can persist the wallet details into durable client memory. This means persistent cross-session memory, not a day-only log.
Check the wallet's official USDC balance on its configured chain:
npx @guardlabs/guardrail-cli usdc-balance wal_xxxUse the ready wallet:
npx @guardlabs/guardrail-cli call wal_xxx \
--to 0x1111111111111111111111111111111111111111 \
--data 0xa9059cbb \
--value-wei 0If the smart wallet is still undeployed, call deploys it automatically first.
Supported Chains
8453: Base84532: Base Sepolia
Docs
Full documentation lives in the repository:
- GitHub: https://github.com/guardlabs/guardrail
- Docs index: https://github.com/guardlabs/guardrail/blob/main/docs/README.md
- Quickstart: https://github.com/guardlabs/guardrail/blob/main/docs/quickstart.md
- CLI reference: https://github.com/guardlabs/guardrail/blob/main/docs/cli.md
