@trajectonomics/cli 0.8.0-alpha.35 → 0.8.0-alpha.36

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.
Files changed (2) hide show
  1. package/README.md +25 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -296,6 +296,31 @@ its own. In every year, money in plus `unmet` (the cash a Shortfall left unpaid)
296
296
  saving and left over: the engine routes every unit of cash. `not funded` is the part of the
297
297
  Contributions the cash could not fund; it is not in saving.
298
298
 
299
+ ## Loans
300
+
301
+ > **Ships in 0.8.0.**
302
+
303
+ A loan is three parts of a Scenario document: a liability Account with a nominal `rate` and a `compounding`
304
+ period, a `withdrawal` Flow from that liability when the money arrives, and a Contribution into the
305
+ liability whose amount is a `level` payment. `traj schema scenario apply` publishes one as its worked example.
306
+
307
+ `traj projection run --liabilities` adds the engine's statement of each loan: one month row per liability
308
+ (`opening`, `drawn`, `paid`, `interest`, `closing`) and each loan's paid-off date. The rows shown are
309
+ one loan's months, cut from the table; it lists every liability the Scenario holds. In JSON they are the
310
+ `liabilities` and `paidOff` tables. The human format prints one line per loan, then its months:
311
+
312
+ ```
313
+ car: paid off on 2026-12-01
314
+ liabilities (26 rows)
315
+ account from to opening drawn paid interest closing partial
316
+ car 2026-06-01 2026-06-30 0.00 12000.00 0.00 58.00 12058.00 false
317
+ car 2026-07-01 2026-07-31 12058.00 0.00 2035.15 50.44 10073.29 false
318
+ car 2026-12-01 2026-12-31 9.66 0.00 9.66 0.00 0.00 false
319
+ ```
320
+
321
+ The figures are the engine's: `interest` is the residual of the month, so `opening + drawn − paid + interest`
322
+ equals `closing` exactly. Without `--liabilities` the output is unchanged.
323
+
299
324
  ## Seeing it in a browser
300
325
 
301
326
  `traj dashboard --as-of 2026-11-30 --horizon 2056-11-30` reads your ledger once and serves the Dashboard (net worth, the ledger, projections, the FI date, a Scenario compare, tax and health) on `http://127.0.0.1:4321/` until you press Ctrl-C. It only reads, it listens on this machine only, and it takes the same Scenario flags as the projection reads (`--scenario`, `--compare` twice, `--monthly`, `--carry-in`); `--port 0` picks a free port. Run it again to see new figures.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trajectonomics/cli",
3
- "version": "0.8.0-alpha.35",
3
+ "version": "0.8.0-alpha.36",
4
4
  "description": "trajectonomics command line",
5
5
  "license": "MIT",
6
6
  "type": "module",