gwatt
v0.0.2
Published
Agent-first CLI for Growatt solar monitoring — JSON output, device filtering, hourly history
Maintainers
Readme
gwat
Agent-first CLI for Growatt solar monitoring. Built with Bun + TypeScript.
bun install -g gwattWhy agent-first?
Every command supports --json for structured, machine-parseable output. Perfect for agents, scripts, and automation.
# Get today's production as JSON
gwat today --json
# Get a specific device
gwat today --device Abdulaziz --json
# Monthly history
gwat history -m 2026-06 --jsonCommands
| Command | Description |
|---------|-------------|
| gwat login -u <user> -p <pass> | Authenticate with Growatt |
| gwat today [--json] [--device <name>] | Current day energy + device breakdown |
| gwat history [-d \| -m \| -y \| -t] [--json] | Energy data for day/month/year/lifetime |
| gwat status [--json] | List all plants and totals |
Quick start
# Login
gwat login -u alisher2099 -p berkino2099
# Today's data (all devices)
gwat today --json
# Single device
gwat today --device Abdulaziz --json
# Monthly history
gwat history -m 2026-06 --json
# Lifetime totals
gwat history -t --jsonJSON output
today --json
{
"plant": {
"id": "10506247",
"name": "solar alisher uy",
"todayEnergy": 852.3,
"capacityKw": 177.5,
"currency": "UZS",
"todayRevenue": 852300,
"weather": "Shower Rain",
"temperature": "24",
"devicesOnline": 0
},
"devices": [
{
"name": "Abdulaziz",
"serial": "NKE8E9T33C",
"type": "inverter",
"status": 2,
"eToday": 296,
"powerStr": "11.48kW"
}
],
"hours": [
{ "time": "00:30", "energy": 0, "unit": "kWh" },
{ "time": "12:00", "energy": 119, "unit": "kWh" }
]
}today --device Abdulaziz --json
{
"device": {
"name": "Abdulaziz",
"serial": "NKE8E9T33C",
"type": "inverter",
"status": "Online",
"todayEnergy": 296,
"powerStr": "11.48kW",
"todayRevenue": 296000
},
"hours": [ ... ]
}history -m 2026-06 --json
{
"range": "month",
"date": "2026-06",
"plantId": "10506247",
"plantName": "solar alisher uy",
"totalEnergy": 5235,
"data": [
{ "label": "01", "value": 599, "unit": "kWh" },
{ "label": "02", "value": 962.9, "unit": "kWh" }
]
}Authentication
Session stored in ~/.gwat/config.json. Lasts ~24 hours. Re-login when expired.
Error handling
All errors return JSON with --json:
{ "error": "Not logged in", "details": "Run: gwat login -u <user> -p <pass>" }Exit code is 1 on error.
Requirements
- Bun >= 1.0
License
MIT
