Who needs this
Teams that keep business rules in workbook formulas.
Pricing, payout, approval, import, and forecast rules often start in cells. Bilig lets backend code run those cells directly instead of turning every rule into one-off service code.
The evaluator writes one input, reads the formula output, saves the WorkPaper JSON, restores it, and checks the restored value. No account, no repo clone, no spreadsheet UI.
npm exec --yes --package @bilig/workpaper@latest -- \
bilig-evaluate --door workpaper-service --json
npm create @bilig/workpaper@latest pricing-workpaper
Generate a small service or tool starter wired to the same runtime.
service
Put a WorkPaper behind a Node route.
Wire formula-backed state into an API, queue worker, CLI, or tool.
tools
bilig-evaluate --door agent-mcp --json
Expose cell reads, writes, formula readback, and JSON export over MCP.
rules
Pick the right host rule file.
Route Codex, Claude Code, Copilot, VS Code, Cursor, Kiro, Roo Code, Trae, Qodo IDE, Zed, OpenCode, Goose, Windsurf, Cline,
Continue, and Gemini CLI.
proof
Choose the smallest tool-host proof.
Compare WorkPaper service, MCP, AI SDK, OpenAI, LangGraph, Semantic Kernel, Mastra, ExcelJS, and XLSX paths.
XLSX
xlsx-recalc --read Summary!B7
Import, recalculate, and export files when XLSX is still the contract.
Use @bilig/workpaper for starters, evaluators, service code, and tool integrations. Use saved-file packages only
when XLSX is the boundary.
Market gap
Not another spreadsheet UI. Not just a formula engine.
File libraries move workbook bytes. Formula engines calculate formulas. Hosted spreadsheets need networked app state. Bilig targets the missing runtime layer for backend teams that need workbook-shaped logic under test.
Keep the business rule readable.
Represent inputs, formulas, and outputs as sheets instead of burying every rule in custom service code.
Let the service change the inputs.
Write values through a narrow API, recalculate dependent formulas, and read the cells that determine the decision.
Persist the workbook state.
Save WorkPaper JSON for route handlers, queue jobs, tests, tool integrations, and audit trails.
Import or export XLSX when files matter.
Use the XLSX subpath and recalculation packages when the workflow still needs Excel-compatible files.
Quickstart
Run the WorkPaper loop first.
The fastest evaluation path is a real write, recalculate, read, save, and restore cycle from the published package.
No-clone command
npm exec --yes --package @bilig/workpaper@latest -- \
bilig-evaluate --door workpaper-service --json
Want a starter? Run npm create @bilig/workpaper@latest pricing-workpaper. Need a saved workbook file? Start
with the workbook report.
{
"door": "workpaper-service",
"editedCell": "Inputs!B2",
"dependentCell": "Summary!B2",
"before": 24000,
"after": 38400,
"afterRestore": 38400,
"verified": true
}
Where it runs
Put the workbook behind the code that owns the workflow.
Route handler, queue worker, CLI, or MCP server: load the workbook, edit cells, read results, and save state.
const paper = WorkPaper.buildFromSheets(model)
paper.setCellContents(inputCell, 40)
const answer = paper.getCellDisplayValue(outputCell)
const saved = serializeWorkPaperDocument(exportWorkPaperDocument(paper))
const restored = createWorkPaperFromDocument(parseWorkPaperDocument(saved))
console.log({ answer, restored: restored.getCellDisplayValue(outputCell) })
ok formula readback
ok saved WorkPaper JSON
ok restored state
Compatibility
Compatibility stays explicit.
WorkPaper is the source of truth for workbook-shaped service logic. Saved XLSX files still need import and recalculation checks before production use.
Workbook behavior is gated by deterministic fixtures and evaluator readback. External spreadsheet engines are comparison tools, not public proof counters. Import risks stay visible before a service trusts a saved workbook.
- Oracle
- Excel oracle harness
- Files
- XLSX formula recalculation
- Bugs
- Formula bug clinic
- Limits
- Compatibility gaps stay documented.
Start here
Pick the path that matches the job.
Start with WorkPaper when the service owns the rule. Use the XLSX path only when the file must remain the contract.
Reference
Start narrow, then go deeper.
Choose by boundary. Use @bilig/workpaper when the service or tool host owns workbook state, and saved-file tools
only when the file remains the contract.
Run
- @bilig/workpaper npm package
- Node quickstart
- starter package status
- workbook automation examples
- TypeScript examples
- service evaluator
- Workbook Compatibility Report
- Workbook Compatibility Report transcript
- XLSX risk preflight for tool hosts
- @bilig/xlsx-formula-recalc npm package
- XLSX formula recalculation in Node
- XLSX formula support answers
- xlsx-template formula recalculation
- xlsx-populate formula results
- XLSX recalculation example
Build
Tool hosts
Tool host? Do not drive Excel, LibreOffice, Google Sheets, or a browser grid. Run
npm exec --yes --package @bilig/workpaper@latest -- bilig-evaluate --door agent-mcp --json first.
Use @bilig/workbook only when a runtime needs transport-neutral plan data and command receipts.
- workbook APIs instead of screenshots
- tool-host instructions
- host handoff checklist
- host rule chooser
- Context7 indexed docs
- tool-host evaluator matrix
- XLSX risk preflight for tool hosts
- WorkPaper host handbook
- tool-host calling recipe
- MCP and framework tool chooser
- MCP spreadsheet formula server for tool hosts
- Vercel AI SDK formula readback
- Browser Use WorkPaper formula tool
- OpenHands WorkPaper MCP setup
- Trae WorkPaper MCP setup
- Qodo WorkPaper MCP setup
- OpenCode WorkPaper MCP setup
- Aider WorkPaper conventions
- workbook runtime intent API
- OpenAI Agents SDK tool calls
- MCP spreadsheet tool server
- spreadsheet MCP server comparison
- MCP directory status
- MCP client setup
Decide
- why use Bilig?
- screenshots vs workbook APIs
- Node spreadsheet formula engine
- maintainer proof note
- production adoption checklist
- workbook compatibility report
- engine comparison
- compatibility limits
- SheetJS and ExcelJS boundary
- watch releases
- Google Sheets API boundary
- Google Sheets QUERY/SORTN in Node
- Microsoft Graph Excel boundary
- XLSX support-answer templates
- SheetJS formula result boundaries
- ExcelJS formula result not updating after Node edits
- XLSX corpus checks
- npm provenance and package trust
- submit a workbook fixture
- workbook fixture issue template
- fixture discussion
- implementation gap discussion
- security policy
- support policy
Try it on the workbook rule your code already depends on.
Run one WorkPaper through Node: pricing, payouts, approval rules, import checks, or forecasts. If the model still has to live as XLSX, use the file bridge after the runtime path is clear.