Configuration

Manage CLI settings with a persistent configuration file. Set defaults for API keys, URLs, and output preferences.

Config File Location

The CLI stores configuration in ~/.hookwatch/config.yaml.

Terminal

Initialize Configuration

Create a new config file with default settings:

Terminal

View Configuration

Display current configuration:

Terminal

Set Values

Update configuration values:

Terminal

Get a Value

Retrieve a specific configuration value:

Terminal

Configuration Options

KeyEnvironment VariableDescription
api_keyHOOKWATCH_API_KEYYour HookWatch API key
access_token-JWT access token (set automatically by hookwatch login)
api_urlHOOKWATCH_API_URLAPI base URL (used for browser login callback)
grpc_urlHOOKWATCH_SERVERgRPC server address (used for all CLI communication)
forward_urlFORWARD_URLDefault URL for webhook forwarding
webhook_url-Base URL for webhook endpoints
ws_url-WebSocket service URL
ws_forward_url-Default local URL for WebSocket forwarding
agent_name-Name of this CLI agent (set by hookwatch agent register)
agent_id-Unique ID of this CLI agent
output.formatHOOKWATCH_OUTPUTOutput format: table or json
output.colorNO_COLOREnable/disable colored output
output.verbose-Enable/disable verbose output

Example Config File

~/.hookwatch/config.yaml

Additional Environment Variables

These environment variables provide extra control but don't map to config file keys:

VariableDescription
HOOKWATCH_LOG_FILEPath to debug log file
GRPC_INSECURESet to true to use insecure gRPC (no TLS)
NO_COLORSet any value to disable colored output

Precedence

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

  1. Command-line flags (e.g., --api-key)
  2. Environment variables (e.g., HOOKWATCH_API_KEY)
  3. Config file (~/.hookwatch/config.yaml)
  4. Default values

Security

Your config file contains your API key. Make sure it's not readable by others: chmod 600 ~/.hookwatch/config.yaml

Related