Getting Started
Mog is a programmable spreadsheet platform with a Rust compute engine, CRDT collaboration, and canvas rendering. This guide will help you install the SDK, create your first workbook, and render interactive spreadsheets in your app.
Current version: 0.6.0
Prerequisites
- •Node.js 18+ — required for the TypeScript SDK and build tooling
- •pnpm (recommended) — or npm / yarn as your package manager
- •A modern browser with WebAssembly support (Chrome, Firefox, Safari, Edge)
- •Rust toolchain (optional) — only needed if building the compute engine from source
Installation
Install the Mog SDK with your preferred package manager:
Runtime
Package Manager
npm install @mog-sdk/nodeOther install methods
Docker
docker run -p 3000:3000 ghcr.io/fundamental-research-labs/mog:latestHomebrew
brew install mogQuick Start
Follow these steps to create and render your first Mog spreadsheet.
1Install the SDK
Install the Mog Node.js SDK. It includes prebuilt native binaries for macOS, Linux, and Windows.
# npmnpm install @mog-sdk/node
# pnpmpnpm add @mog-sdk/node2Create a workbook
Create a workbook, set cell values, and evaluate formulas.
import { createWorkbook } from "@mog-sdk/node";
const wb = await createWorkbook();const ws = wb.getActiveSheet();
await ws.setCell("A1", "Revenue");await ws.setCell("A2", 150000);await ws.setCell("A3", 230000);await ws.setCell("A4", "=SUM(A2:A3)");
await wb.calculate();const total = await ws.getValue("A4");console.log(total); // 3800003Embed in a web app
Drop a full spreadsheet into any React app with the embed component.
import { MogSheet } from "@mog-sdk/embed/react";
export function App() { return ( <MogSheet src="/data/sales.xlsx" width={1200} height={600} /> );}4Export to XLSX
Save your workbook as a standard Excel file.
import { createWorkbook, save } from "@mog-sdk/node";
const wb = await createWorkbook();const ws = wb.getActiveSheet();
await ws.setCell("A1", "Hello");await ws.setCell("B1", "=LEN(A1)");
await save(wb, "output.xlsx");Building from Source
To build Mog from source, clone the repository and use pnpm to install dependencies and start the development server.
git clone https://github.com/fundamental-research-labs/mogcd mogpnpm install --frozen-lockfilepnpm typecheckpnpm testThis requires Node.js 18+, pnpm, and the Rust toolchain for compute engine changes. Use the smallest relevant check for the package you are changing.
Next Steps
Playground
Try Mog live in your browser — no install required.
Examples
Copy-paste code recipes for embedding, formulas, and file I/O.
API Reference
Explore 800+ methods across Workbook, Worksheet, Charts, Tables, and more.
Architecture Overview
Learn about the OS-style architecture with kernel, shell, and 100+ packages.
Tutorials
Step-by-step guides for Next.js embed, server-side XLSX, and full apps.
Community
Join the community, report issues, and contribute to Mog.