CLI Tool Documentation

UpMonitor CLI Reference

The UpMonitor CLI is a powerful command-line tool for running instant website audits and integrating monitoring into your development workflow.

Installation

You can run the CLI without installation using npx:

npx @upmonitor/cli check https://example.com

Or install it globally:

npm install -g @upmonitor/cli

Commands

`check `

Runs a comprehensive diagnostic audit on the specified URL.

  • Example: UpMonitor check https://example.com
  • Checks performed: SSL, DNS, HTTP Status, Security Headers, Performance.

`login`

Authenticates your CLI with your UpMonitor account. This allows you to sync local checks with your dashboard and manage remote monitors.

UpMonitor login

`monitor add `

Adds a new continuous monitor to your UpMonitor account directly from the terminal.

UpMonitor monitor add https://example.com --interval 5m

Options

Option Description
--checks <list> Comma-separated list of checks to run (e.g., ssl,dns).
--ci Optimizes output for CI/CD environments (minimal colors, plain text).
--fail-on <level> Exit with code 1 if a check result matches <level> (warning or failure).
--format <type> Output format: pretty (default), json, or csv.
--region <id> Run the check from a specific global region (requires login).

CI/CD Integration

GitHub Actions

Integrate UpMonitor into your deployment pipeline to catch security and performance regressions automatically.

name: Production Health Check
on: [push]
jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run UpMonitor Audit
        run: npx @upmonitor/cli check https://upmonitor.io --ci --fail-on failure

GitLab CI

stages:
  - post-deploy

health_check:
  stage: post-deploy
  script:
    - npx @upmonitor/cli check https://upmonitor.io --ci --fail-on failure

Exit Codes

  • 0: All checks passed.
  • 1: One or more checks failed (based on --fail-on).
  • 2: Configuration or network error.