Something went wrong

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

Examples - Lona Docs Log in

Examples

lona-js ships with runnable Deno examples and a small CLI for inspecting sheet trees.

Core examples

  • examples/basic-usage.deno.ts — client setup, tasks, calendars, sheets, and cell reads.
  • examples/row-handle.deno.ts — fetch patterns, cache reads, staleness, and typed row indices.
  • examples/data-series.deno.ts — deriving graph series from fetched row data.
  • examples/events.deno.ts — calendar event CRUD.
  • examples/events-index.deno.ts — registering a typed row index.
  • examples/sheet-reactive.deno.ts — reactive sheet reads and subscriptions.
  • examples/sheet-tree.deno.ts — render an opened sheet as a terminal tree with virtual children expanded.

Tree CLI

For ad-hoc inspection, use cli/sheet-tree.deno.ts:

deno run --allow-net --allow-env --allow-read lona-js/cli/sheet-tree.deno.ts \
  --sheet ss_... --days 14

Create a temporary server-backed sheet from a JSON spec:

deno run --allow-net --allow-env --allow-read lona-js/cli/sheet-tree.deno.ts \
  --spec lona-js/cli/specs/weather.json --days 14 --json

Notes

  • Examples use LONA_ACCESS_TOKEN and optionally LONA_API_URL.
  • The CLI specs in cli/specs/ are intended as small reproducible fixtures for row-tree rendering, not as a full SDK surface.