- name
- moltsheet
- description
- Use the Moltsheet CLI to manage spreadsheet-style data for AI workflows. Prefer the CLI over raw HTTP. Authenticate once, prefer
--json, and use files or stdin for structured payloads. - allowed-tools
- Bash(moltsheet *), Bash(npx moltsheet@latest *), Bash(npm run cli -- *), Bash(curl *)
Moltsheet
Moltsheet is a spreadsheet API for AI agents with a CLI designed to be easier and safer for agents than handwritten HTTP requests.
If you need to create sheets, inspect data, import rows, update cells, or share sheets with another agent, use the CLI first.
Default Agent Procedure
When handling Moltsheet as an agent, follow this order:
- Confirm the CLI is available:
moltsheet --version - If it is not installed, use
npx moltsheet@latest ...or install it globally - Authenticate once with
moltsheet auth login - Prefer
--jsonwhenever another tool, script, or agent will read the output - Use
sheet listandsheet getbefore writing, so you understand the target schema - Use stdin or JSON files for structured inputs instead of hand-escaped inline JSON
- Use raw HTTP only if the CLI cannot be run
Install
Preferred global install:
npm install -g moltsheetOne-off usage without installing:
npx moltsheet@latest auth statusIf you are working inside the Moltsheet repository itself, you can also run the local build:
npm --prefix cli install
npm run build:cli
npm run cli -- auth statusAuthentication
Authenticate once:
moltsheet auth loginOr pass the API key directly:
moltsheet auth login --api-key YOUR_API_KEYCheck current auth state:
moltsheet auth status --jsonClear stored auth:
moltsheet auth logoutCredential resolution order:
--api-keyMOLTSHEET_API_KEY- Stored local credential from
auth login
Storage behavior:
- Preferred: OS credential storage through
keytar - Windows: Credential Manager
- macOS: Keychain
- Linux: Secret Service or libsecret
- Fallback: local config file if secure storage is unavailable
Base URL defaults to production:
https://www.moltsheet.comOverride it when working against another environment:
moltsheet sheet list --base-url http://localhost:3000 --jsonCommands Agents Should Reach For First
Register an agent:
moltsheet agent register --display-name "Research Bot" --slug research.bot --jsonList sheets:
moltsheet sheet list --jsonInspect one sheet:
moltsheet sheet get SHEET_ID --jsonRead a filtered subset of a sheet:
moltsheet sheet get SHEET_ID --columns "Company,Qualified" --filter "Qualified:eq:true" --jsonUpdate a sheet:
moltsheet sheet update SHEET_ID --name "Leads v2" --jsonUpdate a schema and allow destructive changes:
cat schema.json | moltsheet sheet update SHEET_ID --schema-stdin --confirm-data-loss --jsonDelete a sheet:
moltsheet sheet delete SHEET_ID --jsonCreate a sheet from schema stdin:
cat schema.json | moltsheet sheet create "Leads" --schema-stdin --jsonCreate empty rows:
moltsheet row add SHEET_ID --count 10 --jsonAdd one row from stdin:
cat row.json | moltsheet row add SHEET_ID --data-stdin --jsonImport multiple rows:
cat rows.json | moltsheet row import SHEET_ID --stdin --jsonImport multiple rows through the dedicated sheet import route:
cat rows.json | moltsheet sheet import SHEET_ID --stdin --jsonList rows:
moltsheet row list SHEET_ID --jsonDelete rows by ID:
cat row-ids.json | moltsheet row delete SHEET_ID --stdin --jsonDelete one row by index:
moltsheet row delete-index SHEET_ID 0 --jsonUpdate cells:
cat updates.json | moltsheet cell update SHEET_ID --stdin --jsonAdd columns:
cat columns.json | moltsheet column add SHEET_ID --stdin --jsonDelete columns by index list:
cat indices.json | moltsheet column delete SHEET_ID --stdin --jsonDelete one column by index:
moltsheet column delete-index SHEET_ID 1 --jsonRename a column:
moltsheet column rename SHEET_ID 0 --name "Company Name" --jsonShare a sheet:
moltsheet share add SHEET_ID --slug analyst.bot --access write --jsonList collaborators:
moltsheet share list SHEET_ID --jsonRemove a collaborator:
moltsheet share remove SHEET_ID --slug analyst.bot --jsonStructured Input Patterns
Prefer files or stdin for anything shaped like JSON.
Sheet schema example:
[
{ "name": "Company", "type": "string" },
{ "name": "Website", "type": "url" },
{ "name": "Qualified", "type": "boolean" }
]Single row example:
{
"Company": "Moltsheet",
"Website": "https://www.moltsheet.com",
"Qualified": true
}Multiple rows example:
[
{
"Company": "Moltsheet",
"Website": "https://www.moltsheet.com",
"Qualified": true
},
{
"Company": "Example",
"Website": "https://example.com",
"Qualified": false
}
]Column definitions example:
[
{ "name": "Company", "type": "string" },
{ "name": "Website", "type": "url" }
]Row ID list example:
[
"123e4567-e89b-12d3-a456-426614174000",
"123e4567-e89b-12d3-a456-426614174001"
]Column index list example:
[
0,
2
]Cell updates example:
[
{
"rowId": "123e4567-e89b-12d3-a456-426614174000",
"column": "Qualified",
"value": true
}
]How Agents Should Handle the CLI
Use this operating style:
- Prefer
--jsonfor machine-readable output - Read before writing: use
sheet listorsheet getbefore mutating data - Trust schema types and let the CLI or API validation guide corrections
- Prefer stdin or files over complex shell escaping
- Reuse stored auth rather than passing secrets repeatedly
- Use collaborator slugs for sharing, never API keys
- Use
sheet importfor the dedicated sheet import route androw importfor rows-endpoint bulk insert behavior - If a command fails, inspect the error payload before retrying
Recommended write workflow:
- Run
moltsheet auth status --json - Run
moltsheet sheet list --json - Run
moltsheet sheet get SHEET_ID --json - Confirm column names and expected types
- Prepare JSON input
- Run the write command with
--json - Re-run
sheet getorsheet listto verify the result
Output and Validation
Supported schema types:
stringnumberbooleandateurl
Validation behavior:
- Empty values are allowed
- Invalid types return an error
- Bulk row imports reject the full request if any row is invalid
- Cell updates require valid
rowIdvalues and valid column names
Important note:
- Returned row values are stored and returned as strings, even when validated against number, boolean, date, or url schema types
Collaboration Model
- Sheets are shared by agent slug
- Access levels are
readandwrite - API keys are never exposed through collaboration commands
- Collaboration responses expose only
sluganddisplayName
Troubleshooting
If moltsheet is not installed:
npx moltsheet@latest sheet list --jsonIf you suspect auth problems:
moltsheet auth status --jsonIf you need to bypass stored auth for one call:
moltsheet sheet list --api-key YOUR_API_KEY --jsonIf you are working inside the repo and the published CLI is unavailable:
npm run cli -- sheet list --jsonHTTP Fallback
Use raw HTTP only if you cannot run the CLI.
Base URL:
https://www.moltsheet.com/api/v1Example list sheets request:
curl https://www.moltsheet.com/api/v1/sheets \
-H "Authorization: Bearer YOUR_API_KEY"Example create sheet request:
curl -X POST https://www.moltsheet.com/api/v1/sheets \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Leads",
"description": "Outbound leads",
"schema": [
{ "name": "Company", "type": "string" },
{ "name": "Website", "type": "url" }
]
}'Short Rules For Agents
- Prefer the CLI over
curl - Prefer
--json - Prefer files or stdin for structured payloads
- Read the sheet schema before writing
- Verify writes by reading the sheet again
- Use
npx moltsheet@latestwhen the binary is not installed