- field list/get、view list、preset list 接受 --table-id(位置参数之外) - record get/list 接受 --take/--skip 别名(= --page-size/--page 的原始偏移) - scripts/smoke-commands.sh: 全命令冒烟套件,一次性验证所有 CLI 命令 无幻影路由/无 CLI 语法错/无 CLI 请求形状错(80/80 通过,含 8 种触发器、 preset/secret/subscription/plugin 只读命令) - 轨迹依据: iteration-4 中 agent 猜 --table-id/--take 被拒,别名后归零
9.9 KiB
CLI Reference
Complete command reference for inkreach-teable. Global options apply to all commands.
Global Options
| Option | Description |
|---|---|
--endpoint <url> |
Backend URL, e.g. https://table.inkreach.cc |
--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 createreturns 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 (get/update/visible-choices take <tableId> <fieldIdOrName> — id or display name, auto-resolved)
inkreach-teable field list <tableId> # --table-id <id> also accepted [--with-options]
# --with-options: OPTIONS summary column + per-choice visibility conditions for select fields
inkreach-teable field get <tableId> <fieldIdOrName>
# human mode renders select choices with their visibilityFilter conditions; --json for raw
inkreach-teable field create --table-id <tid> --name <n> [--type <t|alias>] [--options '<json>'] \
[--description <d>] [--lookup-options '<json>'] [--is-lookup]
# --type optional: inferred from --options shape / --name when omitted
inkreach-teable field update <tableId> <fieldIdOrName> [--name <n>] [--options '<json>'] # --options goes via convert API
inkreach-teable field visible-choices <tableId> <recordId> <fieldIdOrName> # evaluate select-choice visibilityFilter
inkreach-teable field delete <tableId> <fieldId>
# record
inkreach-teable record get --table-id <tid> [--filter '<json>'] [--projection '<json>'] [--page-size <n>|--take <n>] [--page <n>|--skip <n>] [--search <kw>] [--record-id <rid>]
inkreach-teable record list --table-id <tid> [...] # alias of record get
inkreach-teable record get-one <recordId> --table-id <tid>
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> <recordId> [recordId ...] # or --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>
# view presets (view-scoped shared named filter/sort bundles, applied via toolbar)
inkreach-teable preset list <tableId> [--view-id <vid>]
inkreach-teable preset create --table-id <tid> --view-id <vid> --name <n> [--description <d>] \
[--filter '<json>'] [--sort '<json>'] [--group '<json>'] [--options '<json>'] [--column-meta '<json>']
inkreach-teable preset update <presetId> --table-id <tid> [--name <n>] [--description <d>] [--filter '<json>' ...]
inkreach-teable preset delete <presetId> --table-id <tid>
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-ids <csv> |
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> |
sendNotification |
--to-user <usrId>, --title <s>, --message <s>, --severity <s>, --path <s> |
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).
subscription
inkreach-teable subscription list
inkreach-teable subscription get <subscriptionId>
inkreach-teable subscription create --name <n> --table-id <tid> [options]
inkreach-teable subscription update <subscriptionId> [options]
inkreach-teable subscription delete <subscriptionId>
inkreach-teable subscription events <subscriptionId>
inkreach-teable subscription send <subscriptionId>
Record digest/instant email subscriptions. Options (--filter, --send-mode,
--schedule-*, --trigger-on-enter, …) and semantics: subscription.md.
plugin
Manage plugins and developer whitelist.
# List plugins registered in the base
inkreach-teable plugin list
# Register a URL-served plugin (runtimeType=url; status published immediately)
# positions: "base"|"panel"|"view"|"dashboard"|"contextMenu"
inkreach-teable plugin register --url <url> --name <name> [--positions '["panel"]'] [--logo <url>] [--description <d>]
# Bundle (upload) plugins use a different flow — see skill guides/tables-fields.md
# or api docs: create kebab-id plugin (developer whitelist) → upload → admin publish.
# Developer whitelist (admin only)
inkreach-teable plugin dev list
inkreach-teable plugin dev allow <userIdOrEmail> # add (userId or email)
inkreach-teable plugin dev revoke <userIdOrEmail> # remove
# Install / uninstall (creates a base-level mount node)
inkreach-teable plugin install --plugin <pluginId> --name "My Plugin" --position base
# ⚠️ For view/dashboard-position plugins, run `plugin config enable` BEFORE
# install, or the install API returns 403 RESTRICTED_RESOURCE
# 'Plugin is not enabled for this base'.
inkreach-teable plugin installs # list installs in current base
inkreach-teable plugin uninstall --install <installId>
# Enable/disable plugins
inkreach-teable plugin config enable --plugin <pluginId>
inkreach-teable plugin config disable --plugin <pluginId>
# CSP apiOrigins (external origins plugins may fetch)
inkreach-teable plugin csp list
inkreach-teable plugin csp set <pluginId> --origins '["http://192.168.x.x:8001"]'
Developer whitelist is admin-only (requires user.isAdmin=true). Routes:
/api/plugin-developers (GET/POST/DELETE).
Output Modes
- Human (default): tables / key-values, colored where supported.
--json: compact raw JSON on stdout. Errors in JSON mode:(exit code 1){ "error": { "status": 404, "code": "NOT_FOUND", "message": "..." } }
Error Troubleshooting
inkreach-teable auth status— token valid? endpoint reachable?- Verify IDs:
table get,field get,workflow get(typo'd IDs → 404). - Check permissions: token scopes + base role.
403→ role too low. --debugto see the raw HTTP request/response.