Use Bilig when a spreadsheet is already the clearest way to review the logic, but production cannot depend on a person opening Excel or Google Sheets.
That usually means a backend service, queue worker, serverless route, CLI, test, or agent tool needs to do four things:
That is the narrow reason @bilig/headless exists. It gives TypeScript code a
WorkPaper object for workbook-shaped business logic.
Teams often start with a spreadsheet because formulas are easier to audit than a pile of duplicated application code. Then the spreadsheet escapes into a service boundary:
The usual failure mode is not that spreadsheets are bad. The failure mode is that the spreadsheet becomes invisible to production code. Someone rewrites the math in JavaScript, drives a UI with screenshots, or trusts cached XLSX formula values that were calculated before the current input edit.
Bilig is for the cases where you want to keep the workbook shape and make it a real runtime artifact.
@bilig/headless gives you:
@bilig/headless/xlsx subpath;The important word is prove. A useful integration does not stop after writing a formula. It reads the calculated cell, serializes the WorkPaper, restores it, and checks that the same value comes back.
Do not use Bilig when:
.xlsx files;For those cases, start with a browser grid, SheetJS, ExcelJS, HyperFormula, Microsoft Graph Excel, or Google Sheets API. Bilig is not trying to replace all of them.
Run the npm proof in a blank directory:
mkdir bilig-headless-eval
cd bilig-headless-eval
npm init -y
npm pkg set type=module
npm install @bilig/headless
npm install -D tsx typescript @types/node
curl -fsSLo quickstart.ts https://proompteng.github.io/bilig/npm-eval.ts
npx tsx quickstart.ts
If it prints verified: true, the package can create a workbook, edit one
input, recalculate, persist JSON, restore it, and read the same calculated value
back.
Then run the route-shaped example:
git clone --depth 1 https://github.com/proompteng/bilig.git
cd bilig
pnpm --dir examples/serverless-workpaper-api install --ignore-workspace
pnpm --dir examples/serverless-workpaper-api run smoke
That example is closer to a real service: request-shaped inputs go into cells, the quote decision recalculates, and the restored WorkPaper has to match the post-edit value.
Bilig lets Node services and agents run spreadsheet-shaped business logic as a testable WorkPaper: edit cells, recalculate formulas, read values, and persist the workbook state without opening a spreadsheet app.
If that is the job you have, star or bookmark the repo so you can find it again: https://github.com/proompteng/bilig/stargazers.
If the shape is close but blocked, open a concrete adoption blocker: https://github.com/proompteng/bilig/discussions/new?category=general.