CLI REFERENCE

hellhound CLI

Complete reference for every command, flag, and option.
Current version: 1.0.0

$ npm install -g hellhound-cli
INSTALLATION

Installing the CLI

Hellhound requires Node.js 18 or higher.

# Install globally
$ npm install -g hellhound-cli
# Verify installation
$ hellhound --version
# Update to latest version
$ npm update -g hellhound-cli
# Uninstall
$ npm uninstall -g hellhound-cli

Supported platforms:

  • macOS (Intel and Apple Silicon)
  • Linux (x86_64, ARM64)
  • Windows (via WSL recommended)

Native Windows (cmd.exe, PowerShell) is supported but heartbeat monitoring for --pid attach mode requires Linux or macOS. All other features work on Windows.

GLOBAL FLAGS

Global flags

These flags work with every command.

Flag Default Description
--help Show help for any command
--version Print version and exit
# Get help for any command
hellhound --help
hellhound watch --help
hellhound alert --help
COMMAND

hellhound init

Link the CLI to your Hellhound account. Creates your account if it does not exist, or links to an existing account. Saves your API key to ~/.hellhound/config.json.

Run this once per machine.

hellhound init [options]
hellhound init

Example output:

$ hellhound init
Email: ops@agency.com
API key (from hellhound.dev/account): hh_live_xxxxxxxxxx
🐕 Hellhound initialized!
Config saved to ~/.hellhound/config.json
Start monitoring:
hellhound watch --name "my-agent" --run "node agent.js"

What it does:

  1. Prompts for your email address
  2. Prompts for your API key (find your key at hellhound.dev/account)
  3. Verifies the key is valid
  4. Saves config to ~/.hellhound/config.json

If you already have a config file, running hellhound init again will show your current configuration without overwriting it. To switch to a different account or API key, delete ~/.hellhound/config.json and run init again.

COMMAND

hellhound watch

Monitor a task automation — one that runs and exits. Wraps your existing command. Your automation code is unchanged.

Use watch for:

  • Scheduled scripts that run and complete
  • Cron jobs
  • One-off automations triggered by events
  • Pipelines with a defined start and end

Use hellhound attach instead for long-running agents.

hellhound watch --name <name> --run <command> [options]

Required flags:

Flag Description
--name <name> required Unique name for this automation (e.g. "lead-pipeline")
--run <cmd> required The command to run (wrap in quotes if it has spaces)

Optional flags:

Flag Default Description
--timeout <secs> none Kill agent after N seconds if still running
# Monitor a Node.js script
hellhound watch --name "lead-pipeline" --run "node pipeline.js"
# Monitor a Python script
hellhound watch --name "invoice-processor" --run "python process.py"
# Monitor a shell script
hellhound watch --name "backup-job" --run "./backup.sh"
# Monitor with arguments passed to the script
hellhound watch --name "daily-report" --run "node report.js --date today"
# Monitor with a timeout (kill after 5 minutes)
hellhound watch --name "api-scraper" --run "node scrape.js" --timeout 300

Example output:

$ hellhound watch --name "lead-pipeline" --run "node pipeline.js"
[Hellhound] Watching: lead-pipeline
[Hellhound] Command: node pipeline.js
[Hellhound] Reading all stdout automatically
[agent output appears here in real time]
[Hellhound] ✓ Run complete (14.2s)
[Hellhound] Run #47 recorded

How it works:

  1. hellhound watch starts your command as a child process
  2. All stdout and stderr is captured and forwarded to Hellhound
  3. When the process exits, the run is recorded with:
    • — Duration
    • — Exit code
    • — Output length
  4. Hellhound compares against your baseline
  5. If anomaly detected, alerts are sent

Important — replacing your existing command:

If your automation currently runs like this:

node agent.js (direct)
python /path/to/agent.py (direct)
bash /scripts/pipeline.sh (direct)

Replace it with:

hellhound watch --name "agent-name" --run "node agent.js"
hellhound watch --name "agent-name" --run "python /path/to/agent.py"
hellhound watch --name "agent-name" --run "bash /scripts/pipeline.sh"

In your crontab:

# Before
*/15 * * * * /usr/bin/node /home/user/agent.js
# After
*/15 * * * * hellhound watch --name "my-agent" --run "/usr/bin/node /home/user/agent.js"
COMMAND

hellhound attach

Monitor a long-running automation — one that runs continuously and never exits on its own.

Use attach for:

  • Always-on agents that listen for events
  • Background workers processing queues
  • WebSocket servers
  • Any process that runs indefinitely

Use hellhound watch instead for task automations that run and exit.

# Start a new process and attach
hellhound attach --name <name> --run <command> [options]
# Attach to an already-running process by PID
hellhound attach --name <name> --pid <pid> [options]

Required flags (choose one):

Flag Description
--name <name> required Unique name for this automation
--run <command> Start this command and attach to it
OR
--name <name> required Unique name for this automation
--pid <pid> Attach to already-running process with this PID

Optional flags:

Flag Default Description
--heartbeat <secs> 30 Send heartbeat every N seconds
# Start and attach to a Node.js long-running agent
hellhound attach --name "support-bot" --run "node bot.js"
# Start and attach to a Python worker
hellhound attach --name "queue-worker" --run "python worker.py"
# Attach to already-running process (get PID with: ps aux | grep agent)
hellhound attach --name "my-agent" --pid 48291
# Custom heartbeat interval (send heartbeat every 60 seconds)
hellhound attach --name "my-agent" --run "node agent.js" --heartbeat 60

Heartbeat detection:

When using hellhound attach, Hellhound sends a heartbeat signal to the server every --heartbeat seconds (default: 30).

If the server stops receiving heartbeats for 2x the heartbeat interval, it marks the agent as dead and sends an alert.

This catches:

  • — Process crashes that close silently
  • — Frozen processes (running but not doing anything)
  • — Network connectivity issues to the monitoring server

PID attach mode — platform notes:

Linux: full stdout capture via /proc/PID/fd/1
macOS: heartbeat-only mode (stdout capture requires --run flag)

For full log capture on macOS, use --run instead of --pid. The --pid flag on macOS provides heartbeat monitoring only — it confirms the process is alive but does not read its output.

Example output:

$ hellhound attach --name "support-bot" --run "node bot.js"
[Hellhound] Starting: support-bot
[Hellhound] Command: node bot.js
[Hellhound] Heartbeat every 30s
[Hellhound] Monitoring — press Ctrl+C to detach
[agent stdout appears here]
[Hellhound] ♥ Heartbeat sent (30s)
[Hellhound] ♥ Heartbeat sent (60s)
# When you press Ctrl+C:
[Hellhound] Detached
COMMAND

hellhound logs

View run history for a monitored automation. Shows the most recent runs with status, duration, and anomaly info.

hellhound logs --name <name> [options]

Required flags:

Flag Description
--name <name> required Name of the automation to show logs for

Optional flags:

Flag Default Description
--limit <n> 20 Number of runs to show
# View last 20 runs
hellhound logs --name "lead-pipeline"
# View last 50 runs
hellhound logs --name "lead-pipeline" --limit 50
# View last 5 runs
hellhound logs --name "lead-pipeline" --limit 5

Example output:

$ hellhound logs --name "lead-pipeline"
Run history for: lead-pipeline
# Status Duration Output Time
─────────────────────────────────────────────────
47 ok 14.2s 4,821ch 2 minutes ago
46 ok 13.8s 4,205ch 1 hour ago
45 ok 14.1s 4,612ch 2 hours ago
44 anomaly 8.7s 412ch 3 hours ago
└─ Output 91% shorter than baseline
└─ Alert sent to ops@agency.com
43 ok 14.3s 4,890ch 4 hours ago
42 ok 13.9s 4,102ch 5 hours ago
...
COMMAND

hellhound status

Show the current status of all monitored automations. Quick overview of what is running, healthy, or broken.

hellhound status [options]
hellhound status

Example output:

$ hellhound status
Hellhound Status
Connected: hellhound.dev
Account: ops@agency.com
Agent Status Last Run Runs
───────────────────────────────────────────────────────────────
lead-pipeline ✓ ok 2 min ago #47
support-inbox-bot ✓ ok 5 min ago #203
invoice-processor ⚠ anomaly 1 hour ago #89
competitor-monitor ✓ ok 3 hours ago #12
daily-report ✗ crash yesterday #34
└─ Exit code 1
COMMAND

hellhound alert

Manage alert configurations for your monitored automations. Subcommands: add, list, remove.

hellhound alert add

Add an alert destination for a monitored automation.

hellhound alert add --name <name> --channel <channel> --to <destination>
Flag Description
--name <name> required Automation name to configure alerts for
--channel <channel> required Alert channel: email, slack, or sms
--to <destination> required Where to send alerts (see per-channel below)

Channel options:

Email:

hellhound alert add --name "lead-pipeline" --channel email --to ops@agency.com
hellhound alert add --name "lead-pipeline" --channel email --to client@company.com

Slack:

Requires a Slack incoming webhook URL. Get one at: api.slack.com/apps → Incoming Webhooks

hellhound alert add \
--name "lead-pipeline" \
--channel slack \
--to "https://hooks.slack.com/services/T00000/B00000/xxxxxxxx"

SMS (Agency plan only):

Phone number must be in E.164 format (+ followed by country code and number). International formats supported.

hellhound alert add --name "lead-pipeline" --channel sms --to +14155552671
hellhound alert add --name "lead-pipeline" --channel sms --to +46701234567

You can add multiple alert destinations per automation. Alerts are sent to ALL configured destinations when triggered.

hellhound alert list

List all configured alert destinations for an automation.

hellhound alert list --name <name>
$ hellhound alert list --name "lead-pipeline"
Alerts for: lead-pipeline
ID Channel Destination
──────────────────────────────────────────────────────────────
1 email ops@agency.com
2 email client@company.com
3 slack https://hooks.slack.com/services/T.../...

hellhound alert remove

Remove an alert destination by its ID.

Get the ID from hellhound alert list.

hellhound alert remove --name <name> --id <alert-id>
# First list to get the ID
hellhound alert list --name "lead-pipeline"
# Then remove by ID
hellhound alert remove --name "lead-pipeline" --id 2
COMMAND

hellhound dashboard

Open the Hellhound web dashboard in your default browser.

hellhound dashboard [options]
hellhound dashboard
CONFIGURATION

Configuration file

The CLI stores its configuration at:

~/.hellhound/config.json

Contents:

{
"api_key": "hh_live_xxxxxxxxxxxxxxxxxxxxxxxx",
"email": "you@agency.com"
}
Field Description
api_key Your Hellhound API key — authenticates all requests
email Your account email — informational only

Reset config:

To reset your configuration (clear API key and start fresh):

rm ~/.hellhound/config.json
hellhound init
ENVIRONMENT VARIABLES

Environment variables

You can override config file values using environment variables. Environment variables take precedence over the config file.

Variable Description
HELLHOUND_API_KEY API key — overrides config file value

When to use environment variables:

CI/CD pipelines:

Store your API key as a secret, not in a config file.

# GitHub Actions example
HELLHOUND_API_KEY=${{ secrets.HELLHOUND_API_KEY }} \
hellhound watch --name "deploy-script" --run "./deploy.sh"
EXIT CODES

CLI exit codes

The hellhound CLI exits with these codes:

Code Meaning
0 Success
1 General error (bad flags, network error, etc.)
2 Authentication error (invalid or missing API key)
3 Agent process exited with non-zero code
130 Interrupted (Ctrl+C)

When using hellhound watch in a cron job, be aware that exit code 3 means your monitored agent crashed — not that Hellhound itself failed. Hellhound still recorded the crash and sent your alerts before exiting with code 3.

If you want cron to not retry on agent crash, check the exit code in your cron wrapper:

#!/bin/bash
hellhound watch --name "my-agent" --run "node agent.js"
exit 0 # Always exit 0 so cron doesn't consider it a failure
QUICK REFERENCE

Command cheat sheet

All commands in one place for quick reference.

# SETUP
hellhound init # Link to account
# MONITORING
hellhound watch --name "agent" --run "node agent.js" # Monitor task agent
hellhound attach --name "agent" --run "node agent.js" # Monitor long-running agent
hellhound attach --name "agent" --pid 48291 # Attach to running process
# ALERTS
hellhound alert add --name "agent" --channel email --to you@email.com
hellhound alert add --name "agent" --channel slack --to "https://hooks.slack.com/..."
hellhound alert add --name "agent" --channel sms --to +14155552671
hellhound alert list --name "agent"
hellhound alert remove --name "agent" --id 2
# VIEWING
hellhound logs --name "agent" # View run history
hellhound logs --name "agent" --limit 50 # View last 50 runs
hellhound status # All agents status
hellhound dashboard # Open web dashboard
# INFO
hellhound --version # Print version
hellhound --help # Global help
hellhound watch --help # Command help

Related documentation