teamai-cli 0.20.0-beta.1 → 0.20.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/README.md +4 -2
- package/README.zh-CN.md +4 -2
- package/dist/index.js +111 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,15 +60,17 @@ No separate team repo. Run `teamai init .` inside an existing project and its ow
|
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
62
|
cd /path/to/my-project
|
|
63
|
-
teamai init .
|
|
63
|
+
teamai init . # interactive: pick which AI tools to set up
|
|
64
|
+
teamai init . --agent claude,codex # non-interactive: Claude Code + Codex
|
|
64
65
|
```
|
|
65
66
|
|
|
66
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.
|
|
67
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.
|
|
68
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.
|
|
69
71
|
- All of teamai's git operations run in isolated worktrees, so your working tree and current branch are never touched.
|
|
70
72
|
|
|
71
|
-
|
|
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.
|
|
72
74
|
|
|
73
75
|
> **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.
|
|
74
76
|
|
package/README.zh-CN.md
CHANGED
|
@@ -60,15 +60,17 @@ teamai init https://github.com/yourorg/project-repo --inherit-user-scope
|
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
62
|
cd /path/to/my-project
|
|
63
|
-
teamai init .
|
|
63
|
+
teamai init . # 交互式:选择要启用哪些 AI 工具
|
|
64
|
+
teamai init . --agent claude,codex # 非交互:启用 Claude Code + Codex
|
|
64
65
|
```
|
|
65
66
|
|
|
66
67
|
- **知识资产**(skills / rules / docs / learnings)提交到仓库 **main 分支**的 `.teamai/` 目录,因此一次普通 `git clone` 就带上了整套团队配置。
|
|
67
68
|
- **上报数据**(成员注册、会话摘要、投票、使用统计)走独立的 **`teamai-reports` 孤儿分支** —— 永不污染 main。
|
|
69
|
+
- **由你选择启用哪些 AI 工具。** `--agent claude,codex`(可重复/逗号分隔),省略时弹交互选择框,非交互场景则按你本机 `~/` 下已装的工具来建。teamai 为每个所选工具建目录、注入 hooks、并提交其 settings。
|
|
68
70
|
- **克隆即初始化。** 团队成员 clone 仓库后,下一条 `teamai` 命令(或 AI 会话)会自动识别 `.teamai/teamai.yaml` 里的 `mode: self` 标记并自动完成本机初始化 —— 无需手抄 repo/role 参数。
|
|
69
71
|
- teamai 的所有 git 操作都在隔离的 worktree 中进行,绝不触碰你的工作区和当前分支。
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
`teamai init .` 会帮你把 `.teamai/`(skills、rules、docs、learnings、`teamai.yaml`、`.gitignore`)以及每个所选工具的 settings(如 `.claude/settings.json`、`.codex/hooks.json`)提交好;推送 main 后团队成员 clone 即可自动初始化。
|
|
72
74
|
|
|
73
75
|
> **完整使用指南**:[docs/usage-guide.zh-CN.md](docs/usage-guide.zh-CN.md)([English](docs/usage-guide.md))— 涵盖从团队创建到日常使用的全流程。
|
|
74
76
|
|
package/dist/index.js
CHANGED
|
@@ -9655,11 +9655,18 @@ async function pushCore(localConfig, teamConfig, options) {
|
|
|
9655
9655
|
log.debug(`Pre-push sync skipped: ${e.message}`);
|
|
9656
9656
|
}
|
|
9657
9657
|
const spin = spinner("Scanning local resources...").start();
|
|
9658
|
+
const scanTeamConfig = selfMode ? {
|
|
9659
|
+
...teamConfig,
|
|
9660
|
+
toolPaths: {
|
|
9661
|
+
...teamConfig.toolPaths,
|
|
9662
|
+
[SELF_KNOWLEDGE_SCAN_KEY]: { skills: ".teamai/skills", rules: ".teamai/rules" }
|
|
9663
|
+
}
|
|
9664
|
+
} : teamConfig;
|
|
9658
9665
|
const pushableTypes = ["skills", "rules", "env", "agents"];
|
|
9659
9666
|
const allItems = [];
|
|
9660
9667
|
for (const type of pushableTypes) {
|
|
9661
9668
|
const handler = getHandler(type);
|
|
9662
|
-
const items = await handler.scanLocalForPush(
|
|
9669
|
+
const items = await handler.scanLocalForPush(scanTeamConfig, localConfig);
|
|
9663
9670
|
allItems.push(...items);
|
|
9664
9671
|
}
|
|
9665
9672
|
spin.stop();
|
|
@@ -9933,6 +9940,7 @@ ${selectedItems.map((i) => `- [${i.type}] ${i.name}`).join("\n")}`
|
|
|
9933
9940
|
}
|
|
9934
9941
|
await saveStateForScope(state, localConfig.scope, localConfig.projectRoot);
|
|
9935
9942
|
}
|
|
9943
|
+
var SELF_KNOWLEDGE_SCAN_KEY;
|
|
9936
9944
|
var init_push = __esm({
|
|
9937
9945
|
"src/push.ts"() {
|
|
9938
9946
|
"use strict";
|
|
@@ -9948,6 +9956,7 @@ var init_push = __esm({
|
|
|
9948
9956
|
init_roles();
|
|
9949
9957
|
init_prompt();
|
|
9950
9958
|
init_fs();
|
|
9959
|
+
SELF_KNOWLEDGE_SCAN_KEY = "__teamai_self_knowledge__";
|
|
9951
9960
|
}
|
|
9952
9961
|
});
|
|
9953
9962
|
|
|
@@ -10263,15 +10272,34 @@ var init_git = __esm({
|
|
|
10263
10272
|
var known_agents_exports = {};
|
|
10264
10273
|
__export(known_agents_exports, {
|
|
10265
10274
|
KNOWN_AGENTS: () => KNOWN_AGENTS,
|
|
10275
|
+
SELF_MODE_AGENT_CHOICES: () => SELF_MODE_AGENT_CHOICES,
|
|
10276
|
+
detectHomeInstalledAgents: () => detectHomeInstalledAgents,
|
|
10266
10277
|
detectInstalledAgents: () => detectInstalledAgents,
|
|
10267
10278
|
getEffectiveAgents: () => getEffectiveAgents,
|
|
10279
|
+
normalizeAgentList: () => normalizeAgentList,
|
|
10268
10280
|
seedSelfModeToolDirs: () => seedSelfModeToolDirs
|
|
10269
10281
|
});
|
|
10270
10282
|
import path34 from "path";
|
|
10283
|
+
function normalizeAgentList(agent) {
|
|
10284
|
+
if (agent === void 0) return [];
|
|
10285
|
+
const raw = Array.isArray(agent) ? agent : [agent];
|
|
10286
|
+
const out = [];
|
|
10287
|
+
const seen = /* @__PURE__ */ new Set();
|
|
10288
|
+
for (const part of raw) {
|
|
10289
|
+
for (const piece of String(part).split(",")) {
|
|
10290
|
+
const id = piece.trim();
|
|
10291
|
+
if (id && !seen.has(id)) {
|
|
10292
|
+
seen.add(id);
|
|
10293
|
+
out.push(id);
|
|
10294
|
+
}
|
|
10295
|
+
}
|
|
10296
|
+
}
|
|
10297
|
+
return out;
|
|
10298
|
+
}
|
|
10271
10299
|
async function seedSelfModeToolDirs(localConfig, teamConfig) {
|
|
10272
10300
|
const baseDir = resolveBaseDir(localConfig);
|
|
10273
10301
|
const configured = teamConfig.toolPaths ?? {};
|
|
10274
|
-
let targets = localConfig.enabledAgents
|
|
10302
|
+
let targets = localConfig.enabledAgents ?? [];
|
|
10275
10303
|
targets = targets.filter((id) => !isAgentDisabled(localConfig, id));
|
|
10276
10304
|
const seeded = [];
|
|
10277
10305
|
for (const id of targets) {
|
|
@@ -10282,6 +10310,21 @@ async function seedSelfModeToolDirs(localConfig, teamConfig) {
|
|
|
10282
10310
|
}
|
|
10283
10311
|
return seeded;
|
|
10284
10312
|
}
|
|
10313
|
+
async function detectHomeInstalledAgents(candidateIds = SELF_MODE_AGENT_CHOICES) {
|
|
10314
|
+
const home = process.env.HOME;
|
|
10315
|
+
if (!home) return [];
|
|
10316
|
+
const found = [];
|
|
10317
|
+
for (const id of candidateIds) {
|
|
10318
|
+
const skillsPath = KNOWN_AGENTS.find((a) => a.id === id)?.skillsPath;
|
|
10319
|
+
if (!skillsPath) continue;
|
|
10320
|
+
const rootSegment = skillsPath.split("/")[0];
|
|
10321
|
+
if (!rootSegment) continue;
|
|
10322
|
+
if (await pathExists(path34.join(home, rootSegment))) {
|
|
10323
|
+
found.push(id);
|
|
10324
|
+
}
|
|
10325
|
+
}
|
|
10326
|
+
return found;
|
|
10327
|
+
}
|
|
10285
10328
|
function getEffectiveAgents(teamConfig) {
|
|
10286
10329
|
const byId = /* @__PURE__ */ new Map();
|
|
10287
10330
|
for (const agent of KNOWN_AGENTS) {
|
|
@@ -10325,12 +10368,13 @@ async function detectInstalledAgents(localConfig, teamConfig) {
|
|
|
10325
10368
|
}
|
|
10326
10369
|
return results;
|
|
10327
10370
|
}
|
|
10328
|
-
var KNOWN_AGENTS;
|
|
10371
|
+
var SELF_MODE_AGENT_CHOICES, KNOWN_AGENTS;
|
|
10329
10372
|
var init_known_agents = __esm({
|
|
10330
10373
|
"src/known-agents.ts"() {
|
|
10331
10374
|
"use strict";
|
|
10332
10375
|
init_fs();
|
|
10333
10376
|
init_types();
|
|
10377
|
+
SELF_MODE_AGENT_CHOICES = ["claude", "codex", "cursor", "codebuddy", "workbuddy"];
|
|
10334
10378
|
KNOWN_AGENTS = [
|
|
10335
10379
|
// Coding agents already wired through teamConfig.toolPaths defaults
|
|
10336
10380
|
{ id: "claude", displayName: "Claude Code", category: "coding", skillsPath: ".claude/skills" },
|
|
@@ -10446,12 +10490,15 @@ async function bootstrapSelfRepo(dir, opts) {
|
|
|
10446
10490
|
log.debug("[bootstrap] teamai.yaml not loadable; skipping");
|
|
10447
10491
|
return "skip";
|
|
10448
10492
|
}
|
|
10493
|
+
const { detectHomeInstalledAgents: detectHomeInstalledAgents2 } = await Promise.resolve().then(() => (init_known_agents(), known_agents_exports));
|
|
10494
|
+
const enabledAgents = await detectHomeInstalledAgents2();
|
|
10449
10495
|
const localConfig = {
|
|
10450
10496
|
repo: { localPath, remote: repoInfo.httpsUrl, kind: "self", businessRepoRoot },
|
|
10451
10497
|
username,
|
|
10452
10498
|
scope: "project",
|
|
10453
10499
|
projectRoot: businessRepoRoot,
|
|
10454
|
-
additionalRoles: []
|
|
10500
|
+
additionalRoles: [],
|
|
10501
|
+
...enabledAgents.length > 0 ? { enabledAgents } : {}
|
|
10455
10502
|
};
|
|
10456
10503
|
try {
|
|
10457
10504
|
const { loadRolesManifest: loadRolesManifest2 } = await Promise.resolve().then(() => (init_roles(), roles_exports));
|
|
@@ -10741,6 +10788,7 @@ __export(init_exports, {
|
|
|
10741
10788
|
init: () => init,
|
|
10742
10789
|
initHttp: () => initHttp,
|
|
10743
10790
|
initSelfRepo: () => initSelfRepo,
|
|
10791
|
+
promptForSelfModeAgents: () => promptForSelfModeAgents,
|
|
10744
10792
|
resolveInheritUserScope: () => resolveInheritUserScope,
|
|
10745
10793
|
resolveInitRepo: () => resolveInitRepo,
|
|
10746
10794
|
resolveInitScope: () => resolveInitScope
|
|
@@ -10962,11 +11010,12 @@ async function initHttp(url, options) {
|
|
|
10962
11010
|
log.debug(`Role selection skipped: ${msg}`);
|
|
10963
11011
|
}
|
|
10964
11012
|
}
|
|
10965
|
-
|
|
11013
|
+
const requestedAgents = normalizeAgentList(options.agent);
|
|
11014
|
+
if (requestedAgents.length > 0) {
|
|
10966
11015
|
const existing = await loadLocalConfigForScope(scope, projectRoot);
|
|
10967
11016
|
const prev = existing?.enabledAgents ?? [];
|
|
10968
|
-
localConfig.enabledAgents = [.../* @__PURE__ */ new Set([...prev,
|
|
10969
|
-
localConfig.disabledAgents = (existing?.disabledAgents ?? []).filter((t) => t
|
|
11017
|
+
localConfig.enabledAgents = [.../* @__PURE__ */ new Set([...prev, ...requestedAgents])];
|
|
11018
|
+
localConfig.disabledAgents = (existing?.disabledAgents ?? []).filter((t) => !requestedAgents.includes(t));
|
|
10970
11019
|
}
|
|
10971
11020
|
await ensureDir(teamaiHome);
|
|
10972
11021
|
if (scope === "project") {
|
|
@@ -10982,7 +11031,7 @@ async function initHttp(url, options) {
|
|
|
10982
11031
|
await saveStateForScope(state, scope, projectRoot);
|
|
10983
11032
|
} catch {
|
|
10984
11033
|
}
|
|
10985
|
-
const filterAgents2 =
|
|
11034
|
+
const filterAgents2 = requestedAgents.length > 0 ? requestedAgents : void 0;
|
|
10986
11035
|
await reconcileTeamHooksForConfig(teamConfig, localConfig, { filterAgents: filterAgents2 });
|
|
10987
11036
|
const { initLocalAgentHttp: initLocalAgentHttp2 } = await Promise.resolve().then(() => (init_local_agent(), local_agent_exports));
|
|
10988
11037
|
try {
|
|
@@ -11023,6 +11072,35 @@ function buildSelfModeGitignore() {
|
|
|
11023
11072
|
""
|
|
11024
11073
|
].join("\n");
|
|
11025
11074
|
}
|
|
11075
|
+
async function promptForSelfModeAgents(options) {
|
|
11076
|
+
const explicit = normalizeAgentList(options.agent);
|
|
11077
|
+
if (explicit.length > 0) return explicit;
|
|
11078
|
+
if (options.silent || options.force || !process.stdin.isTTY) {
|
|
11079
|
+
return detectHomeInstalledAgents();
|
|
11080
|
+
}
|
|
11081
|
+
const choices = SELF_MODE_AGENT_CHOICES.map((id) => {
|
|
11082
|
+
const meta = KNOWN_AGENTS.find((a) => a.id === id);
|
|
11083
|
+
const root = meta?.skillsPath.split("/")[0] ?? `.${id}`;
|
|
11084
|
+
return { id, label: meta?.displayName ?? id, root };
|
|
11085
|
+
});
|
|
11086
|
+
console.log("");
|
|
11087
|
+
console.log("Which AI tools should teamai set up in this repo?");
|
|
11088
|
+
console.log("(creates the skills dir, injects hooks, commits settings to main)");
|
|
11089
|
+
console.log("");
|
|
11090
|
+
choices.forEach((c, i) => {
|
|
11091
|
+
console.log(` ${i + 1}. ${c.label} (${c.root})`);
|
|
11092
|
+
});
|
|
11093
|
+
console.log("");
|
|
11094
|
+
const indices = await askSelection(
|
|
11095
|
+
`Select [1-${choices.length}, comma/range, or "all"] (default: 1 = ${choices[0].label}): `,
|
|
11096
|
+
choices.length,
|
|
11097
|
+
false
|
|
11098
|
+
);
|
|
11099
|
+
if (!indices || indices.length === 0) {
|
|
11100
|
+
return ["claude"];
|
|
11101
|
+
}
|
|
11102
|
+
return indices.map((i) => choices[i].id);
|
|
11103
|
+
}
|
|
11026
11104
|
async function initSelfRepo(options) {
|
|
11027
11105
|
log.info("Initializing teamai (single-repo mode)...");
|
|
11028
11106
|
const cwd = process.cwd();
|
|
@@ -11134,11 +11212,12 @@ async function initSelfRepo(options) {
|
|
|
11134
11212
|
log.debug(`Role selection skipped: ${msg}`);
|
|
11135
11213
|
}
|
|
11136
11214
|
}
|
|
11137
|
-
|
|
11215
|
+
const selectedAgents = await promptForSelfModeAgents(options);
|
|
11216
|
+
if (selectedAgents.length > 0) {
|
|
11138
11217
|
const existing = await loadLocalConfigForScope("project", businessRepoRoot);
|
|
11139
11218
|
const prev = existing?.enabledAgents ?? [];
|
|
11140
|
-
localConfig.enabledAgents = [.../* @__PURE__ */ new Set([...prev,
|
|
11141
|
-
localConfig.disabledAgents = (existing?.disabledAgents ?? []).filter((t) => t
|
|
11219
|
+
localConfig.enabledAgents = [.../* @__PURE__ */ new Set([...prev, ...selectedAgents])];
|
|
11220
|
+
localConfig.disabledAgents = (existing?.disabledAgents ?? []).filter((t) => !selectedAgents.includes(t));
|
|
11142
11221
|
}
|
|
11143
11222
|
await ensureDir(teamaiHome);
|
|
11144
11223
|
await saveLocalConfigForScope(localConfig, "project", businessRepoRoot);
|
|
@@ -11146,6 +11225,15 @@ async function initSelfRepo(options) {
|
|
|
11146
11225
|
const gitignorePath = path38.join(teamaiHome, ".gitignore");
|
|
11147
11226
|
await writeFile(gitignorePath, buildSelfModeGitignore());
|
|
11148
11227
|
log.debug("Generated single-repo .teamai/.gitignore");
|
|
11228
|
+
const filterAgents2 = selectedAgents.length > 0 ? selectedAgents : void 0;
|
|
11229
|
+
try {
|
|
11230
|
+
const { seedSelfModeToolDirs: seedSelfModeToolDirs2 } = await Promise.resolve().then(() => (init_known_agents(), known_agents_exports));
|
|
11231
|
+
const seeded = await seedSelfModeToolDirs2(localConfig, teamConfig);
|
|
11232
|
+
if (seeded.length > 0) log.debug(`Seeded tool dirs for: ${seeded.join(", ")}`);
|
|
11233
|
+
} catch (e) {
|
|
11234
|
+
log.debug(`Tool-dir seeding skipped: ${e.message}`);
|
|
11235
|
+
}
|
|
11236
|
+
await reconcileTeamHooksForConfig(teamConfig, localConfig, { filterAgents: filterAgents2 });
|
|
11149
11237
|
if (!options.dryRun) {
|
|
11150
11238
|
try {
|
|
11151
11239
|
const { commitPaths: commitPaths2, hasCommits: hasCommits2 } = await Promise.resolve().then(() => (init_git(), git_exports));
|
|
@@ -11156,9 +11244,12 @@ async function initSelfRepo(options) {
|
|
|
11156
11244
|
".teamai/docs",
|
|
11157
11245
|
".teamai/learnings",
|
|
11158
11246
|
".teamai/teamai.yaml",
|
|
11159
|
-
".teamai/.gitignore"
|
|
11160
|
-
".claude/settings.json"
|
|
11247
|
+
".teamai/.gitignore"
|
|
11161
11248
|
];
|
|
11249
|
+
for (const id of selectedAgents) {
|
|
11250
|
+
const settingsPath = teamConfig.toolPaths?.[id]?.settings;
|
|
11251
|
+
if (settingsPath) skeletonPaths.push(settingsPath);
|
|
11252
|
+
}
|
|
11162
11253
|
const committed = await commitPaths2(
|
|
11163
11254
|
businessRepoRoot,
|
|
11164
11255
|
"[teamai] Initialize single-repo mode (skills/rules/docs/learnings skeleton)",
|
|
@@ -11203,15 +11294,6 @@ async function initSelfRepo(options) {
|
|
|
11203
11294
|
await saveStateForScope(state, "project", businessRepoRoot);
|
|
11204
11295
|
} catch {
|
|
11205
11296
|
}
|
|
11206
|
-
try {
|
|
11207
|
-
const { seedSelfModeToolDirs: seedSelfModeToolDirs2 } = await Promise.resolve().then(() => (init_known_agents(), known_agents_exports));
|
|
11208
|
-
const seeded = await seedSelfModeToolDirs2(localConfig, teamConfig);
|
|
11209
|
-
if (seeded.length > 0) log.debug(`Seeded tool dirs for: ${seeded.join(", ")}`);
|
|
11210
|
-
} catch (e) {
|
|
11211
|
-
log.debug(`Tool-dir seeding skipped: ${e.message}`);
|
|
11212
|
-
}
|
|
11213
|
-
const filterAgents2 = options.agent ? [options.agent] : void 0;
|
|
11214
|
-
await reconcileTeamHooksForConfig(teamConfig, localConfig, { filterAgents: filterAgents2 });
|
|
11215
11297
|
log.success("teamai initialized (single-repo mode)!");
|
|
11216
11298
|
log.info("Push your business repo (e.g. `git push -u origin HEAD`) so teammates get the .teamai/ knowledge and are auto-initialized on clone.");
|
|
11217
11299
|
log.info("Add skills/rules later with `teamai push` \u2014 it opens a PR against your repo without touching your working tree.");
|
|
@@ -11484,11 +11566,12 @@ async function init(options) {
|
|
|
11484
11566
|
process.exit(1);
|
|
11485
11567
|
}
|
|
11486
11568
|
}
|
|
11487
|
-
|
|
11569
|
+
const requestedAgents = normalizeAgentList(options.agent);
|
|
11570
|
+
if (requestedAgents.length > 0) {
|
|
11488
11571
|
const existing = await loadLocalConfigForScope(scope, projectRoot);
|
|
11489
11572
|
const prev = existing?.enabledAgents ?? [];
|
|
11490
|
-
localConfig.enabledAgents = [.../* @__PURE__ */ new Set([...prev,
|
|
11491
|
-
localConfig.disabledAgents = (existing?.disabledAgents ?? []).filter((t) => t
|
|
11573
|
+
localConfig.enabledAgents = [.../* @__PURE__ */ new Set([...prev, ...requestedAgents])];
|
|
11574
|
+
localConfig.disabledAgents = (existing?.disabledAgents ?? []).filter((t) => !requestedAgents.includes(t));
|
|
11492
11575
|
}
|
|
11493
11576
|
await ensureDir(teamaiHome);
|
|
11494
11577
|
if (scope === "project") {
|
|
@@ -11529,7 +11612,7 @@ async function init(options) {
|
|
|
11529
11612
|
}
|
|
11530
11613
|
const reloadedTeamConfig = await loadTeamConfig(localPath);
|
|
11531
11614
|
if (reloadedTeamConfig) {
|
|
11532
|
-
const filterAgents2 =
|
|
11615
|
+
const filterAgents2 = requestedAgents.length > 0 ? requestedAgents : void 0;
|
|
11533
11616
|
await reconcileTeamHooksForConfig(reloadedTeamConfig, localConfig, { filterAgents: filterAgents2 });
|
|
11534
11617
|
}
|
|
11535
11618
|
log.success("teamai initialized successfully!");
|
|
@@ -11550,6 +11633,7 @@ var init_init = __esm({
|
|
|
11550
11633
|
init_types();
|
|
11551
11634
|
init_roles();
|
|
11552
11635
|
init_prompt();
|
|
11636
|
+
init_known_agents();
|
|
11553
11637
|
}
|
|
11554
11638
|
});
|
|
11555
11639
|
|
|
@@ -30807,7 +30891,7 @@ program.name("teamai").description("TeamAI \u2014 The team harness for AI agents
|
|
|
30807
30891
|
const opts = thisCommand.opts();
|
|
30808
30892
|
if (opts.verbose) setVerbose(true);
|
|
30809
30893
|
});
|
|
30810
|
-
program.command("init").description("Initialize teamai (configure TGit, clone repo, register member)").argument("[repo]", 'Team repo (owner/repo or full URL). Pass "." for single-repo mode (the current git repo is the team repo).').option("--repo <repo>", "Team repo (alias of the positional argument)").option("--http <url>", "Git-free HTTP team repo (read-only consumer; only needs an API key)").option("--self", "Single-repo mode: the current git repo is the team repo (equivalent to `teamai init .`). Knowledge lives on main under .teamai/; reports go to the teamai-reports orphan branch.").option("--token <key>", "API key for HTTP team repo / status reporting (stored 0600, never committed). Also reads TEAMAI_API_TOKEN.").option("--scope <scope>", "Install scope: project (default, <cwd>/.teamai + <cwd>/.claude) or user (~/.teamai + ~/.claude)").option("--inherit-user-scope", "In project scope, also sync safe user-scope resources and search its knowledge").option("--no-inherit-user-scope", "Disable user-scope inheritance for this project").option("--role <id>", "Primary role ID (e.g. hai_dev) for non-interactive setup").option("--agent <name>", "
|
|
30894
|
+
program.command("init").description("Initialize teamai (configure TGit, clone repo, register member)").argument("[repo]", 'Team repo (owner/repo or full URL). Pass "." for single-repo mode (the current git repo is the team repo).').option("--repo <repo>", "Team repo (alias of the positional argument)").option("--http <url>", "Git-free HTTP team repo (read-only consumer; only needs an API key)").option("--self", "Single-repo mode: the current git repo is the team repo (equivalent to `teamai init .`). Knowledge lives on main under .teamai/; reports go to the teamai-reports orphan branch.").option("--token <key>", "API key for HTTP team repo / status reporting (stored 0600, never committed). Also reads TEAMAI_API_TOKEN.").option("--scope <scope>", "Install scope: project (default, <cwd>/.teamai + <cwd>/.claude) or user (~/.teamai + ~/.claude)").option("--inherit-user-scope", "In project scope, also sync safe user-scope resources and search its knowledge").option("--no-inherit-user-scope", "Disable user-scope inheritance for this project").option("--role <id>", "Primary role ID (e.g. hai_dev) for non-interactive setup").option("--agent <name>", "AI tools to set up (e.g. claude, codex, cursor, codebuddy, workbuddy). Repeatable or comma-separated. In single-repo mode, selects which tool dirs to create; omit for an interactive picker. Additive on repeated runs.", (val, acc) => acc.concat(val), []).option("--force", "Overwrite existing config without confirmation").action(async (repoArg, cmdOpts) => {
|
|
30811
30895
|
const globalOpts = program.opts();
|
|
30812
30896
|
const { init: init2 } = await Promise.resolve().then(() => (init_init(), init_exports));
|
|
30813
30897
|
await init2({ ...globalOpts, ...cmdOpts, repoPositional: repoArg });
|