teamai-cli 0.16.3 → 0.16.4
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 +159 -156
- package/README.zh-CN.md +326 -0
- package/dist/index.js +84 -94
- package/package.json +3 -3
- package/README.en.md +0 -323
package/README.md
CHANGED
|
@@ -1,138 +1,141 @@
|
|
|
1
1
|
# TeamAI — The team harness for AI agents
|
|
2
2
|
|
|
3
|
-
> [English](README.
|
|
3
|
+
> [English](README.md) | [简体中文](README.zh-CN.md)
|
|
4
4
|
|
|
5
5
|
[](https://github.com/Tencent/teamai-cli/actions/workflows/ci.yml)
|
|
6
6
|
[](https://www.npmjs.com/package/teamai-cli)
|
|
7
7
|
[](https://www.npmjs.com/package/teamai-cli)
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Make every AI coding agent work by the same harness.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Git-native management of skills, rules, and docs across 20+ AI tools — for you or your whole team.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
> 📚 **Provider 说明**:[docs/providers.md](docs/providers.md) — GitHub / TGit 差异与认证配置。
|
|
14
|
+
**Supports:** Claude Code, Codex, Cursor, CodeBuddy IDE, as well as Gemini CLI, Windsurf, Trae, Aider, Amp, OpenClaw, and 20+ other AI coding tools (skills sync).
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
> 📖 **Full usage guide:** [docs/usage-guide.md](docs/usage-guide.md) — covers everything from team creation to day-to-day use.
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
> 📚 **Provider notes:** [docs/providers.md](docs/providers.md) — GitHub / TGit differences and auth setup.
|
|
19
|
+
|
|
20
|
+
Questions or suggestions are welcome — please open a PR or an Issue and help build this project together.
|
|
21
|
+
|
|
22
|
+
## Install
|
|
20
23
|
|
|
21
24
|
```bash
|
|
22
25
|
npm install -g teamai-cli
|
|
23
26
|
```
|
|
24
27
|
|
|
25
28
|
<details>
|
|
26
|
-
<summary
|
|
29
|
+
<summary>Tencent internal users: install <code>@tencent/teamai-cli</code> via tnpm</summary>
|
|
27
30
|
|
|
28
31
|
```bash
|
|
29
32
|
npm install -g @tencent/teamai-cli --registry=http://r.tnpm.oa.com
|
|
30
33
|
```
|
|
31
34
|
|
|
32
|
-
|
|
35
|
+
The two packages share identical source code; `@tencent/teamai-cli` is just the internal mirror of the public `teamai-cli`.
|
|
33
36
|
</details>
|
|
34
37
|
|
|
35
|
-
##
|
|
38
|
+
## Quick Start
|
|
36
39
|
|
|
37
|
-
###
|
|
40
|
+
### Team members
|
|
38
41
|
|
|
39
42
|
```bash
|
|
40
|
-
#
|
|
43
|
+
# User-scope init (default, resources installed under ~/)
|
|
41
44
|
teamai init --repo yourteam/yourproject
|
|
42
45
|
|
|
43
|
-
#
|
|
46
|
+
# Project-scope init (resources installed under the project directory)
|
|
44
47
|
cd /path/to/my-project
|
|
45
48
|
teamai init --repo yourteam/yourproject --scope project
|
|
46
49
|
|
|
47
|
-
#
|
|
50
|
+
# Non-interactive mode (for CI/CD or AI-agent automation)
|
|
48
51
|
teamai init --repo yourteam/yourproject --scope user --role hai_dev --force
|
|
49
52
|
```
|
|
50
53
|
|
|
51
|
-
###
|
|
54
|
+
### Admins
|
|
52
55
|
|
|
53
|
-
|
|
56
|
+
First create the shared-experience repo on your git host (GitHub by default; TGit also supported) and grant write access to every team member.
|
|
54
57
|
|
|
55
|
-
- **GitHub
|
|
56
|
-
- **TGit
|
|
58
|
+
- **GitHub:** create with `gh repo create yourorg/yourproject --private` or via the UI. Then use Settings → Collaborators to add members, and set `master`/`main` as the default branch.
|
|
59
|
+
- **TGit (Tencent Gongfeng):** create on [git.woa.com](https://git.woa.com/) and grant master permissions in bulk via user groups.
|
|
57
60
|
|
|
58
|
-
CLI
|
|
61
|
+
The CLI picks a provider automatically from the repo URL:
|
|
59
62
|
|
|
60
|
-
- `yourorg/yourrepo`
|
|
63
|
+
- `yourorg/yourrepo` or `https://github.com/yourorg/yourrepo` → GitHub
|
|
61
64
|
- `https://git.woa.com/yourteam/yourrepo` → TGit
|
|
62
65
|
|
|
63
|
-
##
|
|
64
|
-
|
|
65
|
-
|
|
|
66
|
-
|
|
67
|
-
| `teamai init [--scope <user\|project>] [--role <id>] [--force]` |
|
|
68
|
-
| `teamai push [--all] [--role <id>]` |
|
|
69
|
-
| `teamai pull [--silent]` |
|
|
70
|
-
| `teamai status` |
|
|
71
|
-
| `teamai list [type] [--source repo\|local\|all] [--agent <id>]` |
|
|
72
|
-
| `teamai skill [list\|show <name>]` |
|
|
73
|
-
| `teamai members` |
|
|
74
|
-
| `teamai remove <type> <name>` |
|
|
75
|
-
| `teamai roles` |
|
|
76
|
-
| `teamai source` |
|
|
77
|
-
| `teamai contribute --file <path> [--scope <user\|project>]` |
|
|
78
|
-
| `teamai recall <query>` |
|
|
79
|
-
| `teamai digest` |
|
|
80
|
-
| `teamai hooks` |
|
|
81
|
-
| `teamai uninstall [--force]` |
|
|
82
|
-
| `teamai doctor` |
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
- `--dry-run` —
|
|
86
|
-
- `--verbose, -v` —
|
|
87
|
-
|
|
88
|
-
##
|
|
66
|
+
## Commands
|
|
67
|
+
|
|
68
|
+
| Command | Description |
|
|
69
|
+
|---------|-------------|
|
|
70
|
+
| `teamai init [--scope <user\|project>] [--role <id>] [--force]` | Initialize (auto-installs gf CLI, OAuth login, links repo, registers member, configures reviewers, injects hooks) |
|
|
71
|
+
| `teamai push [--all] [--role <id>]` | Push local new resources to a dedicated branch and open a Merge Request; new skills prompt interactively for a target namespace (override with `--role`) |
|
|
72
|
+
| `teamai pull [--silent]` | Pull team resources and inject them into local AI tools (both scopes pulled sequentially) |
|
|
73
|
+
| `teamai status` | Show the diff between local and the team repo |
|
|
74
|
+
| `teamai list [type] [--source repo\|local\|all] [--agent <id>]` | List resources (skills\|rules\|docs\|env\|wiki). With `--source local` or `all`, scans skills directories of installed AI agents and tags each skill's origin (`[team]` / `[builtin]` / `[source:<name>]` / `[local-only]`) |
|
|
75
|
+
| `teamai skill [list\|show <name>]` | List all skills by default; `show <name>` prints the skill's origin, contributors, installed-agent list, and description summary |
|
|
76
|
+
| `teamai members` | List registered team members |
|
|
77
|
+
| `teamai remove <type> <name>` | Remove a resource from both the team repo and local, then open an MR (skills\|rules\|wiki) |
|
|
78
|
+
| `teamai roles` | Manage team roles (`init`/`list`/`set`/`add`/`remove`/`update`) |
|
|
79
|
+
| `teamai source` | Manage cross-team skill subscription sources (`add`/`remove`/`list`/`browse`) |
|
|
80
|
+
| `teamai contribute --file <path> [--scope <user\|project>]` | Push an AI-generated experience document to the team repo |
|
|
81
|
+
| `teamai recall <query>` | Search the team knowledge base, automatically merging user + project scope results |
|
|
82
|
+
| `teamai digest` | Generate a team AI usage weekly digest (skill leaderboard, new/updated skills, session summaries) |
|
|
83
|
+
| `teamai hooks` | Manage AI-tool hooks (list / inject / remove) |
|
|
84
|
+
| `teamai uninstall [--force]` | Uninstall teamai: remove hooks, rules, skills, env, docs, and `~/.teamai/` |
|
|
85
|
+
| `teamai doctor` | Diagnose configuration problems |
|
|
86
|
+
|
|
87
|
+
Global options:
|
|
88
|
+
- `--dry-run` — preview mode, no real changes
|
|
89
|
+
- `--verbose, -v` — verbose output
|
|
90
|
+
|
|
91
|
+
## How It Works
|
|
89
92
|
|
|
90
93
|
```
|
|
91
|
-
|
|
92
|
-
|
|
94
|
+
Member A Member B
|
|
95
|
+
create skill / write rules same
|
|
93
96
|
│ │
|
|
94
97
|
▼ ▼
|
|
95
98
|
teamai push teamai push
|
|
96
99
|
│ │
|
|
97
100
|
▼ ▼
|
|
98
|
-
|
|
101
|
+
create branch + MR create branch + MR
|
|
99
102
|
│ │
|
|
100
|
-
└──────►
|
|
103
|
+
└──────► team git repo ◄─────────────┘
|
|
101
104
|
│ ▲
|
|
102
|
-
│ │ reviewer
|
|
105
|
+
│ │ reviewer approves + merges MR
|
|
103
106
|
▼
|
|
104
107
|
SessionStart hook → teamai pull
|
|
105
|
-
|
|
108
|
+
auto-synced to every member's local
|
|
106
109
|
```
|
|
107
110
|
|
|
108
|
-
- `teamai push`
|
|
109
|
-
- `teamai init`
|
|
110
|
-
- `teamai init`
|
|
111
|
-
- Skills
|
|
112
|
-
- Rules
|
|
113
|
-
- Knowledge
|
|
114
|
-
- Learnings
|
|
115
|
-
- Culture
|
|
111
|
+
- `teamai push` creates a dedicated branch (`teamai/push/<user>/<timestamp>`), pushes it, then opens a Merge Request and assigns reviewers automatically.
|
|
112
|
+
- `teamai init` lets you configure default reviewers (stored in the `reviewers` field of `teamai.yaml`).
|
|
113
|
+
- `teamai init` injects hooks tailored to each tool's format (`SessionStart`, `Stop`, `PostToolUse`, `UserPromptSubmit`, etc.). During sessions the hooks run `teamai pull`, `teamai update`, tracking, dashboard updates, and so on (supports Claude Code, Codex, Claude Code Internal, Codex Internal, Cursor, CodeBuddy IDE, OpenClaw, WorkBuddy).
|
|
114
|
+
- Skills sync to `~/.claude/skills/`, `~/.codex/skills/`, `~/.codex-internal/skills/`, `~/.claude-internal/skills/`, `~/.cursor/skills/`, `~/.codebuddy/skills/`.
|
|
115
|
+
- Rules sync to each tool's rules directory and are merged into `CLAUDE.md` via marker comments (supported for claude, claude-internal, codebuddy).
|
|
116
|
+
- Knowledge syncs to `~/.teamai/docs/`.
|
|
117
|
+
- Learnings sync to `~/.teamai/learnings/` and back the recall index (shared team-wide, not partitioned by role).
|
|
118
|
+
- Culture syncs the team culture file (`culture.md`): its frontmatter and body are compiled and injected into every AI tool's `CLAUDE.md`.
|
|
116
119
|
|
|
117
|
-
##
|
|
120
|
+
## Role-scoped Skills
|
|
118
121
|
|
|
119
|
-
|
|
122
|
+
When the team resource repo enables role-scoped directories, skills are organized under role namespaces. During `teamai init`, the CLI asks you to pick a `primaryRole` and optional `additionalRoles` and writes them to your local `config.yaml`.
|
|
120
123
|
|
|
121
|
-
|
|
124
|
+
Remote repo layout convention:
|
|
122
125
|
|
|
123
126
|
```text
|
|
124
|
-
manifest/roles.yaml
|
|
125
|
-
skills/<namespace>/<skill>/
|
|
126
|
-
rules/
|
|
127
|
+
manifest/roles.yaml # role definitions
|
|
128
|
+
skills/<namespace>/<skill>/ # skills organized by namespace
|
|
129
|
+
rules/ # global, not role-scoped
|
|
127
130
|
```
|
|
128
131
|
|
|
129
|
-
- `teamai pull`
|
|
130
|
-
- Skills
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
- `rules
|
|
132
|
+
- `teamai pull` reads `manifest/roles.yaml` and only syncs skills under `primaryRole + additionalRoles` namespaces (unioned with tag-filter results).
|
|
133
|
+
- Skills install flat from `skills/<namespace>/<skill-name>/` into `<tool>/skills/<skill-name>/` — the namespace layout is invisible to users.
|
|
134
|
+
- If two activated namespaces contain a skill with the same name, `pull` fails outright to prevent silent overrides.
|
|
135
|
+
- Skills outside both activated namespaces and tag-filter results are cleaned up automatically.
|
|
136
|
+
- `rules/`, `docs/`, `learnings/` keep their original behavior and are not role-scoped (learnings are shared team-wide).
|
|
134
137
|
|
|
135
|
-
|
|
138
|
+
Example config:
|
|
136
139
|
|
|
137
140
|
```yaml
|
|
138
141
|
primaryRole: hai
|
|
@@ -141,37 +144,37 @@ additionalRoles:
|
|
|
141
144
|
resourceProfileVersion: 1
|
|
142
145
|
```
|
|
143
146
|
|
|
144
|
-
|
|
147
|
+
This syncs every skill from `skills/common/`, `skills/hai/`, and `skills/pm/`.
|
|
145
148
|
|
|
146
|
-
##
|
|
149
|
+
## Role-scoped Pushing
|
|
147
150
|
|
|
148
|
-
|
|
151
|
+
In a role-scoped repo, when you push a new skill the CLI auto-detects available namespaces and prompts:
|
|
149
152
|
|
|
150
153
|
```bash
|
|
151
|
-
#
|
|
154
|
+
# Interactive namespace selection (recommended)
|
|
152
155
|
teamai push
|
|
153
|
-
#
|
|
156
|
+
# Output:
|
|
154
157
|
# Which namespace should new skills be pushed to?
|
|
155
158
|
# 1. common
|
|
156
159
|
# 2. hai
|
|
157
160
|
# 3. pm
|
|
158
161
|
# Choose namespace [1-3] (default: 1 = common):
|
|
159
162
|
|
|
160
|
-
#
|
|
163
|
+
# Explicit target namespace
|
|
161
164
|
teamai push --role pm
|
|
162
165
|
```
|
|
163
166
|
|
|
164
|
-
-
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
- `--role <id>`
|
|
168
|
-
-
|
|
167
|
+
- With a `primaryRole`, the list expands from `manifest/roles.yaml`.
|
|
168
|
+
- Without a `primaryRole`, namespaces are discovered by scanning the team repo's directory structure.
|
|
169
|
+
- When only one namespace exists, it's selected automatically — no prompt.
|
|
170
|
+
- `--role <id>` temporarily overrides the target namespace.
|
|
171
|
+
- Modifying an existing skill keeps its original namespace — no reselection needed.
|
|
169
172
|
|
|
170
|
-
|
|
173
|
+
On push, the CLI checks `SKILL.md`'s YAML frontmatter (`name`/`description`) and auto-fills anything missing, so you don't have to maintain it by hand.
|
|
171
174
|
|
|
172
|
-
##
|
|
175
|
+
## Team Culture
|
|
173
176
|
|
|
174
|
-
|
|
177
|
+
Create `culture.md` at the root of the team repo. Use YAML frontmatter for company/team info and the body for cultural guidelines:
|
|
175
178
|
|
|
176
179
|
```markdown
|
|
177
180
|
---
|
|
@@ -189,135 +192,135 @@ team:
|
|
|
189
192
|
- Improve test coverage
|
|
190
193
|
---
|
|
191
194
|
|
|
192
|
-
##
|
|
195
|
+
## Coding Guidelines
|
|
193
196
|
|
|
194
|
-
-
|
|
195
|
-
-
|
|
196
|
-
-
|
|
197
|
+
- Every PR needs at least one reviewer approval
|
|
198
|
+
- Direct pushes to master are forbidden
|
|
199
|
+
- Test coverage must stay above 80%
|
|
197
200
|
```
|
|
198
201
|
|
|
199
|
-
`teamai pull`
|
|
202
|
+
`teamai pull` compiles `culture.md` into structured content and injects it into every AI tool's `CLAUDE.md` (between `<!-- [teamai:culture:start] -->` and `<!-- [teamai:culture:end] -->`). AI coding assistants pick up the team culture on every session.
|
|
200
203
|
|
|
201
|
-
##
|
|
204
|
+
## Cross-team Skill Subscription
|
|
202
205
|
|
|
203
|
-
|
|
206
|
+
Use `teamai source` to subscribe to other teams' public skill repos. Their skills sync automatically on `pull`:
|
|
204
207
|
|
|
205
208
|
```bash
|
|
206
|
-
#
|
|
207
|
-
teamai source add https://
|
|
209
|
+
# Add a subscription source
|
|
210
|
+
teamai source add https://github.com/other-team/teamai-public.git --name other-team
|
|
208
211
|
|
|
209
|
-
#
|
|
212
|
+
# List subscribed sources
|
|
210
213
|
teamai source list
|
|
211
214
|
|
|
212
|
-
#
|
|
215
|
+
# Browse skills from a source
|
|
213
216
|
teamai source browse other-team
|
|
214
217
|
|
|
215
|
-
#
|
|
218
|
+
# Remove a subscription (and clean up its skills)
|
|
216
219
|
teamai source remove other-team
|
|
217
220
|
```
|
|
218
221
|
|
|
219
|
-
|
|
222
|
+
Subscribed skills sync to your local machine on `teamai pull` and coexist with your own team's skills.
|
|
220
223
|
|
|
221
|
-
## Scope
|
|
224
|
+
## Scope
|
|
222
225
|
|
|
223
|
-
TeamAI
|
|
226
|
+
TeamAI supports two scopes that can coexist:
|
|
224
227
|
|
|
225
|
-
|
|
|
226
|
-
|
|
227
|
-
|
|
|
228
|
-
|
|
|
229
|
-
|
|
|
230
|
-
|
|
|
228
|
+
| Dimension | User Scope (default) | Project Scope |
|
|
229
|
+
|-----------|---------------------|---------------|
|
|
230
|
+
| **Install location** | under `~/` (e.g. `~/.claude/skills/`) | under the project (e.g. `<project>/.claude/skills/`) |
|
|
231
|
+
| **Config file** | `~/.teamai/config.yaml` | `<project>/.teamai/config.yaml` |
|
|
232
|
+
| **Use case** | general team norms, cross-project skills | project-specific skills and rules |
|
|
233
|
+
| **Init** | `teamai init --repo <group>/<repo>` | `cd <project> && teamai init --repo <group>/<repo> --scope project` |
|
|
231
234
|
|
|
232
|
-
|
|
233
|
-
- `teamai pull`
|
|
234
|
-
- `teamai contribute --scope user/project`
|
|
235
|
-
- `teamai recall`
|
|
236
|
-
-
|
|
235
|
+
**Dual-scope cooperation:**
|
|
236
|
+
- `teamai pull` pulls user and project scopes sequentially; they don't conflict.
|
|
237
|
+
- `teamai contribute --scope user/project` lets you pick which repo to push to.
|
|
238
|
+
- `teamai recall` merges knowledge bases from both scopes into a single ranking and tags each result with its origin `[user]` / `[project]`.
|
|
239
|
+
- The `scope` field in the remote `teamai.yaml` locks the repo's type; member init must match.
|
|
237
240
|
|
|
238
|
-
##
|
|
241
|
+
## Automatic Experience Sharing
|
|
239
242
|
|
|
240
|
-
|
|
243
|
+
When an AI coding session ends, the Stop hook evaluates session value and prompts you to share:
|
|
241
244
|
|
|
242
245
|
```
|
|
243
|
-
AI coding session (
|
|
246
|
+
AI coding session (ongoing...)
|
|
244
247
|
│
|
|
245
|
-
▼ PostToolUse hook
|
|
248
|
+
▼ PostToolUse hook continuously tracks tool calls and skill usage
|
|
246
249
|
│
|
|
247
|
-
▼
|
|
250
|
+
▼ session ends (Stop hook fires)
|
|
248
251
|
│
|
|
249
|
-
├─
|
|
250
|
-
│
|
|
252
|
+
├─ Smart scoring: tool-call count + tool diversity + skill usage + error retries + session duration
|
|
253
|
+
│ (extracted from dashboard events.jsonl, one-shot, out of 100)
|
|
251
254
|
│
|
|
252
|
-
├─
|
|
255
|
+
├─ Score < 35 → stay silent (too few or too uniform calls, not worth summarizing)
|
|
253
256
|
│
|
|
254
|
-
▼
|
|
257
|
+
▼ Score ≥ 35
|
|
255
258
|
│
|
|
256
|
-
AI
|
|
259
|
+
AI: "This session was productive — consider running /teamai-share-learnings to share."
|
|
257
260
|
│
|
|
258
|
-
▼
|
|
261
|
+
▼ user accepts
|
|
259
262
|
│
|
|
260
263
|
/teamai-share-learnings (AI sub-agent)
|
|
261
|
-
├─ AI
|
|
262
|
-
├─
|
|
263
|
-
└─ teamai contribute --file <path> →
|
|
264
|
+
├─ AI summarizes the session's lessons
|
|
265
|
+
├─ Generates a Markdown document
|
|
266
|
+
└─ teamai contribute --file <path> → pushes directly to the team repo's learnings/
|
|
264
267
|
```
|
|
265
268
|
|
|
266
|
-
- `/teamai-share-learnings`
|
|
267
|
-
-
|
|
268
|
-
-
|
|
269
|
+
- `/teamai-share-learnings` is a built-in CLI skill, deployed locally by `teamai pull/init`.
|
|
270
|
+
- Each session is prompted at most once (de-duplicated); you can always ignore it.
|
|
271
|
+
- The document lands directly in `learnings/` and is visible to teammates on their next `pull`.
|
|
269
272
|
|
|
270
|
-
##
|
|
273
|
+
## Team Knowledge Recall
|
|
271
274
|
|
|
272
|
-
`teamai recall`
|
|
275
|
+
`teamai recall` implements the "read" side of the knowledge flywheel — the AI can search across accumulated team experience docs:
|
|
273
276
|
|
|
274
277
|
```
|
|
275
|
-
contribute(
|
|
278
|
+
contribute (write) → pull (sync + index) → recall (search) → upvote (vote) → better ranking
|
|
276
279
|
```
|
|
277
280
|
|
|
278
281
|
```bash
|
|
279
|
-
$ teamai recall "fuse
|
|
280
|
-
[1/2] MR
|
|
282
|
+
$ teamai recall "fuse port"
|
|
283
|
+
[1/2] MR review caught a FUSE port-conflict bug ★1 [user]
|
|
281
284
|
Author: jeffyxu | Score: 18.5 | Tags: troubleshooting, fuse, k8s
|
|
282
285
|
|
|
283
|
-
[2/2] FUSE
|
|
286
|
+
[2/2] FUSE deployment configuration best practices [project]
|
|
284
287
|
Author: alice | Score: 12.0 | Tags: fuse, deploy
|
|
285
288
|
```
|
|
286
289
|
|
|
287
|
-
-
|
|
288
|
-
- Hybrid
|
|
289
|
-
-
|
|
290
|
-
-
|
|
290
|
+
- **Dual-scope merged search:** automatically merges user and project scope knowledge bases, each result tagged with its origin.
|
|
291
|
+
- Hybrid CJK + English search (Intl.Segmenter + CJK bigrams).
|
|
292
|
+
- Searches implicitly upvote matched docs; good docs naturally float up over time.
|
|
293
|
+
- Votes are written to each scope's own repo, so attribution stays correct.
|
|
291
294
|
|
|
292
|
-
##
|
|
295
|
+
## Update
|
|
293
296
|
|
|
294
297
|
```bash
|
|
295
|
-
teamai update
|
|
296
|
-
npm update -g teamai-cli #
|
|
298
|
+
teamai update # auto-detect and upgrade to latest
|
|
299
|
+
npm update -g teamai-cli # or trigger an npm upgrade manually
|
|
297
300
|
```
|
|
298
301
|
|
|
299
|
-
`teamai update`
|
|
302
|
+
`teamai update` picks the registry based on the installed package name:
|
|
300
303
|
|
|
301
|
-
- `teamai-cli` →
|
|
302
|
-
- `@tencent/teamai-cli` →
|
|
304
|
+
- `teamai-cli` → public npm (`https://registry.npmjs.org`)
|
|
305
|
+
- `@tencent/teamai-cli` → internal tnpm (`http://r.tnpm.oa.com`)
|
|
303
306
|
|
|
304
|
-
|
|
307
|
+
To override the registry manually, set `TEAMAI_NPM_REGISTRY=<url>`.
|
|
305
308
|
|
|
306
|
-
###
|
|
309
|
+
### Auto-update Control
|
|
307
310
|
|
|
308
|
-
|
|
311
|
+
Auto-update runs on the Stop hook at the end of a session. It can be controlled at two layers:
|
|
309
312
|
|
|
310
|
-
|
|
|
311
|
-
|
|
312
|
-
|
|
|
313
|
-
|
|
|
313
|
+
| Layer | File | Field | Allowed values |
|
|
314
|
+
|-------|------|-------|----------------|
|
|
315
|
+
| Team default | `teamai.yaml` | `autoUpdate` | `true` (default) / `false` |
|
|
316
|
+
| User override | `~/.teamai/config.yaml` | `updatePolicy` | `auto` / `prompt` / `skip` |
|
|
314
317
|
|
|
315
|
-
|
|
318
|
+
The user-level `updatePolicy` always wins over the team-level `autoUpdate`.
|
|
316
319
|
|
|
317
|
-
##
|
|
320
|
+
## License
|
|
318
321
|
|
|
319
322
|
[MIT](LICENSE)
|
|
320
323
|
|
|
321
|
-
##
|
|
324
|
+
## Contributing
|
|
322
325
|
|
|
323
|
-
|
|
326
|
+
PRs are welcome! Please read [CONTRIBUTING.md](.github/CONTRIBUTING.md) first.
|