teamai-cli 0.20.0 → 0.21.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  Make every AI coding agent work by the same harness.
18
18
 
19
- Git-native management of skills, rules, and docs across Claude Code / Codex / CodeBuddy / WorkBuddy and more.
19
+ Git-native management of skills, rules, and docs across Claude Code / Codex / CodeBuddy / WorkBuddy / OpenCode and more.
20
20
 
21
21
  For you or your whole team.
22
22
 
@@ -30,9 +30,9 @@ npm install -g teamai-cli
30
30
 
31
31
  ### Team admin / solo user
32
32
 
33
- Create a shared-experience repo on your git host (GitHub, TGit, or CNB), **grant write access to team members**, then have them run `teamai init https://github.com/yourorg/yourrepo`.
33
+ Create a shared-experience repo on your git host (GitHub, GitLab (incl. self-hosted), CNB, TGit, or any private/self-hosted Git service), **grant write access to team members**, then have them run `teamai init https://github.com/yourorg/yourrepo`.
34
34
 
35
- > Solo use needs no separate repo setup: `teamai init` checks the target repo and creates it automatically if it doesn't exist.
35
+ > Self-hosted GitLab/Gitea-style services use your HTTPS credential helper or SSH key. Create the repository first; merge requests are created manually for now. See [Git Provider docs](docs/providers.md).
36
36
 
37
37
  > **No team repo yet?** Start from a template pre-loaded with production-ready skills, rules, and review agents. Browse the [teamai-hub](https://github.com/teamai-hub) org, click **Use this template**, then `teamai init` against your new repo.
38
38
 
@@ -45,11 +45,6 @@ teamai init https://github.com/yourorg/yourrepo
45
45
 
46
46
  # User-scope init (resources installed under ~/)
47
47
  teamai init https://github.com/yourorg/yourrepo --scope user
48
-
49
- # Optional layered setup: keep a project repo active while inheriting safe
50
- # resources and searchable knowledge from an initialized user-scope repo
51
- cd /path/to/my-project
52
- teamai init https://github.com/yourorg/project-repo --inherit-user-scope
53
48
  ```
54
49
 
55
50
  Once initialized, every AI session automatically pulls the latest skills / rules and other Harness updates published by admins — no manual sync needed.
@@ -64,16 +59,39 @@ teamai init . # interactive: pick which AI tools to set u
64
59
  teamai init . --agent claude,codex # non-interactive: Claude Code + Codex
65
60
  ```
66
61
 
67
- - **Knowledge** (skills / rules / docs / learnings) is committed to your repo's **main branch** under `.teamai/`, so a plain `git clone` already carries the whole team setup.
68
- - **Reports** (member registrations, session summaries, votes, usage stats) go to a separate **`teamai-reports` orphan branch** — they never touch main.
69
- - **You choose which AI tools to set up.** `--agent claude,codex` (repeatable/comma-separated), an interactive picker when omitted, or — in non-interactive contexts — whichever tools you already use under `~/`. teamai creates each selected tool's dir, injects hooks, and commits its settings.
70
- - **Clone = initialized.** When a teammate clones the repo, the next `teamai` command (or AI session) auto-detects the `mode: self` marker in `.teamai/teamai.yaml` and finishes local setup automatically — no need to re-type repo/role.
71
- - All of teamai's git operations run in isolated worktrees, so your working tree and current branch are never touched.
72
-
73
- `teamai init .` commits `.teamai/` (skills, rules, docs, learnings, `teamai.yaml`, `.gitignore`) plus each selected tool's settings (e.g. `.claude/settings.json`, `.codex/hooks.json`) for you; just push main so teammates get auto-initialized on clone.
74
-
75
62
  > **Full usage guide:** [docs/usage-guide.md](docs/usage-guide.md) ([中文版](docs/usage-guide.zh-CN.md)) — covers everything from team creation to day-to-day use.
76
63
 
64
+ ## Overview
65
+
66
+ <table>
67
+ <thead>
68
+ <tr>
69
+ <th rowspan="2">Agent</th>
70
+ <th colspan="7">Harness</th>
71
+ <th colspan="3">Knowledge Base</th>
72
+ <th colspan="3">Governance</th>
73
+ </tr>
74
+ <tr>
75
+ <th>skills</th><th>rules</th><th>docs</th><th>env</th><th>agents</th><th>hooks</th><th>mcp</th>
76
+ <th>learnings</th><th>codebase</th><th>teamwiki</th>
77
+ <th>usage</th><th>sessions</th><th>dashboard</th>
78
+ </tr>
79
+ </thead>
80
+ <tbody>
81
+ <tr><td>Claude Code</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td></tr>
82
+ <tr><td>Codex</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td></tr>
83
+ <tr><td>Cursor</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td></tr>
84
+ <tr><td>CodeBuddy</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td></tr>
85
+ <tr><td>OpenCode</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td></tr>
86
+ <tr><td>WorkBuddy</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td></tr>
87
+ <tr><td>OpenClaw</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td></tr>
88
+ <tr><td>Hermes</td><td align="center">✓</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td></tr>
89
+ <tr><td>DeepSeek Harness</td><td align="center">✓</td><td align="center">—</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td></tr>
90
+ </tbody>
91
+ </table>
92
+
93
+ **Git providers** — GitHub · GitLab (incl. self-hosted) · CNB · TGit · any private/self-hosted Git service.
94
+
77
95
  ## Harness Management & Distribution
78
96
 
79
97
  TeamAI keeps skills, rules, docs, and hooks in a shared git repo and distributes them to every member's local AI tools through a "push → review & merge → pull" flow — with support for subscribing to other teams' Harness.
@@ -178,21 +196,6 @@ Author: member-b | Score: 12.0 | Tags: deploy, config
178
196
  Matched: conflict | Missing: port
179
197
  ```
180
198
 
181
- A `Matched: … | Missing: …` line appears whenever a hit does not cover every
182
- query term (omitted when all terms matched). Recall returns its top matches by
183
- score without filtering on coverage: a hit missing all of your distinctive
184
- terms is topically adjacent, not an answer. Judging that is the caller's job —
185
- the score alone cannot express it. Entries matching on title, date, author and
186
- content are collapsed, so the same learning shared twice does not occupy two
187
- slots.
188
-
189
- **Coverage spans two parts:**
190
-
191
- - **Shared search index** (`search-index.json`): four categories — learnings (session experience), docs (team docs), rules (coding rules), and skills (each `SKILL.md`) — sourced from the corresponding team-repo directories, (re)built on `teamai pull` / `teamai contribute`.
192
- - **Codebase knowledge graph** (`teamwiki/`): produced by `teamai import`, queried live at search time.
193
-
194
- Ranking uses BM25 + graph-boost. When the current working directory contains a project-scope config, Recall searches that project; if the project enables `--inherit-user-scope`, it then searches user knowledge, tags each result with its origin, and lets an identical project entry override the user entry. Without a project config in the current directory, Recall searches the user scope. Active-scope hits are implicitly upvoted; inherited user hits remain read-only while the project is active.
195
-
196
199
  ### Codebase Knowledge Graph
197
200
 
198
201
  `teamai import` parses source repos into a structured graph under `teamwiki/`, enabling structurally-aware retrieval:
@@ -230,8 +233,6 @@ When a recall hit comes from a codebase page, the result includes a `Sources:` l
230
233
  | `teamai doctor` | Diagnose configuration issues |
231
234
  | `teamai uninstall` | Remove all teamai resources and hooks |
232
235
 
233
- Global options: `--dry-run`, `--verbose`
234
-
235
236
  ## License
236
237
 
237
238
  [MIT](LICENSE)
package/README.zh-CN.md CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  面向 AI 智能体的团队 Harness 分发工具。
18
18
 
19
- 通过 Git 统一管理 skills、rules、docs,驾驭 Claude Code / Codex / CodeBuddy / WorkBuddy 等多种 AI 工具。
19
+ 通过 Git 统一管理 skills、rules、docs,驾驭 Claude Code / Codex / CodeBuddy / WorkBuddy / OpenCode 等多种 AI 工具。
20
20
 
21
21
  一个人也能用,团队用更强。
22
22
 
@@ -30,9 +30,9 @@ npm install -g teamai-cli
30
30
 
31
31
  ### 团队管理员 / 个人使用者
32
32
 
33
- 在 Git 托管平台(GitHub、TGit CNB)创建共享经验仓库,**授予团队成员写权限**,然后让他们运行 `teamai init https://github.com/yourorg/yourrepo`。
33
+ 在 Git 托管平台(GitHub、GitLab(含自建)、CNB、TGit,或任意私有/自建 Git 服务)创建共享经验仓库,**授予团队成员写权限**,然后让他们运行 `teamai init https://github.com/yourorg/yourrepo`。
34
34
 
35
- > 个人使用无需单独建仓:`teamai init` 会检查目标仓库,不存在时自动创建。
35
+ > 自建 GitLab/Gitea 等服务支持 HTTPS Credential Helper 或 SSH Key;需预先创建仓库,MR 暂时手动创建。详见 [Git Provider 说明](docs/providers.md)。
36
36
 
37
37
  > **还没有团队仓库?** 可以从内置了成套 skills、rules、review agents 的模板起步。浏览 [teamai-hub](https://github.com/teamai-hub) org,点 **Use this template** 生成自己的仓库,再对它执行 `teamai init`。
38
38
 
@@ -45,11 +45,6 @@ teamai init https://github.com/yourorg/yourrepo
45
45
 
46
46
  # 用户级初始化(资源安装到 ~/ 下)
47
47
  teamai init https://github.com/yourorg/yourrepo --scope user
48
-
49
- # 可选的分层模式:项目仓库保持为当前 scope,同时继承已初始化的
50
- # user scope 中的安全资源和可检索知识
51
- cd /path/to/my-project
52
- teamai init https://github.com/yourorg/project-repo --inherit-user-scope
53
48
  ```
54
49
 
55
50
  初始化完成后,每次开启 AI 会话时都会自动拉取管理员发布的 skills / rules 等 Harness 更新,无需手动同步。
@@ -64,16 +59,39 @@ teamai init . # 交互式:选择要启用哪些 AI 工
64
59
  teamai init . --agent claude,codex # 非交互:启用 Claude Code + Codex
65
60
  ```
66
61
 
67
- - **知识资产**(skills / rules / docs / learnings)提交到仓库 **main 分支**的 `.teamai/` 目录,因此一次普通 `git clone` 就带上了整套团队配置。
68
- - **上报数据**(成员注册、会话摘要、投票、使用统计)走独立的 **`teamai-reports` 孤儿分支** —— 永不污染 main。
69
- - **由你选择启用哪些 AI 工具。** `--agent claude,codex`(可重复/逗号分隔),省略时弹交互选择框,非交互场景则按你本机 `~/` 下已装的工具来建。teamai 为每个所选工具建目录、注入 hooks、并提交其 settings。
70
- - **克隆即初始化。** 团队成员 clone 仓库后,下一条 `teamai` 命令(或 AI 会话)会自动识别 `.teamai/teamai.yaml` 里的 `mode: self` 标记并自动完成本机初始化 —— 无需手抄 repo/role 参数。
71
- - teamai 的所有 git 操作都在隔离的 worktree 中进行,绝不触碰你的工作区和当前分支。
72
-
73
- `teamai init .` 会帮你把 `.teamai/`(skills、rules、docs、learnings、`teamai.yaml`、`.gitignore`)以及每个所选工具的 settings(如 `.claude/settings.json`、`.codex/hooks.json`)提交好;推送 main 后团队成员 clone 即可自动初始化。
74
-
75
62
  > **完整使用指南**:[docs/usage-guide.zh-CN.md](docs/usage-guide.zh-CN.md)([English](docs/usage-guide.md))— 涵盖从团队创建到日常使用的全流程。
76
63
 
64
+ ## 功能概览
65
+
66
+ <table>
67
+ <thead>
68
+ <tr>
69
+ <th rowspan="2">Agent</th>
70
+ <th colspan="7">Harness</th>
71
+ <th colspan="3">知识库</th>
72
+ <th colspan="3">治理</th>
73
+ </tr>
74
+ <tr>
75
+ <th>skills</th><th>rules</th><th>docs</th><th>env</th><th>agents</th><th>hooks</th><th>mcp</th>
76
+ <th>learnings</th><th>codebase</th><th>teamwiki</th>
77
+ <th>usage</th><th>sessions</th><th>dashboard</th>
78
+ </tr>
79
+ </thead>
80
+ <tbody>
81
+ <tr><td>Claude Code</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td></tr>
82
+ <tr><td>Codex</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td></tr>
83
+ <tr><td>Cursor</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td></tr>
84
+ <tr><td>CodeBuddy</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td></tr>
85
+ <tr><td>OpenCode</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td></tr>
86
+ <tr><td>WorkBuddy</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td></tr>
87
+ <tr><td>OpenClaw</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td></tr>
88
+ <tr><td>Hermes</td><td align="center">✓</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td></tr>
89
+ <tr><td>DeepSeek Harness</td><td align="center">✓</td><td align="center">—</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td></tr>
90
+ </tbody>
91
+ </table>
92
+
93
+ **Git 托管平台** —— GitHub · GitLab(含自建)· CNB · TGit · 任意私有/自建 Git 服务。
94
+
77
95
  ## Harness 管理和分发
78
96
 
79
97
  TeamAI 把 skills、rules、docs、hooks 统一存放在共享 Git 仓库,通过「push → 评审合并 → pull」的流程分发到每位成员的本地 AI 工具,并支持订阅其他团队的 Harness。
@@ -178,18 +196,6 @@ Author: member-b | Score: 12.0 | Tags: deploy, config
178
196
  Matched: conflict | Missing: port
179
197
  ```
180
198
 
181
- 当某条结果未覆盖全部查询词时,会输出 `Matched: … | Missing: …` 行(全部命中时省略)。
182
- recall 按分数返回 top 结果,**不会**按覆盖度过滤:若你的关键区分词全在 `Missing:` 里,
183
- 说明这条只是主题相邻,并非答案。这个判断由调用方来做 —— 分数本身无法表达它。
184
- 标题、日期、作者与内容均相同的条目会被合并,因此同一条 learning 被分享两次不会占用两个名额。
185
-
186
- **检索内容覆盖两部分**:
187
-
188
- - **共享检索索引**(`search-index.json`):learnings(session 经验)、docs(团队文档)、rules(编码规则)、skills(各 `SKILL.md`)四类,源自团队仓库对应目录,在 `teamai pull` / `teamai contribute` 时构建重建。
189
- - **代码知识图谱**(`teamwiki/`):由 `teamai import` 生成,检索时实时查询。
190
-
191
- 排序采用 BM25 + 图谱增强。当前工作目录包含 project scope 配置时,Recall 先检索该项目;如果项目启用了 `--inherit-user-scope`,再检索 user 知识并标注结果来源,相同条目由 project 版本覆盖 user 版本。当前目录没有 project 配置时,Recall 检索 user scope。当前 scope 的命中会隐式投票,项目运行期间继承的 user 命中保持只读。
192
-
193
199
  ### 代码知识图谱
194
200
 
195
201
  `teamai import` 将源码仓库解析为 `teamwiki/` 下的结构化图谱,实现结构感知的检索:
@@ -227,8 +233,6 @@ teamai codebase --lint # 健康检查
227
233
  | `teamai doctor` | 诊断配置问题 |
228
234
  | `teamai uninstall` | 移除所有 teamai 资源和 hooks |
229
235
 
230
- 全局选项:`--dry-run`、`--verbose`
231
-
232
236
  ## 许可证
233
237
 
234
238
  [MIT](LICENSE)