docs(skill): 去除全部 localhost:3003 —— 一律使用公网地址 table.inkreach.cc

skill 面向公开分发,不应包含部署机内网地址。SKILL.md / cli-reference /
rest-api / instance-access 共 10 处替换;rest-api 双源表与 ssh 隧道
兜底整段删除(前端 rewrite 已让域名全功能可用)。
This commit is contained in:
yeuimu
2026-09-23 05:54:15 +00:00
parent 65437e59d4
commit d81d14bd52
4 changed files with 10 additions and 23 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ Respond in the user's language. Keep answers concise and action-oriented.
## 1. Prerequisites ## 1. Prerequisites
- Install the CLI if missing: `npm i -g git+https://gitea.inkreach.cc/inkreachhub/inkreach-teable-cli.git` (the `git+` prefix is REQUIRED for npm/npx; ad-hoc without installing: `npx git+https://gitea.inkreach.cc/inkreachhub/inkreach-teable-cli.git <cmd>`). Offline fallback: `bash scripts/install.sh` relative to this skill dir in a repo clone. - Install the CLI if missing: `npm i -g git+https://gitea.inkreach.cc/inkreachhub/inkreach-teable-cli.git` (the `git+` prefix is REQUIRED for npm/npx; ad-hoc without installing: `npx git+https://gitea.inkreach.cc/inkreachhub/inkreach-teable-cli.git <cmd>`). Offline fallback: `bash scripts/install.sh` relative to this skill dir in a repo clone.
- **Configure once**: `inkreach-teable auth login --endpoint http://localhost:3003 --token <PAT> [--base-id bseXXX]`; verify with `auth status`. PAT comes from `auth token create --name x` (full token shown **once**) or the web UI (Settings → Personal Access Tokens). - **Configure once**: `inkreach-teable auth login --endpoint https://table.inkreach.cc --token <PAT> [--base-id bseXXX]`; verify with `auth status`. PAT comes from `auth token create --name x` (full token shown **once**) or the web UI (Settings → Personal Access Tokens).
- `--json` on any command returns raw JSON (for agent parsing). Fallback for unknown commands: `inkreach-teable <cmd> --help`. - `--json` on any command returns raw JSON (for agent parsing). Fallback for unknown commands: `inkreach-teable <cmd> --help`.
- **Read on demand**: consult the guide linked for your module when doing non-trivial work — no need to read everything up front. - **Read on demand**: consult the guide linked for your module when doing non-trivial work — no need to read everything up front.
@@ -88,7 +88,7 @@ These differ from official teable and from the (stale) `docs/automation/triggers
## 4. Quick Syntax ## 4. Quick Syntax
```bash ```bash
inkreach-teable auth login --endpoint http://localhost:3003 --token <PAT> # once inkreach-teable auth login --endpoint https://table.inkreach.cc --token <PAT> # once
inkreach-teable table create --name "Tasks" --fields '[{"name":"Title","type":"text"},{"name":"Status","type":"singleSelect","options":{"choices":["Todo","Done"]}}]' inkreach-teable table create --name "Tasks" --fields '[{"name":"Title","type":"text"},{"name":"Status","type":"singleSelect","options":{"choices":["Todo","Done"]}}]'
inkreach-teable workflow create --name "On Go click" # → wflXXX inkreach-teable workflow create --name "On Go click" # → wflXXX
inkreach-teable trigger set wflXXX --type buttonClick --table-id tblXXX --field-ids '["fldXXX"]' inkreach-teable trigger set wflXXX --type buttonClick --table-id tblXXX --field-ids '["fldXXX"]'
@@ -11,15 +11,8 @@ the CLI. For one-off table/automation operations, prefer the CLI.
## 1. Base URL & Authentication ## 1. Base URL & Authentication
Two origins — pick by where you run:
| Origin | API (`/api/*`) | Swagger (`/docs`, `/docs-json`) |
|---|---|---|
| Public domain, e.g. `https://table.inkreach.cc` | ✅ works (proxied to backend) | ✅ works (frontend rewrite, since 2026-09-23) |
| Backend origin, e.g. `http://localhost:3003` (reference deployment) | ✅ | ✅ |
```bash ```bash
BASE=https://table.inkreach.cc # or http://localhost:3003 on the backend host BASE=https://table.inkreach.cc
TOKEN=teable_xxx_yyy # PAT; web UI Settings → Personal Access Tokens TOKEN=teable_xxx_yyy # PAT; web UI Settings → Personal Access Tokens
curl -s "$BASE/api/auth/user" -H "Authorization: Bearer $TOKEN" # verify → 200 + user JSON curl -s "$BASE/api/auth/user" -H "Authorization: Bearer $TOKEN" # verify → 200 + user JSON
``` ```
@@ -99,7 +92,7 @@ MUST be the `search[]` tuple form, plain `search=` is ignored), `skip` / `take`
## 3. Canonical Examples ## 3. Canonical Examples
```bash ```bash
BASE=http://localhost:3003; AUTH="Authorization: Bearer $TOKEN" BASE=https://table.inkreach.cc; AUTH="Authorization: Bearer $TOKEN"
# create records (single + bulk). typecast: accepts strings for non-text # create records (single + bulk). typecast: accepts strings for non-text
# fields; fieldKeyType 'id' = keys are fld ids ('name' = field names) # fields; fieldKeyType 'id' = keys are fld ids ('name' = field names)
@@ -165,16 +158,10 @@ const res = await fetch(triggerInput._apiBaseUrl + "/api/table/tblB/record", {
The backend exposes **~362 paths**; this guide documents the The backend exposes **~362 paths**; this guide documents the
agent-operational core (what the CLI wraps). The authoritative full spec is agent-operational core (what the CLI wraps). The authoritative full spec is
the live OpenAPI JSON — served on the backend origin, and on the public the live OpenAPI JSON at `$BASE/docs-json` (browsable UI: `$BASE/docs`):
domain via the frontend rewrite (`/docs`, `/docs-json`; verified 2026-09-23):
```bash ```bash
curl -s "$BASE/docs-json" | python3 -c "import json,sys; [print(m.upper(), p) for p,o in json.load(sys.stdin)['paths'].items() for m in o]" curl -s "$BASE/docs-json" | python3 -c "import json,sys; [print(m.upper(), p) for p,o in json.load(sys.stdin)['paths'].items() for m in o]"
# browsable UI: $BASE/docs
# deployments WITHOUT that rewrite: docs-json only exists on the backend
# origin — reach it via an ssh tunnel from other machines:
ssh -L 3003:localhost:3003 <backend-host> # then use http://localhost:3003/docs-json
``` ```
### ⚠️ Swagger is a curated registry, NOT an auto-scan (audited 2026-09-23) ### ⚠️ Swagger is a curated registry, NOT an auto-scan (audited 2026-09-23)
@@ -219,7 +206,7 @@ automation webhook route), plugin UI endpoints (`/api/plugin/*` panels,
chart, proxy), `/api/v2/integrity`, `/api/v1/ai-proxy`. chart, proxy), `/api/v2/integrity`, `/api/v1/ai-proxy`.
When you use one of these, verify the exact param shape before calling — When you use one of these, verify the exact param shape before calling —
from docs-json (backend origin / domain / ssh tunnel), or from the backend from docs-json, or from the backend
source: source:
`grep -rh "@Controller(\|@Get(\|@Post(\|@Patch(\|@Put(\|@Delete(" apps/nestjs-backend/src/features --include='*.controller.ts'` `grep -rh "@Controller(\|@Get(\|@Post(\|@Patch(\|@Put(\|@Delete(" apps/nestjs-backend/src/features --include='*.controller.ts'`
in the inkreach-teable app repo. Do not guess key names (the automation in the inkreach-teable app repo. Do not guess key names (the automation
@@ -6,7 +6,7 @@ Complete command reference for `inkreach-teable`. Global options apply to all co
| Option | Description | | Option | Description |
|--------|-------------| |--------|-------------|
| `--endpoint <url>` | Backend URL (default `http://localhost:3003`) | | `--endpoint <url>` | Backend URL, e.g. `https://table.inkreach.cc` |
| `--token <pat>` | Personal Access Token | | `--token <pat>` | Personal Access Token |
| `--base-id <id>` | Default base id | | `--base-id <id>` | Default base id |
| `--json` | Output raw JSON (for agent parsing) | | `--json` | Output raw JSON (for agent parsing) |
@@ -9,7 +9,7 @@ endpoint/ports for your own deployment.
| Service | URL / Port | Mode | Purpose | | Service | URL / Port | Mode | Purpose |
|---------|-----------|------|---------| |---------|-----------|------|---------|
| Public domain | `https://table.inkreach.cc` | — | Frontend UI + `/api/*` and `/docs`+`/docs-json` proxied to backend (frontend next.config.js rewrites, since 2026-09-23) | | Public domain | `https://table.inkreach.cc` | — | Frontend UI + `/api/*` and `/docs`+`/docs-json` proxied to backend (frontend next.config.js rewrites, since 2026-09-23) |
| Backend API | `http://localhost:3003` | production (`NODE_ENV=production`) | REST API, automation engine, websocket, swagger `/docs` + `/docs-json` | | Backend API | `https://table.inkreach.cc` | production (`NODE_ENV=production`) | REST API, automation engine, websocket, swagger `/docs` + `/docs-json` |
| Frontend | `http://localhost:3002` | production | End-user web UI (Next.js) | | Frontend | `http://localhost:3002` | production | End-user web UI (Next.js) |
| PostgreSQL | `localhost:5432` | — | Database (db: `teable`, user: `teable`) | | PostgreSQL | `localhost:5432` | — | Database (db: `teable`, user: `teable`) |
| Redis | `localhost:6379` | — | BullMQ queue for automation runs, distributed lock | | Redis | `localhost:6379` | — | BullMQ queue for automation runs, distributed lock |
@@ -22,7 +22,7 @@ endpoint/ports for your own deployment.
```bash ```bash
# Backend API up? # Backend API up?
curl -s -o /dev/null -w '%{http_code}' http://localhost:3003/api/auth/signin -X POST \ curl -s -o /dev/null -w '%{http_code}' https://table.inkreach.cc/api/auth/signin -X POST \
-H 'Content-Type: application/json' -d '{}' # expect 401 (endpoint exists, bad creds) -H 'Content-Type: application/json' -d '{}' # expect 401 (endpoint exists, bad creds)
# Frontend up? # Frontend up?
@@ -60,7 +60,7 @@ Note: `auth token list/create` may require a **session** (browser login) rather
### Configure the CLI ### Configure the CLI
```bash ```bash
inkreach-teable auth login --endpoint http://localhost:3003 --token <PAT> --base-id bseXXX inkreach-teable auth login --endpoint https://table.inkreach.cc --token <PAT> --base-id bseXXX
inkreach-teable auth status # verify inkreach-teable auth status # verify
``` ```