Skip to main content

Configuration File

httpcat-cli stores configuration at:
This file contains your encrypted private key. Never commit it to version control or share it publicly.

Configuration Structure

Environment Variables

Environment variables override config file settings.

Network & Connection

AI Agent

Display Preferences

Configuration Priority

Settings are resolved in this order (highest to lowest):
  1. Command-line flags (highest priority)
  2. Environment variables
  3. Config file (lowest priority)
Example:

Setup Wizard

Run the interactive setup wizard:
The wizard will prompt you for:

1. Wallet Setup

Choose one:
  • Import existing seed phrase (BIP-39 12/24 words)
  • Generate new seed phrase
  • Import via private key
Seed phrases enable multi-account HD wallet (BIP-32). Private keys create a single account.

2. Password Protection (Optional)

Set a password to encrypt your private key:
  • Default timeout: 15 minutes
  • Configurable timeout period
  • Auto-lock after timeout
Skip password for headless/automation scenarios.

3. Network Selection

Choose your network:
  • Base Sepolia (eip155:84532) - Testnet
  • Base (eip155:8453) - Mainnet

4. Agent URL

Default: https://agent.402.cat Custom URLs supported for local development or alternative deployments.

5. Preferences

  • ASCII Art: Enable/disable cat animations
  • Color Output: Enable/disable colored terminal output
  • Verbose Logging: Enable detailed logging

Account Management

Multi-Account Setup

httpcat-cli supports multiple accounts from a single seed phrase:
  • Account 0 (Custom): Your imported private key
  • Account 1+ (Seed-Derived): HD wallet accounts (BIP-32 path: m/44'/60'/0'/0/n)
Add new account:
Switch accounts:
List accounts:
Use specific account for a command:

Account Types

Environment Management

Switch between different deployment environments.

Pre-configured Environments

Commands

Custom Environment

Create custom environments for staging, private deployments, etc.:

Advanced Configuration

Manual Config Editing

Edit config file directly:

Reset Configuration

Remove all settings and start fresh:
This will:
  1. Delete ~/.config/httpcat/config.json
  2. Restart the setup wizard

Headless/Automation Setup

For CI/CD, automation, or scripts:
In CI/CD, always use secrets management for private keys. Never hardcode them in scripts or commit them to version control.

Password Management

Configure password behavior:
Timeout options:
  • 15 - Default, locks after 15 minutes
  • 0 - Never lock (not recommended for security)
  • Any number - Custom timeout in minutes
Remove password:

AI Agent Configuration

Configure AI assistant for natural language commands:

OpenAI Setup

Models:
  • gpt-4 (recommended)
  • gpt-4-turbo
  • gpt-3.5-turbo

Anthropic Setup

Models:
  • claude-3-5-sonnet-20241022 (recommended)
  • claude-3-opus-20240229

Security Best Practices

  • Never commit config.json to version control
  • Add ~/.config/httpcat to .gitignore
  • Use password protection for encrypted storage
  • Use environment variables in CI/CD (secrets management)
  • Rotate keys regularly
  • Use separate keys for testnet and mainnet
Ensure config file has restrictive permissions:
Only you (file owner) can read/write.
  • Use testnet (Base Sepolia) for testing
  • Double-check network before creating tokens
  • Verify agent URL matches your network
  • Mainnet transactions use real USDC
Back up:
  • Seed phrase (write down, store securely)
  • Private keys (encrypted backup)
  • Config file (for preferences only, not keys)
Recovery:
  • Restore seed phrase via httpcat config --reset
  • Import private key
  • Recreate preferences manually

Troubleshooting

Run the setup wizard:
Or create manually:
Fix file permissions:
Check current environment:
Force switch:
If issues persist, check environment variables:
If locked out:Option 1: Wait for timeout to expireOption 2: Reset config (loses preferences but keeps keys):
Option 3: Remove password from config file manually (not recommended)

Configuration Examples

Local Development

Production Trading

CI/CD Environment

Next Steps

Commands Reference

Learn all available commands

MCP Server

Use with AI assistants

x402 Protocol

Understand micropayments

API Reference

Build custom applications