Something went wrong

Thank you for being patient! We're working hard on resolving the issue

Introduction - Lona Docs Log in

@tento-lona/cli/rows-fixtures

Command-line interface + pretty-printers for the @tento-lona/sheets row data model. Runs under Deno; ships as tento/tento-lona-js/cli/rows-fixtures/src/lona-rows.deno.ts.

The CLI serves three purposes:

  1. Quick inspectionhydrate / cells print a live view of any .sheet.json fixture.
  2. Declarative ops playbackops runs any .ops.json fixture end-to-end, including the canonical scripted demos (formula propagation, alias lifecycle) that live under tento/tento-lona-js/sheets/tests/demo/.
  3. Interactive REPLwatch drops into a stdin-driven session over a hydrated Sheet, with live event streaming.

All subcommands read fixtures as paths relative to the current working directory. Examples assume cwd is the repo root.

Why a separate CLI

@tento-lona/cli/rows-fixtures operates on @tento-lona/sheets directly — no SDK client, no HTTP, no auth. Everything runs against TestBackend in memory. That makes it the right tool for:

  • Fixture-driven regression tests
  • One-off "show me what this sheet contains" checks
  • Debugging cell-encoding / alias-hydration bugs in isolation

The separate @tento-lona SDK ships its own CLI under tento/tento-lona-js/cli/. That surface talks to the live API, renders against LonaSdk.Client, and is tracked internally in __design_docs/cli/work-tracker.md.

Quick start

# Print a fixture's hydrated grid:
deno run --allow-read tento/tento-lona-js/cli/rows-fixtures/src/lona-rows.deno.ts \
  hydrate tento/tento-lona-js/sheets/tests.shared/sheets/formula-simple-seeded.sheet.json

# Replay a declarative ops fixture:
deno run --allow-read tento/tento-lona-js/cli/rows-fixtures/src/lona-rows.deno.ts ops \
  tento/tento-lona-js/sheets/tests/demo/formula-from-empty.ops.json \
  --verify --assert-expected

# Interactive REPL over a fresh sheet:
deno run --allow-read --allow-write tento/tento-lona-js/cli/rows-fixtures/src/lona-rows.deno.ts \
  watch --save-on-exit /tmp/sheet.json

Subcommands at a glance

CommandReadsWritesPretty-prints
hydrate <path>.sheet.jsonGrid (rows × dates)
cells <path> <row>.sheet.jsonPer-cell JSON list
`ops -`.ops.json (or stdin)— (or --save-on-exit)
watch [<path>].sheet.json (optional)--save-on-exit <out.json>Grid + live events

See also