pmdash-cli
v0.1.0
Published
Official CLI for PMDash. Push property management KPIs to your dashboard from scripts, cron, or CI.
Maintainers
Readme
pmdash
Official CLI for PMDash. Push property management KPIs to your dashboard from scripts, cron, or CI, without building an API integration.
Install
Requires Node 18+.
From source (no npm account needed):
git clone https://github.com/build-with-madeline/PMDash.io
cd PMDash.io/cli
npm link # makes `pmdash` available globallyOr run it directly without installing:
node /path/to/PMDash.io/cli/bin/pmdash.js push --metric "Open Work Orders" --value 12From npm:
npm install -g pmdash-cliThe installed command is pmdash.
Authenticate
PMDash pushes metric data through a per-client webhook token. Generate one in PMDash under Settings, then either pass it with --token or set it in the environment:
export PMDASH_TOKEN="your-webhook-token"Usage
Push a single metric:
pmdash push --metric "Open Work Orders" --value 12Push with a date:
pmdash push --metric "Rent Delinquency Rate" --value 2.1 --date 2026-08-27Push a batch from a JSON file (up to 100 items):
pmdash push --file weekly-kpis.jsonWhere weekly-kpis.json is:
[
{ "metric": "Open Work Orders", "value": 12 },
{ "metric": "Vacant Units", "value": 4, "date": "2026-08-27" }
]Options
| Flag | Env | Description |
|------|-----|-------------|
| --token <token> | PMDASH_TOKEN | Webhook token (required) |
| --url <url> | PMDASH_URL | Base URL. Default https://pmdash.io |
| --metric <name> | | Metric name |
| --value <number> | | Numeric value |
| --date <YYYY-MM-DD> | | Optional date (defaults to today) |
| --file <path> | | JSON array of { metric, value, date? } |
| --json | | Print the raw server response |
| -h, --help | | Show help |
| -v, --version | | Show version |
API-key commands (read & write)
Beyond push, the CLI reads and writes your dashboard with a client-scoped API key. Create one in PMDash under Settings → API keys (read scope for the read commands; add write for the write ones). Pass it with --api-key or set PMDASH_API_KEY.
export PMDASH_API_KEY="pmd_your_key_here"Reads (any key):
pmdash metrics # list metrics
pmdash results # latest computed results
pmdash history <metricId> [--days N] # history for one metric (1-365, default 30)
pmdash boards # list boards (each id is a boardConnectionId)
pmdash templates [--source <src>] # metric templates, optionally one source
pmdash reports [--type <t>] [--limit N] [--offset N] # generated reports (summarized)
pmdash report <id> # one report with full contentWrites (need a write-scope key):
pmdash create-metric --name "Churn" [--description "..."]
pmdash set-value <metricId> <value> # manual metrics only
pmdash add-metric --source <src> --template <name> [--board <id>] [--time-window <tw>]
pmdash generate-report <weekly|monthly|quarterly|yearly>Board sources (aptly, monday) need --board (an id from pmdash boards); configurable sources (showmojo, rentvine, buildium, …) need --time-window (e.g. last_30_days). set-value refuses integration-computed metrics so it can't overwrite a synced value. See pmdash.io/developers.
Add --api-key <key> / --url <url> (or PMDASH_API_KEY / PMDASH_URL) and --json for raw output on any of these.
Programmatic use
import { pushMetrics } from 'pmdash-cli';
await pushMetrics({
token: process.env.PMDASH_TOKEN,
items: [{ metric: 'Open Work Orders', value: 12 }],
});License
MIT
