@enerlence/suntropy-cli 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -0
- package/dist/bin/suntropy.js +976 -110
- package/dist/bin/suntropy.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -209,6 +209,51 @@ suntropy solarform calculate --data '{"center":{"lat":37.39,"lng":-5.99},...}'
|
|
|
209
209
|
suntropy solarform config
|
|
210
210
|
```
|
|
211
211
|
|
|
212
|
+
### `suntropy ppa` - PPA Analysis
|
|
213
|
+
|
|
214
|
+
Read PPA (Power Purchase Agreement) templates and run PPA simulations on a solar study.
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# Read-only templates
|
|
218
|
+
suntropy ppa templates list --fields _id,name,mode,ppaPrice,useInSolarForm
|
|
219
|
+
suntropy ppa templates get <ppaTemplateId>
|
|
220
|
+
|
|
221
|
+
# Run a PPA simulation on a study (read-only, does not persist)
|
|
222
|
+
suntropy ppa calculate --study <studyId> # uses client useInSolarForm templates
|
|
223
|
+
suntropy ppa calculate --study <studyId> --template <ppaTemplateId> # uses a single template
|
|
224
|
+
cat study.json | suntropy ppa calculate --data - # full SolarStudy via stdin
|
|
225
|
+
suntropy ppa calculate --study <studyId> --raw --save-file ppa.json
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
The response is the study with `economicResults.ppaAnalysis` populated
|
|
229
|
+
(`simulationResults[].profitabilityResults` → `irr`, `paybackYears`). Heavy
|
|
230
|
+
PowerCurve objects are summarized unless `--raw` is passed.
|
|
231
|
+
|
|
232
|
+
### `suntropy shareables` - Shareable Links
|
|
233
|
+
|
|
234
|
+
Create shareable links for studies (sharing service, exposed under `/templates`).
|
|
235
|
+
The backend fills `uid`, `url`, `clientUID` and `idShareable` from the token.
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
# Public shareable for a solar study
|
|
239
|
+
suntropy shareables create --element-id <studyId>
|
|
240
|
+
|
|
241
|
+
# With template, name and expiration
|
|
242
|
+
suntropy shareables create --element-id <studyId> \
|
|
243
|
+
--template-id <templateId> --name "Estudio Juan" --expiration-date 2026-12-31
|
|
244
|
+
|
|
245
|
+
# Private (password) + send to recipients
|
|
246
|
+
suntropy shareables create --element-id <studyId> \
|
|
247
|
+
--privacy PRIVATE --password secret --email-list "a@x.com;b@y.com"
|
|
248
|
+
|
|
249
|
+
# Extra link query params / extra DTO fields
|
|
250
|
+
suntropy shareables create --element-id <studyId> --link-params "utm_source=cli"
|
|
251
|
+
suntropy shareables create --element-id <studyId> --data '{"customLayout":true}'
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
`--element-type` (default `solarStudy`): `solarStudy | colectiveSolarStudy | veChargerStudy | heatpumpStudy | billing`.
|
|
255
|
+
`--shareable-type` (default `TEMPLATE`): `TEMPLATE | CONTRACT`. The response includes the public `url` and `uid`.
|
|
256
|
+
|
|
212
257
|
### `suntropy config` - Configuration
|
|
213
258
|
|
|
214
259
|
```bash
|