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
| Key | Environment Variable | Description |
|---|---|---|
api_key | HOOKWATCH_API_KEY | Your HookWatch API key |
access_token | - | JWT access token (set automatically by hookwatch login) |
api_url | HOOKWATCH_API_URL | API base URL (used for browser login callback) |
grpc_url | HOOKWATCH_SERVER | gRPC server address (used for all CLI communication) |
forward_url | FORWARD_URL | Default 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.format | HOOKWATCH_OUTPUT | Output format: table or json |
output.color | NO_COLOR | Enable/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:
| Variable | Description |
|---|---|
HOOKWATCH_LOG_FILE | Path to debug log file |
GRPC_INSECURE | Set to true to use insecure gRPC (no TLS) |
NO_COLOR | Set any value to disable colored output |
Precedence
Configuration values are resolved in this order (highest to lowest priority):
- Command-line flags (e.g.,
--api-key) - Environment variables (e.g.,
HOOKWATCH_API_KEY) - Config file (
~/.hookwatch/config.yaml) - Default values
Security
Your config file contains your API key. Make sure it's not readable by others: chmod 600 ~/.hookwatch/config.yaml