Skip to main content

CLI Options

Global options and environment variables for AgentVault CLI.

Global Options​

OptionShortDescriptionDefault
--version-VOutput version number-
--help-hDisplay help-
--debugEnable debug modefalse
--verbose-vVerbose outputfalse
--config-cPath to config file./agent.yaml
--network-nNetwork (local, ic)local
--quiet-qSuppress outputfalse
--no-colorDisable colored outputfalse
--jsonJSON output formatfalse

Environment Variables​

ICP Configuration​

VariableDescriptionDefault
ICP_LOCAL_URLLocal replica URLhttp://127.0.0.1:4943
ICP_MAINNET_URLMainnet URLhttps://ic0.app
ICP_NETWORKDefault networklocal
ICP_IDENTITYdfx identity namedefault
ICP_TIMEOUTRequest timeout (ms)30000

Ethereum Configuration​

VariableDescription
ETHEREUM_RPC_URLEthereum mainnet RPC URL
SEPOLIA_RPC_URLSepolia testnet RPC URL
INFURA_API_KEYInfura API key
ETHERSCAN_API_KEYEtherscan API key

Solana Configuration​

VariableDescription
SOLANA_RPC_URLSolana RPC URL
SOLANA_MAINNET_RPC_URLSolana mainnet URL
SOLANA_DEVNET_RPC_URLSolana devnet URL

Polkadot Configuration​

VariableDescription
POLKADOT_RPC_URLPolkadot RPC URL
KUSAMA_RPC_URLKusama RPC URL

Application Settings​

VariableDescriptionDefault
AGENTVAULT_DEBUGEnable debug modefalse
AGENTVAULT_LOG_LEVELLog levelinfo
AGENTVAULT_CACHE_DIRCache directory~/.agentvault
AGENTVAULT_CONFIG_DIRConfig directory~/.agentvault/config
AGENTVAULT_DATA_DIRData directory~/.agentvault/data

Configuration Files​

agent.yaml​

Agent configuration file (project root):

name: my-agent
entry: src/index.ts
memory: 256
compute: medium
cycles: 1000000000000

icp.yaml​

ICP deployment configuration:

environments:
local:
network:
type: local
production:
network:
type: ic

.env​

Environment variables file:

ICP_LOCAL_URL=http://127.0.0.1:4943
ETHEREUM_RPC_URL=https://mainnet.infura.io/v3/KEY

Directory Structure​

~/.agentvault/
├── config/ # Configuration files
├── data/ # Local data storage
├── wallets/ # Wallet storage
│ └── {agentId}/
│ └── {walletId}.wallet
├── backups/ # Backup storage
├── cache/ # Cache directory
└── logs/ # Log files

Exit Codes​

CodeDescription
0Success
1General error
2Invalid arguments
3Configuration error
4Network error
5Authentication error
6Permission denied
7Resource not found
8Timeout
9Interrupted

Output Formats​

Most commands support multiple output formats:

# Table format (default)
agentvault list

# JSON format
agentvault list --json

# ID only
agentvault list --format ids

Logging​

Control log verbosity:

# Debug level
agentvault --debug deploy

# Environment variable
AGENTVAULT_LOG_LEVEL=debug agentvault deploy

# Quiet mode
agentvault --quiet deploy

Configuration Precedence​

Configuration values are resolved in this order (highest priority first):

  1. CLI flags
  2. Environment variables
  3. .env file
  4. icp.yaml
  5. agent.yaml
  6. Default values

Examples​

Using Environment Variables​

# Set network
export ICP_NETWORK=ic
agentvault deploy

# Set RPC URL
export ETHEREUM_RPC_URL=https://eth.example.com
agentvault wallet balance --chain ethereum

Using .env File​

# Create .env
cat > .env << EOF
ICP_NETWORK=local
ETHEREUM_RPC_URL=https://mainnet.infura.io/v3/KEY
EOF

# Run command (automatically loads .env)
agentvault deploy

Using Config File​

# Specify config file
agentvault deploy --config ./staging.yaml