teamai-cli 0.25.0-beta.2 → 0.25.0-beta.3
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/CHANGELOG.md +4 -0
- package/README.ja.md +41 -3
- package/README.ko.md +41 -3
- package/README.md +41 -4
- package/README.th.md +41 -3
- package/README.zh-CN.md +41 -4
- package/dist/index.js +3681 -2849
- package/package.json +1 -1
- package/skills/teamai/SKILL.md +152 -0
- package/skills/teamai/references/contribute-member.md +100 -0
- package/skills/teamai/references/join-member.md +149 -0
- package/skills/teamai/references/manage-admin.md +148 -0
- package/skills/teamai/references/setup-admin.md +328 -0
- package/skills/teamai/references/troubleshooting.md +133 -0
- package/skills/teamai/references/uninstall.md +57 -0
- package/skills/teamai-share-learnings/SKILL.md +1 -1
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
# Scenario: Admin — set up a new team repo from scratch
|
|
2
|
+
|
|
3
|
+
Goal: the user becomes the first admin of a brand-new TeamAI team. At the end they
|
|
4
|
+
have a working team repo URL to share with members.
|
|
5
|
+
|
|
6
|
+
Run the commands yourself. Only stop to ask when a step says "ASK".
|
|
7
|
+
|
|
8
|
+
## Step 1 — Install and verify
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install -g teamai-cli
|
|
12
|
+
teamai --version
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
If `teamai --version` fails, Node.js ≥ 20 is missing. Tell the user to install
|
|
16
|
+
Node 20+ (from https://nodejs.org), then retry. Do not continue until the version
|
|
17
|
+
prints.
|
|
18
|
+
|
|
19
|
+
## Step 2 — Pick a Git platform (only when the user gave NO repo URL)
|
|
20
|
+
|
|
21
|
+
If the user already gave a full repo URL, skip to Step 4. Otherwise, TeamAI needs a
|
|
22
|
+
place to store the team's skills/rules. The user does not need to know Git. Work
|
|
23
|
+
through these sub-steps **in order**:
|
|
24
|
+
|
|
25
|
+
### 2a — Ask which platform they know
|
|
26
|
+
|
|
27
|
+
**Tencent-internal first:** before asking, probe whether this machine is on the
|
|
28
|
+
Tencent corporate network — a request to `git.woa.com` that returns the header
|
|
29
|
+
`x-env: tgit` means Tencent TGit (工蜂) is reachable:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
curl -sS -m 3 -D - -o /dev/null https://git.woa.com 2>/dev/null | grep -qi '^x-env:[[:space:]]*tgit' && echo "tgit: OK" || echo "tgit: unreachable"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If it prints `tgit: OK`, **list Tencent TGit (工蜂) first** and prefer it —
|
|
36
|
+
TeamAI supports it natively as the `tgit` provider (it detects `git.woa.com` on
|
|
37
|
+
its own; you install `gf` and log in in Step 3). Then ask:
|
|
38
|
+
*"Have you heard of / do you have an account on any of these — Tencent TGit
|
|
39
|
+
(工蜂), GitHub, GitLab, or CNB (cnb.cool)?"*
|
|
40
|
+
|
|
41
|
+
- **Tencent TGit (工蜂)** — https://git.woa.com (Tencent-internal only; shown
|
|
42
|
+
first when the probe above says `tgit: OK`)
|
|
43
|
+
- **GitHub** — https://github.com
|
|
44
|
+
- **GitLab** — https://gitlab.com (or a self-hosted company GitLab)
|
|
45
|
+
- **CNB** — https://cnb.cool
|
|
46
|
+
|
|
47
|
+
If they name one, use that platform and go to sub-step 2c.
|
|
48
|
+
|
|
49
|
+
### 2b — If they've heard of NONE, auto-probe reachability
|
|
50
|
+
|
|
51
|
+
Test which sites this network can actually reach (probe each, ~3s timeout each).
|
|
52
|
+
The TGit probe checks the `x-env: tgit` header, not just reachability:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
curl -sS -m 3 -D - -o /dev/null https://git.woa.com 2>/dev/null | grep -qi '^x-env:[[:space:]]*tgit' && echo "tgit: OK" || echo "tgit: unreachable"
|
|
56
|
+
curl -sSf -m 3 -o /dev/null https://github.com && echo "github: OK" || echo "github: unreachable"
|
|
57
|
+
curl -sSf -m 3 -o /dev/null https://gitlab.com && echo "gitlab: OK" || echo "gitlab: unreachable"
|
|
58
|
+
curl -sSf -m 3 -o /dev/null https://cnb.cool && echo "cnb: OK" || echo "cnb: unreachable"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- **TGit reachable (`tgit: OK`)** → prefer Tencent TGit (工蜂); it is the
|
|
62
|
+
Tencent-internal default.
|
|
63
|
+
- **Exactly one reachable** → use that one.
|
|
64
|
+
- **Several reachable** → list them (TGit first when present) and let the user pick.
|
|
65
|
+
- **None reachable** → stop. Tell the user to ask their own admin for a ready-made
|
|
66
|
+
repo URL, then switch to `join-member.md`.
|
|
67
|
+
|
|
68
|
+
Choose by **account + reachability only — never by region**.
|
|
69
|
+
|
|
70
|
+
### 2c — Give the sign-up / create link and let them create the project
|
|
71
|
+
|
|
72
|
+
Once the platform is decided, hand the user the direct link to sign in and create
|
|
73
|
+
the repository, then continue to the next step:
|
|
74
|
+
|
|
75
|
+
| Platform | Sign in / sign up | Create a new repo (do this) |
|
|
76
|
+
|----------|------------------------------|------------------------------------|
|
|
77
|
+
| Tencent TGit (工蜂) | https://git.woa.com | https://git.woa.com/projects/new |
|
|
78
|
+
| GitHub | https://github.com/login | https://github.com/new |
|
|
79
|
+
| GitLab | https://gitlab.com/users/sign_in | https://gitlab.com/projects/new |
|
|
80
|
+
| CNB | https://cnb.cool | https://cnb.cool/new/repos (org first: https://cnb.cool/new/groups) |
|
|
81
|
+
|
|
82
|
+
> **Tencent TGit (工蜂):** **prefer letting `teamai init` create the repo for you**
|
|
83
|
+
> in Step 5 — don't send the user to the browser first. Once you are logged in
|
|
84
|
+
> (Step 3), init creates the repo under the chosen owner via the API. Only fall
|
|
85
|
+
> back to https://git.woa.com/projects/new if init reports it can't (e.g. the
|
|
86
|
+
> group/namespace doesn't exist, or you lack create permission). git.woa.com is
|
|
87
|
+
> Tencent-internal only.
|
|
88
|
+
|
|
89
|
+
Tell the user to sign in, create an **empty** repo (suggested name
|
|
90
|
+
`TeamAi-<team-name>`), and give you the resulting repo URL. Explain in one
|
|
91
|
+
sentence: *"The repo on the website is where the team's skills and rules live; your
|
|
92
|
+
computer only holds a synced copy — you never put business code in it."*
|
|
93
|
+
|
|
94
|
+
> You may instead let `teamai init` create the repo from the CLI in Step 5 (it
|
|
95
|
+
> offers to create a missing repo on GitHub/GitLab). Creating it in the browser
|
|
96
|
+
> first is the simplest path for a user who does not know Git, and is required on
|
|
97
|
+
> CNB (see the CNB caveat in Step 5).
|
|
98
|
+
|
|
99
|
+
## Step 3 — Log in from the CLI
|
|
100
|
+
|
|
101
|
+
Signing in on the website (Step 2c) is not enough — `teamai init` also needs the
|
|
102
|
+
platform's CLI credentials. Have the user complete the matching CLI login:
|
|
103
|
+
|
|
104
|
+
### Tencent TGit (工蜂) — YOU run gf install and login; user only clicks approve
|
|
105
|
+
|
|
106
|
+
TeamAI supports git.woa.com natively as the `tgit` provider (it recognizes the
|
|
107
|
+
host on its own — no `GITLAB_URL` needed). **Run every command below yourself** —
|
|
108
|
+
both the install and the login. **Never tell the user to run a `gf` command.** The
|
|
109
|
+
user's only action is approving the login in their browser / iOA when it opens.
|
|
110
|
+
|
|
111
|
+
**1. Install `gf` (you run this)** using the **same source, path, and check teamai
|
|
112
|
+
uses** — do not invent your own URL. `${TEAMAI_HOME}` is `~/.teamai` unless
|
|
113
|
+
overridden:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# pick the tarball for this machine's OS/arch (darwin|linux × x64|arm64)
|
|
117
|
+
os=$(uname -s | tr '[:upper:]' '[:lower:]') # darwin | linux
|
|
118
|
+
arch=$(uname -m); [ "$arch" = "x86_64" ] && arch=x64; [ "$arch" = "aarch64" ] && arch=arm64
|
|
119
|
+
dir="${TEAMAI_HOME:-$HOME/.teamai}/gf"
|
|
120
|
+
|
|
121
|
+
# download + extract from the Tencent-internal mirror (same URL teamai uses)
|
|
122
|
+
mkdir -p "$dir"
|
|
123
|
+
curl -fsSL "http://mirrors.tencent.com/repository/generic/gongfeng-cli/files/channels/stable/gf-${os}-${arch}.tar.gz" | tar xz -C "$dir"
|
|
124
|
+
|
|
125
|
+
# verify exactly as teamai does: the binary exists and is executable
|
|
126
|
+
test -x "$dir/gf/bin/gf" && echo "gf installed OK" || echo "gf install FAILED"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Only macOS and Linux, on x64 or arm64, are supported.
|
|
130
|
+
|
|
131
|
+
**2. Log in (you run this too — don't hand it to the user):**
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
"${TEAMAI_HOME:-$HOME/.teamai}/gf/gf/bin/gf" auth login
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
`gf auth login` starts an interactive flow offering three ways to sign in — iOA, a
|
|
138
|
+
browser device code, or pasting a token. Pick the browser/iOA option, relay
|
|
139
|
+
whatever URL / device code it prints to the user, and ask them to approve it in
|
|
140
|
+
their browser — that approval is the *only* thing they do; the command finishes on
|
|
141
|
+
its own once they do. Confirm with
|
|
142
|
+
`"${TEAMAI_HOME:-$HOME/.teamai}/gf/gf/bin/gf" auth whoami` before continuing.
|
|
143
|
+
|
|
144
|
+
(Headless/CI only: skip the interactive login and pre-set `TGIT_TOKEN` — a
|
|
145
|
+
git.woa.com Personal Access Token — instead.)
|
|
146
|
+
|
|
147
|
+
### CNB — install the CLI, authorize, then read the repo (in this order)
|
|
148
|
+
|
|
149
|
+
Once the user has created their repo on cnb.cool and given you the URL, do these
|
|
150
|
+
three steps **in order**:
|
|
151
|
+
|
|
152
|
+
1. **Install the CNB CLI** (needed to talk to cnb.cool):
|
|
153
|
+
```bash
|
|
154
|
+
npm install -g @cnbcool/cnb-cli
|
|
155
|
+
```
|
|
156
|
+
(`teamai init` also installs it automatically if it is missing, but running it
|
|
157
|
+
here first makes the next step predictable.)
|
|
158
|
+
2. **Ask the user to authorize.** Start the login and have them approve it in the
|
|
159
|
+
browser (OAuth2 device flow):
|
|
160
|
+
```bash
|
|
161
|
+
cnb login
|
|
162
|
+
```
|
|
163
|
+
Wait for them to confirm they finished authorizing before continuing.
|
|
164
|
+
3. **Then read their repo** — proceed to Step 4/5 (`teamai init <their CNB URL>`),
|
|
165
|
+
which can now clone and read the repo with the authorized CLI.
|
|
166
|
+
|
|
167
|
+
(Headless/CI alternative: set `CNB_TOKEN` instead of `cnb login`.)
|
|
168
|
+
|
|
169
|
+
### GitHub
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
gh auth login
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### GitLab (gitlab.com)
|
|
176
|
+
|
|
177
|
+
Set a Personal Access Token with `api` scope:
|
|
178
|
+
```bash
|
|
179
|
+
export GITLAB_TOKEN=glpat-xxxxxxxxxxxxxxxx
|
|
180
|
+
```
|
|
181
|
+
Self-hosted GitLab: also set the instance URL first —
|
|
182
|
+
`export GITLAB_URL=https://git.example.com`.
|
|
183
|
+
|
|
184
|
+
For GitHub/GitLab, `teamai init` installs any helper CLI it needs automatically.
|
|
185
|
+
|
|
186
|
+
## Step 4 — Decide the scope (ASK)
|
|
187
|
+
|
|
188
|
+
One choice — project-only or whole machine?
|
|
189
|
+
|
|
190
|
+
- Default (project): resources land in the current project's `.claude/` etc.
|
|
191
|
+
`cd` into the project first.
|
|
192
|
+
- Whole machine: add `--scope user` so every project gets the team resources.
|
|
193
|
+
|
|
194
|
+
(The repo name was already chosen when the user created the repo in Step 2c —
|
|
195
|
+
suggested form `TeamAi-<team-name>`.)
|
|
196
|
+
|
|
197
|
+
## Step 5 — Initialize (you run it)
|
|
198
|
+
|
|
199
|
+
Use the **full URL**, never `owner/repo`:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
# project scope (default) — run from inside the project directory
|
|
203
|
+
teamai init https://<platform>/<org>/<repo-name>
|
|
204
|
+
|
|
205
|
+
# or whole machine
|
|
206
|
+
teamai init https://<platform>/<org>/<repo-name> --scope user
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
If the repo does not exist yet, `init` offers to create it — accept the prompt.
|
|
210
|
+
|
|
211
|
+
- **Tencent TGit (工蜂):** `gf` and login are already done (Step 3), so init goes
|
|
212
|
+
straight to creating/cloning. When the repo doesn't exist, **accept the create
|
|
213
|
+
prompt and init creates it via the API** — no browser needed. It only sends you
|
|
214
|
+
to https://git.woa.com/projects/new if the group/namespace is missing or you
|
|
215
|
+
lack create permission. No `GITLAB_URL`.
|
|
216
|
+
- **CNB caveat:** a `cnb login` token **cannot create** an org or repo — that is
|
|
217
|
+
exactly why the CNB flow has the user create the repo on the website first
|
|
218
|
+
(Step 2c). If the org/repo is still missing here, `init` prints web links
|
|
219
|
+
(`https://cnb.cool/new/groups`, `https://cnb.cool/new/repos`) — have the user
|
|
220
|
+
create them in the browser, then re-run `teamai init`. By this step the CNB CLI
|
|
221
|
+
should already be installed and authorized (Step 3). (A `CNB_TOKEN` with
|
|
222
|
+
`group-manage:rw` + `group-resource:rw` lets the CLI create them directly.)
|
|
223
|
+
- **GitHub caveat:** if a push later fails, check the repo's default branch is
|
|
224
|
+
`main` (not `master`).
|
|
225
|
+
- If `init` detects an unknown GitLab host, it stops and asks you to set
|
|
226
|
+
`GITLAB_URL` + `GITLAB_TOKEN`, then retry.
|
|
227
|
+
|
|
228
|
+
If the repo has roles enabled, `init` may ask for a primary role — pick one with
|
|
229
|
+
the user, or pass `--role <id>` for a non-interactive run.
|
|
230
|
+
|
|
231
|
+
**Which AI tools to set up — all of them by default (global rule 9).** Do not add
|
|
232
|
+
`--agent` to restrict the install unless the user explicitly said to (e.g. "only
|
|
233
|
+
Claude Code"). Omitting `--agent` gives an interactive picker — select **every AI
|
|
234
|
+
tool already installed** on the machine. Then **report back which agents were set
|
|
235
|
+
up**, in the user's language: name the tools that will now auto-start TeamAI, and
|
|
236
|
+
any detected tool that was skipped and why (e.g. Codex trust-gate,
|
|
237
|
+
CodeBuddy/WorkBuddy by design — see `troubleshooting.md`).
|
|
238
|
+
|
|
239
|
+
## Step 6 — Verify with doctor
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
teamai doctor
|
|
243
|
+
teamai hooks list # per-tool: which AI tools actually got the hooks
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Resolve everything `doctor` flags before continuing.
|
|
247
|
+
|
|
248
|
+
**Do not trust the "Hooks injected into all AI tool settings" message on its own.**
|
|
249
|
+
That line prints even for tools where nothing was written. Use `teamai doctor` /
|
|
250
|
+
`teamai hooks list` to see the real per-tool status. It is expected that only the
|
|
251
|
+
tool you set up with `--agent` (e.g. `claude`) shows the hooks installed; several
|
|
252
|
+
other tools are skipped by design or not yet supported — this is CLI behaviour, not
|
|
253
|
+
a broken setup. See `troubleshooting.md` ("Which tools actually get hooks") before
|
|
254
|
+
worrying about a tool that shows as missing.
|
|
255
|
+
|
|
256
|
+
## Step 7 — Grant members repo access (required before they can join)
|
|
257
|
+
|
|
258
|
+
TeamAI has **no permission model of its own** — it rides the Git platform's
|
|
259
|
+
access control. After you initialize the repo, **each member must be granted
|
|
260
|
+
read/write access to it on the platform website**, or their `teamai init` / `pull`
|
|
261
|
+
/ `push` will fail with a permission error.
|
|
262
|
+
|
|
263
|
+
Tell the admin (in their language) to add every member on the repo's website:
|
|
264
|
+
|
|
265
|
+
- **Tencent TGit (工蜂):** repo → 成员管理 / Members → add each member with at
|
|
266
|
+
least **Developer** (read/write) access.
|
|
267
|
+
- **GitHub:** repo → Settings → Collaborators → add with **Write**.
|
|
268
|
+
- **GitLab:** repo → Settings → Members → add with **Developer** or above.
|
|
269
|
+
- **CNB:** repo → members → grant read/write.
|
|
270
|
+
|
|
271
|
+
Do this **before** handing off the invite line below — otherwise the member hits a
|
|
272
|
+
"permission denied / can't clone" error on their very first step.
|
|
273
|
+
|
|
274
|
+
## Step 8 — Hand off to members
|
|
275
|
+
|
|
276
|
+
Everything you show here goes **in the user's language** (global rule 1). Only the
|
|
277
|
+
`/teamai …` line, URLs, and commands stay verbatim.
|
|
278
|
+
|
|
279
|
+
**First, reassure them about privacy** (say this in their language): *"TeamAI does
|
|
280
|
+
not send any of your session data to third parties. The only place anything is
|
|
281
|
+
reported is the team repo you just set up — usage counts and knowledge go there,
|
|
282
|
+
and raw conversation content is never uploaded."* (Team reporting is opt-in and
|
|
283
|
+
carries counts + tool names only, on a separate branch of that same repo.)
|
|
284
|
+
|
|
285
|
+
1. Give the user their **repo web URL** to share.
|
|
286
|
+
2. Give them a ready-to-forward invite line **written in their language**, with the
|
|
287
|
+
URL filled in. The `/teamai` prefix stays as-is; translate the rest. For a
|
|
288
|
+
Chinese-speaking user, that is:
|
|
289
|
+
`/teamai 帮我加入团队的 TeamAI,仓库地址是 <URL>`
|
|
290
|
+
(English user: `/teamai Help me join my team's TeamAI, repo URL is <URL>`.)
|
|
291
|
+
Tell them to send the URL + this line to each member.
|
|
292
|
+
3. Remind them (in their language): **new resources appear only after opening a
|
|
293
|
+
fresh session** in the AI tool. Right after init the skills folder may look
|
|
294
|
+
empty — that is expected. To sync now, run `teamai pull`.
|
|
295
|
+
|
|
296
|
+
## Step 9 — What's next (guide them, don't just list commands)
|
|
297
|
+
|
|
298
|
+
Wrap up **in the user's own language** (global rule 1).
|
|
299
|
+
|
|
300
|
+
The user may not be comfortable with the command line, so **don't just hand them a
|
|
301
|
+
list of `teamai …` commands.** Instead, point them back to *this skill* for
|
|
302
|
+
day-to-day work — they can keep letting the AI run things for them:
|
|
303
|
+
|
|
304
|
+
- To manage the team later, they run:
|
|
305
|
+
`/teamai 我已经装好了,帮我管理` (Chinese) /
|
|
306
|
+
`/teamai I already have TeamAI set up, help me manage it` (English) — this loads
|
|
307
|
+
the daily-management flow (`manage-admin.md`): publishing skills, inviting
|
|
308
|
+
members, roles / packages / env.
|
|
309
|
+
- To share something they learned:
|
|
310
|
+
`/teamai 我想把学到的经验分享给团队` /
|
|
311
|
+
`/teamai I want to contribute what I learned to my team`.
|
|
312
|
+
|
|
313
|
+
Mention the underlying commands (`teamai push`, `teamai roles`, …) only as a note
|
|
314
|
+
for users who *do* want them — the primary path is re-invoking `/teamai`.
|
|
315
|
+
|
|
316
|
+
## Step 10 — Tell them how to leave (via the skill, not raw commands)
|
|
317
|
+
|
|
318
|
+
Finish by telling the user, **in their language**, that they can remove TeamAI any
|
|
319
|
+
time — and that they don't need the command line to do it. They just re-invoke the
|
|
320
|
+
skill and you'll handle it:
|
|
321
|
+
|
|
322
|
+
`/teamai 卸载` (Chinese) / `/teamai Uninstall TeamAI` (English)
|
|
323
|
+
|
|
324
|
+
One line, in their language: *"That removes the hooks and synced resources from
|
|
325
|
+
your machine; your team repo on the website is untouched — you can rejoin any time
|
|
326
|
+
with `/teamai` and the repo URL."*
|
|
327
|
+
|
|
328
|
+
(If they ask right now, load `uninstall.md` and run it for them.)
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Troubleshooting & Agent-specific caveats
|
|
2
|
+
|
|
3
|
+
Load this whenever a step fails, `teamai doctor` flags something, or team
|
|
4
|
+
resources don't show up. It is shared by all four scenarios.
|
|
5
|
+
|
|
6
|
+
## First move: run doctor
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
teamai doctor
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
It checks provider config, hooks, paths, and package/plugin status. Fix what it
|
|
13
|
+
reports before anything else.
|
|
14
|
+
|
|
15
|
+
## "My skills / rules aren't showing up"
|
|
16
|
+
|
|
17
|
+
This is the #1 onboarding issue. In order:
|
|
18
|
+
|
|
19
|
+
1. **Open a fresh session.** Resources sync on **session start** via a hook, not
|
|
20
|
+
at init time. An empty skills folder right after `teamai init` is normal.
|
|
21
|
+
2. **Sync manually to confirm:**
|
|
22
|
+
```bash
|
|
23
|
+
teamai pull
|
|
24
|
+
teamai list # do the team skills appear now?
|
|
25
|
+
```
|
|
26
|
+
3. **Check the hook is installed** (`teamai doctor` reports this). If missing,
|
|
27
|
+
re-inject and reopen the tool:
|
|
28
|
+
```bash
|
|
29
|
+
teamai hooks inject
|
|
30
|
+
```
|
|
31
|
+
4. **Wrong scope?** Project-scope hooks are written to your HOME tool settings
|
|
32
|
+
(e.g. `~/.claude/settings.json`), not the project folder — that is intentional.
|
|
33
|
+
If you initialized project scope but expected machine-wide resources, re-run
|
|
34
|
+
with `--scope user`.
|
|
35
|
+
5. **Tool has no hook surface** (e.g. Gemini CLI, JoyCode): there is no auto-sync;
|
|
36
|
+
run `teamai pull` manually each time.
|
|
37
|
+
|
|
38
|
+
## Permission / access denied
|
|
39
|
+
|
|
40
|
+
`init`, `pull`, or `push` failing with a permission error usually means the user
|
|
41
|
+
has not been granted access to the team repo on the Git platform. Have them copy
|
|
42
|
+
the **exact** error text to their admin, who adds them on the platform website.
|
|
43
|
+
|
|
44
|
+
## GitHub push fails
|
|
45
|
+
|
|
46
|
+
Check the team repo's default branch is `main` (not `master`). A stale `master`
|
|
47
|
+
default is a common cause.
|
|
48
|
+
|
|
49
|
+
## GitLab host not detected
|
|
50
|
+
|
|
51
|
+
If `init` can't confirm a self-hosted GitLab instance, set both and retry:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
export GITLAB_URL=https://git.example.com
|
|
55
|
+
export GITLAB_TOKEN=glpat-xxxxxxxxxxxxxxxx # api scope
|
|
56
|
+
teamai init https://git.example.com/yourgroup/yourrepo
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Which tools actually get hooks
|
|
60
|
+
|
|
61
|
+
`teamai hooks inject` always prints **"Hooks injected into all AI tool settings"**,
|
|
62
|
+
even for tools where it wrote nothing. **Do not take that line as proof.** Verify
|
|
63
|
+
per-tool instead:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
teamai doctor # flags tools whose hooks are missing
|
|
67
|
+
teamai hooks list # per-tool status + the settings file it checked
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
What you will typically see, and why (this is expected CLI behaviour, **not** a
|
|
71
|
+
broken machine):
|
|
72
|
+
|
|
73
|
+
| Tool | Hooks status | Why |
|
|
74
|
+
|-----------------------|---------------------------|---------------------------------------------------------------------|
|
|
75
|
+
| Claude Code (`claude`)| Installed | Fully supported — this is the main, working path |
|
|
76
|
+
| Codex | Written but **trust-gated** or skipped | Codex gates non-managed hooks behind an explicit trust step; `teamai doctor` prints a reminder to trust them |
|
|
77
|
+
| Cursor | Often not written | Uses its own hook mechanism; broader CLI support is still pending |
|
|
78
|
+
| CodeBuddy / WorkBuddy | Skipped **by design** | They only accept versioned plugins (`plugin@version`); teamai writes raw entries into a `hooks` field, which they don't take |
|
|
79
|
+
|
|
80
|
+
Practical rule: if you set up with `--agent claude`, expect **only** Claude to show
|
|
81
|
+
hooks installed. A tool you are not using, or one that is not a supported hook
|
|
82
|
+
target, showing "missing" is normal — the Claude path is intact. For a tool where
|
|
83
|
+
hooks did not land but you do use it, run `teamai pull` manually each session, and
|
|
84
|
+
see the caveats below.
|
|
85
|
+
|
|
86
|
+
## Agent-specific caveats
|
|
87
|
+
|
|
88
|
+
Different AI hosts handle the hooks that TeamAI injects differently. When this
|
|
89
|
+
conversation runs in one of these, proactively walk the user through the extra
|
|
90
|
+
step — do not assume auto-sync just works.
|
|
91
|
+
|
|
92
|
+
### Codex
|
|
93
|
+
|
|
94
|
+
Codex gates non-managed hooks behind an explicit **trust** step. `teamai init` /
|
|
95
|
+
`teamai hooks inject` may write the hooks, but Codex won't run them until the user
|
|
96
|
+
trusts them (`teamai doctor` prints a reminder when it detects this). Guide the
|
|
97
|
+
user to trust the teamai hooks in Codex, then reopen a session. Until then, run
|
|
98
|
+
`teamai pull` manually.
|
|
99
|
+
|
|
100
|
+
### Cursor
|
|
101
|
+
|
|
102
|
+
Cursor uses its own hook mechanism and may not receive teamai's hooks yet. If
|
|
103
|
+
`teamai hooks list` shows Cursor without hooks, treat it as a manual-sync tool: run
|
|
104
|
+
`teamai pull` at the start of each session.
|
|
105
|
+
|
|
106
|
+
### ChatGPT App
|
|
107
|
+
|
|
108
|
+
Hooks injected by `teamai init` are **untrusted by default** in the sandbox. The
|
|
109
|
+
user must **manually trust the hooks in ChatGPT's settings** before they run.
|
|
110
|
+
Guide them to the settings, have them trust/enable the TeamAI hooks, then reopen a
|
|
111
|
+
session and verify with `teamai pull` + `teamai list`.
|
|
112
|
+
|
|
113
|
+
### WorkBuddy
|
|
114
|
+
|
|
115
|
+
The sandbox **does not add hooks automatically** after `teamai init`. The user
|
|
116
|
+
must **manually edit the config file to register the hook** so auto-sync works.
|
|
117
|
+
Walk them through opening the tool's config and adding the TeamAI session-start
|
|
118
|
+
hook entry; if unsure of the exact config, run `teamai doctor` and `teamai hooks`
|
|
119
|
+
to see what should be present, then have them replicate it. Until then, they can
|
|
120
|
+
sync with a manual `teamai pull`.
|
|
121
|
+
|
|
122
|
+
### Tools without a writable hook surface
|
|
123
|
+
|
|
124
|
+
Gemini CLI, JoyCode, and similar tools have no TeamAI-writable hook surface —
|
|
125
|
+
there is no auto-sync. Tell the user to run `teamai pull` manually at the start of
|
|
126
|
+
each session.
|
|
127
|
+
|
|
128
|
+
## Still stuck
|
|
129
|
+
|
|
130
|
+
- Re-run the failing command with `-v` / `--verbose` for detail.
|
|
131
|
+
- `teamai status` shows exactly how local differs from the team repo.
|
|
132
|
+
- Report unexpected behavior at https://github.com/Tencent/teamai-cli/issues
|
|
133
|
+
with the agent name, platform, and the step that failed.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Scenario: Uninstall — remove TeamAI from this machine
|
|
2
|
+
|
|
3
|
+
The user wants to remove TeamAI. **You run the command for them** — they should not
|
|
4
|
+
have to type `teamai uninstall` themselves. Everything you say goes in the user's
|
|
5
|
+
language (global rule 1); only the commands stay verbatim.
|
|
6
|
+
|
|
7
|
+
## Step 1 — Confirm scope first (ASK — this is destructive)
|
|
8
|
+
|
|
9
|
+
Uninstalling removes hooks and synced resources from the machine and cannot be
|
|
10
|
+
undone with a single button, so confirm before running anything. Ask ONE question:
|
|
11
|
+
|
|
12
|
+
*"Do you want to remove TeamAI from **just this AI tool**, or from the **whole
|
|
13
|
+
machine** (all tools)?"*
|
|
14
|
+
|
|
15
|
+
- **Just this tool** → `--agent <tool>` (use the tool this conversation runs in,
|
|
16
|
+
e.g. `claude`). Shared resources are removed only if it is the last tool using
|
|
17
|
+
them.
|
|
18
|
+
- **Whole machine** → no `--agent` flag.
|
|
19
|
+
|
|
20
|
+
Reassure them (in their language): *"This only removes things from your computer.
|
|
21
|
+
Your team's repo on the website is untouched — you can rejoin any time with
|
|
22
|
+
`/teamai` and the repo URL."*
|
|
23
|
+
|
|
24
|
+
## Step 2 — Run it (you run it)
|
|
25
|
+
|
|
26
|
+
Whole machine:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
teamai uninstall
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Just the current tool (example for Claude Code):
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
teamai uninstall --agent claude
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`teamai uninstall` asks for a confirmation of its own. Let the user answer that
|
|
39
|
+
prompt. Only add `--force` (skips the prompt) if the user has already clearly told
|
|
40
|
+
you to go ahead without further confirmation:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
teamai uninstall --force
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Step 3 — Report the result in the user's language
|
|
47
|
+
|
|
48
|
+
Tell them what was removed and remind them, in one line, how to come back:
|
|
49
|
+
*"Done — TeamAI has been removed from this machine. To rejoin later, run `/teamai`
|
|
50
|
+
and give it your team repo URL."*
|
|
51
|
+
|
|
52
|
+
## Notes
|
|
53
|
+
|
|
54
|
+
- Do **not** delete the team repo on the Git platform — uninstall never touches it,
|
|
55
|
+
and neither should you.
|
|
56
|
+
- If the user only wants to stop auto-sync for one tool but keep TeamAI otherwise,
|
|
57
|
+
that is the `--agent <tool>` form, not a full uninstall.
|
|
@@ -82,6 +82,6 @@ teamai contribute --file /tmp/session-summary.md --title "K8s pod 启动超时
|
|
|
82
82
|
## Important
|
|
83
83
|
|
|
84
84
|
- Run this as a **sub-agent** (Agent tool) to avoid polluting the main session's context
|
|
85
|
-
- The document is pushed
|
|
85
|
+
- The document is pushed to the team repo's `teamai-learnings` branch, under `learnings/`, with no pull request
|
|
86
86
|
- Team members will see it on their next `teamai pull`
|
|
87
87
|
- Keep summaries concise and actionable — this is a knowledge base, not a diary
|