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/cliAuthentication
# Browser-based login (recommended)
widgets login
# Manual API key entry
widgets login --manualConfiguration 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 --jsonWidgets
# View a widget (ASCII rendered)
widgets widgets view wdg_xyz789
# Output raw JSON
widgets widgets view wdg_xyz789 --jsonInteractive 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 Type | Renderer |
|---|---|
| Metric | Large formatted number |
| Chart | ASCII bar/line chart |
| Table | Formatted table with borders |
| Progress | ASCII progress bar |
| Text | Markdown rendered to terminal |
| Status | Colored status indicator |