Install
openclaw skills install moltsheetUse the Moltsheet CLI to manage spreadsheet-style data for AI workflows: create sheets, inspect schemas, import rows, update cells, share sheets, and run read-only SQL queries over accessible sheets. Use when Codex needs Moltsheet data access, filtered reads, selected columns, joins, aggregates, or spreadsheet mutations. Prefer the CLI over raw HTTP, authenticate once, use `--json`, and use files or stdin for structured payloads.
openclaw skills install moltsheetMoltsheet 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, query filtered data, import rows, update cells, or share sheets with another agent, use the CLI first.
When handling Moltsheet as an agent, follow this order:
moltsheet --versionnpx moltsheet@latest ... or install it globallymoltsheet auth loginmoltsheet whoami --json--json whenever another tool, script, or agent will read the outputsql tables before SQL queries, so you know the accessible table and column namessheet list and sheet get before writing, so you understand the target schemaPreferred global install:
npm install -g moltsheet
One-off usage without installing:
npx moltsheet@latest auth status
If 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 status
Authenticate once:
moltsheet auth login
Or pass the API key directly:
moltsheet auth login --api-key YOUR_API_KEY
Check current auth state:
moltsheet auth status --json
Show the current agent identity without exposing the API key:
moltsheet whoami --json
Clear stored auth:
moltsheet auth logout
Credential resolution order:
--api-keyMOLTSHEET_API_KEYauth loginStorage behavior:
keytarThe CLI targets the production Moltsheet service by default:
https://www.moltsheet.com
Register an agent:
moltsheet agent register --display-name "Research Bot" --slug research.bot --json
Identify the authenticated agent:
moltsheet whoami --json
List sheets:
moltsheet sheet list --json
Inspect one sheet:
moltsheet sheet get SHEET_ID --json
Read a filtered subset of a sheet:
moltsheet sheet get SHEET_ID --columns "Company,Qualified" --filter "Qualified:eq:true" --json
List SQL table names for accessible sheets:
moltsheet sql tables --json
Run a read-only SQL query against those sheet-like tables:
moltsheet sql query --query "select company, website from leads where qualified = true limit 10" --json
Read SQL from a file:
moltsheet sql query --file query.sql --json
Read SQL from stdin with a lower result cap:
cat query.sql | moltsheet sql query --stdin --limit 500 --json
Use SQL when you need filtered rows, selected columns, joins, grouping, counts, sorting, or other read-only analysis without downloading full sheet rows.
moltsheet sql tables --json.sqlName or sqlNames.sqlName values for columns, not display names with spaces.where, order by, and limit clauses when possible.Moltsheet exposes each accessible sheet as a logical SQL table. Every table includes:
__row_id: the Moltsheet row UUID__row_order: the sheet row orderExample filtered projection:
moltsheet sql query --query "select company, ceo_name from sidewalk_robotics_companies_top_50 where company ilike '%robot%' order by __row_order limit 10" --json
Example aggregate:
moltsheet sql query --query "select commented, count(*)::int as total from linkedin_posts_20260223_023644 group by commented" --json
Example join across accessible sheets:
moltsheet sql query --query "select a.company, b.post_url from sidewalk_robotics_companies_top_50 a cross join linkedin_posts_20260223_023644 b limit 5" --json
SQL safety model:
SELECT only.agents, sheets, rows, cells, columns, and collaborators are not available.--limit to request a smaller cap.read and write collaborators can query shared sheets, but SQL never grants write access.Update a sheet:
moltsheet sheet update SHEET_ID --name "Leads v2" --json
Update a schema and allow destructive changes:
cat schema.json | moltsheet sheet update SHEET_ID --schema-stdin --confirm-data-loss --json
Delete a sheet:
moltsheet sheet delete SHEET_ID --json
Create a sheet from schema stdin:
cat schema.json | moltsheet sheet create "Leads" --schema-stdin --json
Create empty rows:
moltsheet row add SHEET_ID --count 10 --json
Add one row from stdin:
cat row.json | moltsheet row add SHEET_ID --data-stdin --json
Import multiple rows:
cat rows.json | moltsheet row import SHEET_ID --stdin --json
Import multiple JSON rows through the dedicated sheet import route:
cat rows.json | moltsheet sheet import SHEET_ID --stdin --json
Import a CSV file into an existing sheet:
moltsheet sheet import SHEET_ID --csv-file data.csv --json
Import CSV from stdin:
cat data.csv | moltsheet sheet import SHEET_ID --csv-stdin --json
Large JSON and CSV imports are batched automatically by the CLI. Use --batch-size only when you need smaller server requests:
moltsheet sheet import SHEET_ID --csv-file data.csv --batch-size 500 --json
CSV import rules:
--csv-file or --csv-stdinList rows:
moltsheet row list SHEET_ID --json
Delete rows by ID:
cat row-ids.json | moltsheet row delete SHEET_ID --stdin --json
Delete one row by index:
moltsheet row delete-index SHEET_ID 0 --json
Update cells:
cat updates.json | moltsheet cell update SHEET_ID --stdin --json
Add columns:
cat columns.json | moltsheet column add SHEET_ID --stdin --json
Delete columns by index list:
cat indices.json | moltsheet column delete SHEET_ID --stdin --json
Delete one column by index:
moltsheet column delete-index SHEET_ID 1 --json
Rename a column:
moltsheet column rename SHEET_ID 0 --name "Company Name" --json
Share a sheet:
moltsheet share add SHEET_ID --slug analyst.bot --access write --json
List collaborators:
moltsheet share list SHEET_ID --json
Remove a collaborator:
moltsheet share remove SHEET_ID --slug analyst.bot --json
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
}
]
Use this operating style:
--json for machine-readable outputsheet list or sheet get before mutating datasheet import for the dedicated sheet import route and row import for rows-endpoint bulk insert behaviorsheet import --csv-file or --csv-stdin for CSV files instead of converting large CSVs to JSON--batch-size if the server asks for smaller batchessql query for filtered/projection reads so you avoid fetching full rows when only selected columns or matching rows are neededRecommended write workflow:
moltsheet auth status --jsonmoltsheet whoami --jsonmoltsheet sheet list --jsonmoltsheet sheet get SHEET_ID --json--jsonsheet get or sheet list to verify the resultSupported schema types:
stringnumberbooleandateurlValidation behavior:
rowId values and valid column namesImportant note:
Import errors are designed to tell an agent what to do next. In --json mode, inspect:
error.code - stable machine-readable failure codeerror.message - what failederror.action - the adjustment to make before retryingerror.retryable - whether retrying without changing input may helperror.batch and error.rowRange - which batch or source rows failederror.column - the relevant column when validation failsCommon adjustments:
unknown_csv_headers: rename CSV headers to match sheet columns exactly, or update the sheet schema firsttype_validation_failed: fix the listed row and column value to match the sheet typebatch_too_large or server payload errors: rerun with a smaller --batch-sizeschema_lookup_failed: verify authentication, sheet ID, and access before retryingAfter correcting schema or data issues, rerun the same source import command. Previously successful batches remain committed; the failed batch writes zero rows.
read and writeslug and displayNameIf moltsheet is not installed:
npx moltsheet@latest sheet list --json
If you suspect auth problems:
moltsheet auth status --json
moltsheet whoami --json
If you need to bypass stored auth for one call:
moltsheet sheet list --api-key YOUR_API_KEY --json
If you are working inside the repo and the published CLI is unavailable:
npm run cli -- sheet list --json
Use raw HTTP only if you cannot run the CLI.
Base URL:
https://www.moltsheet.com/api/v1
Example 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" }
]
}'
Example SQL tables request:
curl https://www.moltsheet.com/api/v1/sql/tables \
-H "Authorization: Bearer YOUR_API_KEY"
Example SQL query request:
curl -X POST https://www.moltsheet.com/api/v1/sql/query \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sql": "select company, website from leads where qualified = true limit 10",
"limit": 100
}'
curl--jsonnpx moltsheet@latest when the binary is not installed