Monitor any command-line script without modifying code — wraps any language.
Current version: 0.2.4
Seer CLI is a command-line tool that wraps your existing scripts and automatically sends execution data to Seer for monitoring. No code changes required — just prefix your commands with seer run.
~/.seer/queue format as SeerPy — events queued by either client can be flushed by either.curl -fsSL https://raw.githubusercontent.com/seer-monitoring/seer-cli/main/cli/install.sh | sh
cd cli go build -o seer .
Prefer manual installation? Download binaries directly
seer --version
export SEER_API_KEY="your-api-key-here"
Get your API key from your SEER dashboard — API Keys.
| Variable | Purpose |
|---|---|
SEER_API_KEY | API key (required) |
SEER_BASE_URL | Override API host (default https://api.ansrstudio.com) |
SEER_QUEUE_DIR | Offline queue directory (default ~/.seer/queue) |
SEER_QUEUE_MAX_FILES | Max queued envelopes (default 500) |
SEER_QUEUE_MAX_BYTES | Max queue size in bytes (default 50 MiB) |
SEER_TIMEOUT | HTTP timeout in seconds (default 30) |
SEER_LOG_SYNC_INTERVAL | Progressive log sync interval in seconds (default 10; 0 disables) |
# Add to ~/.bashrc or ~/.zshrc export SEER_API_KEY="your-api-key-here"
Wrap any command with seer run. The job name must match a pipeline that exists in your Seer dashboard.
seer run daily_etl --tags=etl,prod -- python etl.py
seer run data_sync -- node sync-data.js
seer run backup_database -- ./backup.sh
seer run docker_cleanup -- docker system prune -af
$env:SEER_API_KEY = "your_key" seer run daily_etl --tags=etl,prod -- python etl.py
Send a one-time liveness signal to a pipeline:
seer heartbeat worker_process --metadata='{"pid":1234}' --tags=prodseer run etl_pipeline \
--metadata='{"environment":"production","version":"2.1.0"}' \
--tags=etl,prod \
-- python etl.pyLogs are captured and synced to the dashboard while the job runs (default every 10 s). Disable or adjust:
# Disable log capture entirely seer run my_job --capture-logs=false -- python script.py # Change sync interval (0 disables mid-run syncing) seer run my_job --log-sync-interval=30 -- python script.py
If the Seer API is unreachable, the command still runs locally and only the final outcome is queued. Exit code is always preserved.
# Auto-replay (default: on) — flushes queue once at startup seer run critical_job -- python script.py # Skip auto-replay at startup seer run critical_job --no-auto-replay -- python script.py # Flush queue periodically while the job runs seer run long_job --background-replay --replay-interval=60 -- python script.py # Flush manually anytime seer replay
seer run my_job --base-url=https://seer.internal.company.com -- python script.py # or export SEER_BASE_URL=https://seer.internal.company.com
seer run <job-name> [flags] [--] <command> [args...] Flags: --capture-logs=true|false Capture stdout/stderr (default true) --log-sync-interval=<sec> Progressive log upload interval (default 10; 0 disables) --metadata=<json> JSON object attached to the run --tags=a,b,c Comma-separated tags --base-url=<url> Override API host --no-auto-replay Skip one-shot queue flush on start --background-replay Flush queue periodically while job runs --replay-interval=<sec> Background interval (default 60)
seer heartbeat <job-name> [--metadata=<json>] [--tags=a,b] [--base-url=<url>]
seer replay [--max-attempts=5] [--base-url=<url>] # replay-failed is kept as an alias for compatibility seer replay-failed
seer --version
# Crontab entry 0 2 * * * SEER_API_KEY=your_key /usr/local/bin/seer run nightly_backup -- /path/to/backup.sh
# GitHub Actions / GitLab CI
seer run deploy_production \
--metadata='{"commit":"$GITHUB_SHA"}' \
--tags=deploy \
-- ./deploy.shseer run daily_etl \
--metadata='{"source":"warehouse"}' \
--tags=etl,prod \
-- python process_data.pyseer run log_rotation -- logrotate /etc/logrotate.conf
# Check if binary is in PATH which seer # Add to PATH if needed export PATH="$HOME/.local/bin:$PATH"
SEER_API_KEY environment variable is set# View queued envelopes ls ~/.seer/queue/ # View dead-lettered envelopes (repeated failures) ls ~/.seer/queue/dead/ # Flush the queue manually seer replay
chmod +x /usr/local/bin/seer