Note: The Mog SDK and GitHub repository are not yet publicly available. The code samples below preview what the API will look like. Follow for launch updates
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.1.0-alpha
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
These packages are not yet published. They will be available at launch.
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/mog-project/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
The repository is not yet public. This section previews the setup process.
To build Mog from source, clone the repository and use pnpm to install dependencies and start the development server.
git clone https://github.com/mog-project/mogcd mogpnpm installpnpm buildpnpm devThis requires Node.js 18+ and pnpm. The Rust compute engine will be compiled to WebAssembly during the build step if a Rust toolchain is available.
Next Steps
Playground
Try Mog live in your browser — no install required.
Examples
Copy-paste code recipes for embedding, formulas, file I/O, and Python.
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 Python analysis.
Community
Join the community, report issues, and contribute to Mog.