Skip to main content

Installation Methods

httpcat-cli can be installed in multiple ways depending on your preference and workflow. Install globally via npm for the best experience:
npm install -g httpcat-cli
After installation, the httpcat command will be available system-wide. Verify installation:
httpcat --version

npx (No Install Required)

Use npx to run httpcat without installing:
npx httpcat-cli@latest
This always uses the latest version but takes slightly longer to start since it downloads the package each time. Useful for:
  • Quick one-off commands
  • CI/CD pipelines
  • Trying before installing
  • Always using the latest version

Homebrew (macOS/Linux)

Install via Homebrew tap:
brew tap hathbanger/httpcat
brew install httpcat
Update to latest:
brew upgrade httpcat

System Requirements

  • Node.js: 18.0.0 or higher
  • Operating Systems: macOS, Linux, Windows (via WSL recommended)
  • Network: Base Sepolia or Base mainnet access

Configuration

After installation, run the setup wizard:
httpcat config
This will guide you through:
  1. Wallet Setup: Import or generate a private key
  2. Network Selection: Base Sepolia (testnet) or Base (mainnet)
  3. Preferences: ASCII art, color output, etc.
Configuration is stored at: ~/.config/httpcat/config.json
Never commit your config.json file to version control. It contains your encrypted private key.

Verification

Test your installation:
# Check if the agent is reachable
httpcat health

# Check your wallet balance
httpcat balance

# View help
httpcat --help

Upgrading

npm update -g httpcat-cli

Uninstallation

npm uninstall -g httpcat-cli
To remove configuration:
rm -rf ~/.config/httpcat

Troubleshooting

Make sure npm’s global bin directory is in your PATH:
npm config get prefix
Add $(npm config get prefix)/bin to your PATH in ~/.bashrc or ~/.zshrc:
export PATH="$(npm config get prefix)/bin:$PATH"
Use one of these solutions:Option 1: Use npx instead (no permission issues)Option 2: Fix npm permissions:
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
Then retry the installation.
If you see connection errors:
  1. Check your internet connection
  2. Verify you can reach the agent:
    curl https://agent.402.cat/health
    
  3. Check if you’re behind a proxy/firewall
  4. Try setting a custom agent URL:
    export HTTPCAT_AGENT_URL=https://agent.402.cat
    
httpcat-cli requires Node.js 18 or higher.Check your version:
node --version
Upgrade Node.js:
  • nvm: nvm install 18 && nvm use 18
  • Homebrew: brew upgrade node
  • Download: nodejs.org

Next Steps