Files
inkreach-teable-cli/.agents/skills/inkreach-teable/guides/cli-reference.md
T
yeuimu d3790ab856 refactor: rename skill 'inkreach-teable-ops' -> 'inkreach-teable'
Rename the skill directory and update all references (SKILL.md frontmatter
name, AGENTS.md, design doc, install.sh). Git tracks this as a rename so
history is preserved.
2026-08-05 10:35:04 +08:00

6.6 KiB

CLI Reference

Complete command reference for inkreach-teable. Global options apply to all commands.

Global Options

Option Description
--endpoint <url> Backend URL (default http://localhost:3000)
--token <pat> Personal Access Token
--base-id <id> Default base id
--json Output raw JSON (for agent parsing)
--debug Print HTTP requests/responses to stderr
-v, --version Show version

Config precedence: global flag > env (INKREACH_TEABLE_ENDPOINT/INKREACH_TEABLE_TOKEN/INKREACH_TEABLE_BASE_ID) > ~/.inkreach-teable/config.json.

auth

inkreach-teable auth status                              # verify token + show user
inkreach-teable auth login --endpoint <url> --token <PAT> [--base-id <id>]
inkreach-teable auth token list
inkreach-teable auth token create --name <n> [--scopes <csv>] [--base-ids <csv>] [--full-access] [--expires <date>]
inkreach-teable auth token delete <id>
  • auth token create returns the full token only once. Default scopes: automation|read,automation|create,automation|update,automation|delete,table|read,record|read,record|create,record|update.

base / table / field / record / view

These resources use the official-teable-compatible API. Full guide: tables-fields.md.

# base
inkreach-teable base list
inkreach-teable base get <baseId>

# table
inkreach-teable table list [--base-id <id>]
inkreach-teable table get <tableId>
inkreach-teable table create --name <n> [--base-id <id>] [--fields '<json>']
inkreach-teable table update <tableId> --name <n>
inkreach-teable table delete <tableId>

# field
inkreach-teable field list <tableId>
inkreach-teable field get <fieldId>
inkreach-teable field create --table-id <tid> --name <n> --type <t> [--options '<json>']
inkreach-teable field update <fieldId> [--name <n>] [--options '<json>']
inkreach-teable field delete <fieldId>

# record
inkreach-teable record get --table-id <tid> [--filter '<json>'] [--projection '<json>'] [--page-size <n>] [--page <n>] [--search <kw>]
inkreach-teable record get-one <recordId>
inkreach-teable record create --table-id <tid> --fields '<json>'            # single
inkreach-teable record create --table-id <tid> --records '<json>'           # batch
inkreach-teable record update --table-id <tid> --records '<json>'
inkreach-teable record delete --table-id <tid> --record-ids <csv>

# view
inkreach-teable view list <tableId>
inkreach-teable view get <viewId>
inkreach-teable view create --table-id <tid> --name <n> [--type <t>]
inkreach-teable view update <viewId> [--name <n>]
inkreach-teable view delete <viewId>

workflow

inkreach-teable workflow list [--base-id <id>]
inkreach-teable workflow get <workflowId> [--base-id <id>]
inkreach-teable workflow create --name <n> [--description <d>] [--base-id <id>]
inkreach-teable workflow update <workflowId> [--name <n>] [--description <d>] [--base-id <id>]
inkreach-teable workflow delete <workflowId> [--base-id <id>]
inkreach-teable workflow activate <workflowId> [--base-id <id>]
inkreach-teable workflow deactivate <workflowId> [--base-id <id>]
inkreach-teable workflow test <workflowId> [--base-id <id>]

Full automation flow: automation-guide.md.

trigger

inkreach-teable trigger set <workflowId> --type <T> [options] [--base-id <id>]
--type Required options
recordCreated --table-id
recordUpdated --table-id, --field-ids '<json>'
recordCondition --table-id, --conditions '<json>'
recordCreatedOrUpdated --table-id
formSubmitted --table-id, --form-id <id>
scheduledTime --schedule '{"timing":{"type":"minutes","interval":5}}'
buttonClick --table-id, --field-ids '<json>'
webhook (none)

Common optional: --batch '<json>' (record triggers only).

Details: trigger-types.md.

action

inkreach-teable action add <workflowId> --type <T> [options] [--base-id <id>]
inkreach-teable action update <workflowId> <nodeId> [--config '<json>'] [--code <js>] [--code-file <path>] [--name <n>]
inkreach-teable action delete <workflowId> <nodeId> [--base-id <id>]

Per-type options:

--type Options
script --code <js> / --code-file <path>, --timeout <ms>
sendEmail --to <email>, --subject <s>, --body <html>
httpRequest --url <u>, --method <m>, --headers <json>, --req-body <json>
createRecord --target-table <id>, --records <json>
updateRecord --target-table <id>, --records <json>
getRecords --target-table <id>, --query <json>

Details: action-types.md.

secret

inkreach-teable secret list <workflowId> [--base-id <id>]
inkreach-teable secret set <workflowId> --name <n> --value <v> [--description <d>] [--base-id <id>]
inkreach-teable secret update <workflowId> <secretId> [--name <n>] [--value <v>] [--description <d>] [--base-id <id>]
inkreach-teable secret delete <workflowId> <secretId> [--base-id <id>]

Values are write-only — list never returns them. Scripts read via process.env.<NAME>.

runs

inkreach-teable runs list <workflowId> [--status failed|succeeded|running] [--base-id <id>]
inkreach-teable runs get <workflowId> <executionId> [--base-id <id>]
inkreach-teable runs rerun <workflowId> <executionId> [--base-id <id>]

rerun only works on failed executions (backend validates).

fire

inkreach-teable fire button-click <tableId> <recordId> <fieldId>
inkreach-teable fire webhook <baseId> <workflowId> [--body '<json>'] [--method <m>]

Manually trigger for testing. Webhook needs no auth (backend is @Public).

sql

inkreach-teable sql '<SELECT ...>' [--base-id <id>]

Read-only. Must use dbTableName/dbFieldName (from table get/field get), double-quote identifiers, add LIMIT 100.

inkreach-teable sql 'SELECT "name" FROM "bseXXX"."tbl_abc" LIMIT 10'

Output Modes

  • Human (default): tables / key-values, colored where supported.
  • --json: compact raw JSON on stdout. Errors in JSON mode:
    { "error": { "status": 404, "code": "NOT_FOUND", "message": "..." } }
    
    (exit code 1)

Error Troubleshooting

  1. inkreach-teable auth status — token valid? endpoint reachable?
  2. Verify IDs: table get, field get, workflow get (typo'd IDs → 404).
  3. Check permissions: token scopes + base role. 403 → role too low.
  4. --debug to see the raw HTTP request/response.