# CLI Reference Complete command reference for `inkreach-teable`. Global options apply to all commands. ## Global Options | Option | Description | |--------|-------------| | `--endpoint ` | Backend URL, e.g. `https://table.inkreach.cc` | | `--token ` | Personal Access Token | | `--base-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 ```bash inkreach-teable auth status # verify token + show user inkreach-teable auth login --endpoint --token [--base-id ] inkreach-teable auth token list inkreach-teable auth token create --name [--scopes ] [--base-ids ] [--full-access] [--expires ] inkreach-teable auth token delete ``` - `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`. ## space / base ```bash inkreach-teable space list inkreach-teable space create --name "" inkreach-teable base create --space-id --name "" inkreach-teable base delete # DESTRUCTIVE: soft-deletes all tables in it ``` ## base / table / field / record / view These resources use the official-teable-compatible API. Full guide: [tables-fields.md](tables-fields.md). ```bash # base inkreach-teable base list inkreach-teable base get # table inkreach-teable table list [--base-id ] inkreach-teable table get inkreach-teable table create --name [--base-id ] [--fields ''] inkreach-teable table update --name inkreach-teable table delete # field (get/update/visible-choices take — id or display name, auto-resolved) inkreach-teable field list # --table-id also accepted [--with-options] # --with-options: OPTIONS summary column + per-choice visibility conditions for select fields inkreach-teable field get # human mode renders select choices with their visibilityFilter conditions; --json for raw inkreach-teable field create --table-id --name [--type ] [--options ''] \ [--description ] [--lookup-options ''] [--is-lookup] # --type optional: inferred from --options shape / --name when omitted inkreach-teable field update [--name ] [--options ''] # --options goes via convert API inkreach-teable field visible-choices # evaluate select-choice visibilityFilter inkreach-teable field delete # record inkreach-teable record get --table-id [--filter ''] [--projection ''] [--page-size |--take ] [--page |--skip ] [--search ] [--record-id ] inkreach-teable record list --table-id [...] # alias of record get inkreach-teable record get-one --table-id inkreach-teable record create --table-id --fields '' # single inkreach-teable record create --table-id --records '' # batch inkreach-teable record update --table-id --records '' inkreach-teable record delete --table-id [recordId ...] # or --record-ids # view inkreach-teable view list inkreach-teable view get inkreach-teable view create --table-id --name [--type ] inkreach-teable view update [--name ] inkreach-teable view delete # view presets (view-scoped shared named filter/sort bundles, applied via toolbar) inkreach-teable preset list [--view-id ] inkreach-teable preset create --table-id --view-id --name [--description ] \ [--filter ''] [--sort ''] [--group ''] [--options ''] [--column-meta ''] inkreach-teable preset update --table-id [--name ] [--description ] [--filter '' ...] inkreach-teable preset delete --table-id ``` ## workflow ```bash inkreach-teable workflow list [--base-id ] inkreach-teable workflow get [--base-id ] inkreach-teable workflow create --name [--description ] [--base-id ] inkreach-teable workflow update [--name ] [--description ] [--base-id ] inkreach-teable workflow delete [--base-id ] inkreach-teable workflow activate [--base-id ] inkreach-teable workflow deactivate [--base-id ] inkreach-teable workflow test [--base-id ] ``` Full automation flow: [automation-guide.md](automation-guide.md). ## trigger ```bash inkreach-teable trigger set --type [options] [--base-id ] ``` | `--type` | Required options | |----------|------------------| | `recordCreated` | `--table-id` | | `recordUpdated` | `--table-id`, `--field-ids ''` | | `recordCondition` | `--table-id`, `--conditions ''` | | `recordCreatedOrUpdated` | `--table-id` | | `formSubmitted` | `--table-id`, `--form-ids ` | | `scheduledTime` | `--schedule '{"timing":{"type":"minutes","interval":5}}'` | | `buttonClick` | `--table-id`, `--field-ids ''` | | `webhook` | (none) | Common optional: `--batch ''` (record triggers only). Details: [trigger-types.md](../api-reference/trigger-types.md). ## action ```bash inkreach-teable action add --type [options] [--base-id ] inkreach-teable action update [--config ''] [--code ] [--code-file ] [--name ] inkreach-teable action delete [--base-id ] ``` Per-type options: | `--type` | Options | |----------|---------| | `script` | `--code ` / `--code-file `, `--timeout ` | | `sendEmail` | `--to `, `--subject `, `--body ` | | `httpRequest` | `--url `, `--method `, `--headers `, `--req-body ` | | `createRecord` | `--target-table `, `--records ` | | `updateRecord` | `--target-table `, `--records ` | | `getRecords` | `--target-table `, `--query ` | | `sendNotification` | `--to-user `, `--title `, `--message `, `--severity `, `--path ` | Details: [action-types.md](../api-reference/action-types.md). ## secret ```bash inkreach-teable secret list [--base-id ] inkreach-teable secret set --name --value [--description ] [--base-id ] inkreach-teable secret update [--name ] [--value ] [--description ] [--base-id ] inkreach-teable secret delete [--base-id ] ``` Values are write-only — `list` never returns them. Scripts read via `process.env.`. ## runs ```bash inkreach-teable runs list [--status failed|succeeded|running] [--base-id ] inkreach-teable runs get [--base-id ] inkreach-teable runs rerun [--base-id ] ``` `rerun` only works on `failed` executions (backend validates). ## fire ```bash inkreach-teable fire button-click inkreach-teable fire webhook [--body ''] [--method ] ``` Manually trigger for testing. Webhook needs no auth (backend is `@Public`). ## subscription ```bash inkreach-teable subscription list inkreach-teable subscription get inkreach-teable subscription create --name --table-id [options] inkreach-teable subscription update [options] inkreach-teable subscription delete inkreach-teable subscription events inkreach-teable subscription send ``` Record digest/instant email subscriptions. Options (`--filter`, `--send-mode`, `--schedule-*`, `--trigger-on-enter`, …) and semantics: [subscription.md](subscription.md). ## plugin Manage plugins and developer whitelist. ```bash # 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 --name [--positions '["panel"]'] [--logo ] [--description ] # 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 # add (userId or email) inkreach-teable plugin dev revoke # remove # Install / uninstall (creates a base-level mount node) inkreach-teable plugin install --plugin --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 # Enable/disable plugins inkreach-teable plugin config enable --plugin inkreach-teable plugin config disable --plugin # CSP apiOrigins (external origins plugins may fetch) inkreach-teable plugin csp list inkreach-teable plugin csp set --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: ```json { "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.