Reference

CLI

Manage dashboards and widgets from the command line.

Overview

The widgets CLI lets you manage dashboards, view widgets, and interact with the API from your terminal.

Installation

npm install -g @wdg/cli

Authentication

# Browser-based login (recommended)
widgets login

# Manual API key entry
widgets login --manual

Configuration is stored at ~/.widgetsrc:

{
    "apiUrl": "https://api.widgets.pro",
    "apiKey": "tok_..."
}

Commands

Dashboards

# List all dashboards
widgets dashboards list

# View a dashboard (interactive TUI)
widgets dashboards view dsh_abc123

# Open in browser
widgets dashboards view dsh_abc123 --open

# JSON output
widgets dashboards list --json

Widgets

# View a widget (ASCII rendered)
widgets widgets view wdg_xyz789

# Output raw JSON
widgets widgets view wdg_xyz789 --json

Interactive Mode

widgets dashboards view opens an interactive TUI:

  • Arrow keys — navigate between widgets
  • Enter — open selected widget detail
  • Esc — go back
  • q — quit

Widget Renderers

The CLI includes ASCII renderers for each widget type:

Widget TypeRenderer
MetricLarge formatted number
ChartASCII bar/line chart
TableFormatted table with borders
ProgressASCII progress bar 
TextMarkdown rendered to terminal
StatusColored status indicator