docs: README reduced to the agent bootstrap prompt only
This commit is contained in:
@@ -1,85 +1,18 @@
|
|||||||
# inkreach-teable-cli
|
# inkreach-teable-cli
|
||||||
|
|
||||||
操作 [inkreach-teable](ssh://git@gitea.inkreach.cc:2222/inkreachhub/inkreach-teable.git)
|
把下面这段引导词发给任意机器 / 任意会话中的 Agent,即可完成安装并开始使用:
|
||||||
实例(Teable fork + 自建自动化引擎)的独立工具项目,包含两部分:
|
|
||||||
|
|
||||||
| 内容 | 位置 | 说明 |
|
|
||||||
|---|---|---|
|
|
||||||
| **CLI**(命令 `inkreach-teable`) | 仓库根(`src/`,包即仓库) | 表、字段、记录、视图、自动化(8 触发器 + 7 动作)、密钥、执行历史、插件、订阅等全部 REST API 封装 |
|
|
||||||
| **Agent Skill** | `skills/inkreach-teable/` | ZCode 技能:模块地图、路由规则、API 参考、实例运维指南(安装到 `~/.zcode/skills/` 用户级后生效) |
|
|
||||||
|
|
||||||
设计文档见 [`docs/cli-skill-design.md`](docs/cli-skill-design.md)。
|
|
||||||
|
|
||||||
> ⚠️ 官方 `teable` CLI 与本实例的自动化契约不兼容(`conditions` 而非 `filter`、
|
|
||||||
> `fieldIds` 而非 `watchFieldIds` 等),务必使用 `inkreach-teable`。
|
|
||||||
|
|
||||||
## 安装
|
|
||||||
|
|
||||||
仓库地址(https 匿名可读):`https://gitea.inkreach.cc/inkreachhub/inkreach-teable-cli.git`
|
|
||||||
|
|
||||||
**CLI —— npx 免安装直接用**(首次自动 clone + 构建,之后走缓存):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npx git+https://gitea.inkreach.cc/inkreachhub/inkreach-teable-cli.git --help
|
|
||||||
```
|
|
||||||
|
|
||||||
**CLI —— 全局安装**(获得裸 `inkreach-teable` 命令):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm i -g git+https://gitea.inkreach.cc/inkreachhub/inkreach-teable-cli.git
|
|
||||||
```
|
|
||||||
|
|
||||||
**Skill —— 一条命令装到所有 Agent**(`~/.zcode/skills/`、`~/.claude/skills/`、`~/.agents/skills/` 等):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npx -y skills add https://gitea.inkreach.cc/inkreachhub/inkreach-teable-cli.git -g -y --copy
|
|
||||||
```
|
|
||||||
|
|
||||||
> ⚠️ **前缀差异**:npx/npm 安装 CLI 必须带 **`git+`** 前缀(裸 https 会被 npm 当成 tarball 下载而报 `TAR_BAD_ARCHIVE`);`skills add` 必须用**不带** `git+` 的纯 https URL(它把 URL 直接传给 git,带前缀会 clone 失败)。
|
|
||||||
|
|
||||||
更新:CLI 用 `npm rm -g @inkreach/teable-cli && npm i -g git+https://…` 重装;skill 用 `npx -y skills update` 或重跑上面的 `skills add`。
|
|
||||||
|
|
||||||
离线 / 无 npm 环境的兜底:clone 仓库后运行 `bash skills/inkreach-teable/scripts/install.sh`(构建 + 链接命令 + 复制 skill 到 `~/.zcode/skills/`)。
|
|
||||||
|
|
||||||
## 配置
|
|
||||||
|
|
||||||
```bash
|
|
||||||
inkreach-teable auth login --endpoint http://localhost:3003 --token <PAT> --base-id bseXXX
|
|
||||||
inkreach-teable auth status
|
|
||||||
```
|
|
||||||
|
|
||||||
PAT 从 Web UI(Settings → Personal Access Tokens)或 `auth token create` 获取。
|
|
||||||
|
|
||||||
## 开发
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pnpm install
|
|
||||||
pnpm build # tsc → dist/
|
|
||||||
pnpm test # vitest 单测(field-normalize / field-display / resources)
|
|
||||||
pnpm typecheck
|
|
||||||
```
|
|
||||||
|
|
||||||
## Agent 引导词
|
|
||||||
|
|
||||||
在任意新机器 / 新会话中,把下面这段直接发给 Agent,即可引导它完成安装并开始使用:
|
|
||||||
|
|
||||||
```text
|
```text
|
||||||
请为操作 inkreach-teable 实例安装 inkreach-teable CLI 及配套 skill:
|
请安装并使用 inkreach-teable CLI 操作 inkreach-teable 实例(Teable fork + 自建自动化引擎):
|
||||||
1. 全局安装 CLI:
|
1. 全局安装 CLI(npm/npx 必须带 git+ 前缀,裸 https 会被当 tarball 下载而报 TAR_BAD_ARCHIVE):
|
||||||
npm i -g git+https://gitea.inkreach.cc/inkreachhub/inkreach-teable-cli.git
|
npm i -g git+https://gitea.inkreach.cc/inkreachhub/inkreach-teable-cli.git
|
||||||
(免安装用法:npx git+https://gitea.inkreach.cc/inkreachhub/inkreach-teable-cli.git <子命令>)
|
免安装用法:npx git+https://gitea.inkreach.cc/inkreachhub/inkreach-teable-cli.git <子命令>
|
||||||
2. 安装 skill 到用户级(注意:这条必须用不带 git+ 前缀的纯 https URL):
|
2. 安装 skill 到用户级(这条必须用不带 git+ 的纯 https URL,skills 把 URL 直接传给 git,带前缀会 clone 失败):
|
||||||
npx -y skills add https://gitea.inkreach.cc/inkreachhub/inkreach-teable-cli.git -g -y --copy
|
npx -y skills add https://gitea.inkreach.cc/inkreachhub/inkreach-teable-cli.git -g -y --copy
|
||||||
|
会装入 ~/.zcode/skills、~/.claude/skills、~/.agents/skills 等所有 agent 目录(新会话自动加载,当前会话直接阅读该文件)。
|
||||||
3. 配置认证并验证(PAT 从 Web UI Settings → Personal Access Tokens 获取):
|
3. 配置认证并验证(PAT 从 Web UI Settings → Personal Access Tokens 获取):
|
||||||
inkreach-teable auth login --endpoint http://<后端地址> --token <PAT> --base-id bseXXX
|
inkreach-teable auth login --endpoint http://<后端地址> --token <PAT> --base-id bseXXX
|
||||||
inkreach-teable auth status
|
inkreach-teable auth status
|
||||||
4. 之后按 ~/.zcode/skills/inkreach-teable/SKILL.md 的模块地图使用(skill 在新会话自动加载;
|
4. 使用入口:~/.zcode/skills/inkreach-teable/SKILL.md(模块地图、路由规则、API 参考、实例运维指南)。
|
||||||
当前会话直接阅读该文件即可)。注意:官方 teable CLI 与本实例自动化契约不兼容,必须用 inkreach-teable。
|
⚠️ 官方 teable CLI 与本实例自动化契约不兼容(conditions 非 filter、fieldIds 非 watchFieldIds 等),必须用 inkreach-teable。
|
||||||
```
|
```
|
||||||
|
|
||||||
## 来源
|
|
||||||
|
|
||||||
2026-09-23 从 inkreach-teable monorepo 拆分独立(原路径 `packages/inkreach-cli/` +
|
|
||||||
`.agents/skills/inkreach-teable/`,后者在本仓库移至 `skills/inkreach-teable/`),git 历史完整保留。应用本体的开发/部署文档见
|
|
||||||
skill 内 [development.md](skills/inkreach-teable/guides/development.md)(描述的是
|
|
||||||
inkreach-teable 应用仓库,不是本仓库)。
|
|
||||||
|
|||||||
Reference in New Issue
Block a user