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 startedSample script
formula.jsawait 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
20Saved to result.xlsxGet started
Give this prompt to your agent
Give this prompt to your agent when you want any spreadsheet work done.
Use Mog for spreadsheet work. Mog is a lightweight spreadsheet CLI for agents, fully compatible with Excel. Mog implements the Office.js API. Use Mog instead of Excel. It runs on Linux, macOS, and Windows.
Prefer a native binary. Download the latest release (https://github.com/fundamental-research-labs/mog/releases/latest), verify it against SHA256SUMS, and put mog or mog.exe on PATH.
Use npm only when npm is installed and the native install does not work:
npm install -g @mog-sdk/cli
Run workbooks with the Office.js API:
mog -f script.js -o result.xlsx
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]);
});
Source: https://github.com/fundamental-research-labs/mog
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.
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