Try Bilig WorkPaper in Node

May 29, 2026 ยท View on GitHub

This page is for people who want to try the package before reading the whole repo. It starts from an empty directory, installs the published npm package, builds a tiny WorkPaper, edits an input cell, reads the recalculated formula result, serializes the document, restores it, and reads the result again.

No browser UI, account, server, or clone is required.

Quickstart

npm create @bilig/workpaper@latest pricing-workpaper
cd pricing-workpaper
npm install
npm run smoke

Expected output includes this proof shape:

{
  "before": {
    "summary": {
      "decision": "review"
    },
    "inputCells": {
      "units": "Inputs!B2",
      "listPrice": "Inputs!B3"
    }
  },
  "edit": {
    "before": {
      "decision": "review"
    },
    "after": {
      "decision": "approved"
    },
    "restored": {
      "decision": "approved"
    },
    "checks": {
      "decisionChanged": true,
      "formulasPersisted": true,
      "restoredMatchesAfter": true,
      "serializedBytes": 1242
    }
  },
  "verified": true
}

The exact byte count can change between package versions. The important part is that verified is true, decisionChanged is true, and restoredMatchesAfter is true.

The generated starter uses the same maintained TypeScript proof shape as the public mirror at https://proompteng.github.io/bilig/npm-eval.ts and examples/headless-workpaper/npm-eval.ts.

Try it in Docker (optional)

Note: pnpm is the primary recommended path. This section is for evaluators who prefer not to change their local Node version.

After completing the Quickstart step above you will have a generated pricing-workpaper/ project. Mount that directory into an official Node 24 container and run the same smoke script:

docker run --rm \
  -v "$(pwd)":/eval \
  -w /eval \
  node:24-slim \
  bash -c "npm install --silent && npm run smoke"

Expected output uses the same proof shape as above. The local run must set verified, decisionChanged, formulasPersisted, and restoredMatchesAfter to true:

{
  "edit": {
    "after": {
      "decision": "approved"
    },
    "restored": {
      "decision": "approved"
    },
    "checks": {
      "decisionChanged": true,
      "formulasPersisted": true,
      "restoredMatchesAfter": true,
      "serializedBytes": 1242
    }
  },
  "verified": true
}

No repo clone is needed. The container installs dependencies from npm and exits cleanly after printing the result.

What this proves

  • multi-sheet workbook creation from plain arrays
  • formula evaluation without a browser grid
  • input edits through the workbook API
  • computed value readback after the edit
  • JSON document export, parse, restore, and readback

This is the core shape behind the larger examples for service routes, MCP tools, agent writeback, and workbook automation.

What this does not prove

bilig is not a finished Excel clone. It is useful when a TypeScript service or agent needs a formula-backed workbook object it can mutate and persist. For full Excel compatibility or XLSX layout fidelity, check the comparison and compatibility pages before adopting it.

Next paths

If it almost matches but a gap blocks adoption, use the adoption blocker form: https://github.com/proompteng/bilig/discussions/new?category=general.