mog.

Spreadsheet CLI for agents

Excel,
for agents.

The lightweight CLI agents use instead of Excel.
Fully compatible with Excel. Mog implements the Office.js API.

One binary for Linux, macOS, and Windows.

Get started

Sample script

formula.js
await Excel.run(async (context) => {
  const sheet = context.workbook.worksheets.getItem("Sheet1");
  sheet.getRange("A1").values = [[10]];
  sheet.getRange("A2").formulas = [["=A1*2"]];

  const result = sheet.getRange("A2");
  result.load("values");
  await context.sync();
  console.log(result.values[0][0]);
});
$ mog -f formula.js -o result.xlsx
20
Saved to result.xlsx

Get started

Give this prompt to your agent

Give this prompt to your agent when you want any spreadsheet work done.

Install it yourself

Prefer the native binary. Download the latest release for Linux, macOS, or Windows, verify it against SHA256SUMS, and put mog on your PATH.

Latest release

If that does not work and npm is installed:

npm install -g @mog-sdk/cli

Open source.

Mog is open source. Apache 2.0. Come contribute! ❤️

Open an issue