teamai-cli 0.20.0-beta.2 → 0.20.0-beta.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 +4 -2
- package/README.zh-CN.md +4 -2
- package/dist/index.js +129 -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
|
@@ -10272,15 +10272,34 @@ var init_git = __esm({
|
|
|
10272
10272
|
var known_agents_exports = {};
|
|
10273
10273
|
__export(known_agents_exports, {
|
|
10274
10274
|
KNOWN_AGENTS: () => KNOWN_AGENTS,
|
|
10275
|
+
SELF_MODE_AGENT_CHOICES: () => SELF_MODE_AGENT_CHOICES,
|
|
10276
|
+
detectHomeInstalledAgents: () => detectHomeInstalledAgents,
|
|
10275
10277
|
detectInstalledAgents: () => detectInstalledAgents,
|
|
10276
10278
|
getEffectiveAgents: () => getEffectiveAgents,
|
|
10279
|
+
normalizeAgentList: () => normalizeAgentList,
|
|
10277
10280
|
seedSelfModeToolDirs: () => seedSelfModeToolDirs
|
|
10278
10281
|
});
|
|
10279
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
|
+
}
|
|
10280
10299
|
async function seedSelfModeToolDirs(localConfig, teamConfig) {
|
|
10281
10300
|
const baseDir = resolveBaseDir(localConfig);
|
|
10282
10301
|
const configured = teamConfig.toolPaths ?? {};
|
|
10283
|
-
let targets = localConfig.enabledAgents
|
|
10302
|
+
let targets = localConfig.enabledAgents ?? [];
|
|
10284
10303
|
targets = targets.filter((id) => !isAgentDisabled(localConfig, id));
|
|
10285
10304
|
const seeded = [];
|
|
10286
10305
|
for (const id of targets) {
|
|
@@ -10291,6 +10310,21 @@ async function seedSelfModeToolDirs(localConfig, teamConfig) {
|
|
|
10291
10310
|
}
|
|
10292
10311
|
return seeded;
|
|
10293
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
|
+
}
|
|
10294
10328
|
function getEffectiveAgents(teamConfig) {
|
|
10295
10329
|
const byId = /* @__PURE__ */ new Map();
|
|
10296
10330
|
for (const agent of KNOWN_AGENTS) {
|
|
@@ -10334,12 +10368,13 @@ async function detectInstalledAgents(localConfig, teamConfig) {
|
|
|
10334
10368
|
}
|
|
10335
10369
|
return results;
|
|
10336
10370
|
}
|
|
10337
|
-
var KNOWN_AGENTS;
|
|
10371
|
+
var SELF_MODE_AGENT_CHOICES, KNOWN_AGENTS;
|
|
10338
10372
|
var init_known_agents = __esm({
|
|
10339
10373
|
"src/known-agents.ts"() {
|
|
10340
10374
|
"use strict";
|
|
10341
10375
|
init_fs();
|
|
10342
10376
|
init_types();
|
|
10377
|
+
SELF_MODE_AGENT_CHOICES = ["claude", "codex", "cursor", "codebuddy", "workbuddy"];
|
|
10343
10378
|
KNOWN_AGENTS = [
|
|
10344
10379
|
// Coding agents already wired through teamConfig.toolPaths defaults
|
|
10345
10380
|
{ id: "claude", displayName: "Claude Code", category: "coding", skillsPath: ".claude/skills" },
|
|
@@ -10455,12 +10490,15 @@ async function bootstrapSelfRepo(dir, opts) {
|
|
|
10455
10490
|
log.debug("[bootstrap] teamai.yaml not loadable; skipping");
|
|
10456
10491
|
return "skip";
|
|
10457
10492
|
}
|
|
10493
|
+
const { detectHomeInstalledAgents: detectHomeInstalledAgents2 } = await Promise.resolve().then(() => (init_known_agents(), known_agents_exports));
|
|
10494
|
+
const enabledAgents = await detectHomeInstalledAgents2();
|
|
10458
10495
|
const localConfig = {
|
|
10459
10496
|
repo: { localPath, remote: repoInfo.httpsUrl, kind: "self", businessRepoRoot },
|
|
10460
10497
|
username,
|
|
10461
10498
|
scope: "project",
|
|
10462
10499
|
projectRoot: businessRepoRoot,
|
|
10463
|
-
additionalRoles: []
|
|
10500
|
+
additionalRoles: [],
|
|
10501
|
+
...enabledAgents.length > 0 ? { enabledAgents } : {}
|
|
10464
10502
|
};
|
|
10465
10503
|
try {
|
|
10466
10504
|
const { loadRolesManifest: loadRolesManifest2 } = await Promise.resolve().then(() => (init_roles(), roles_exports));
|
|
@@ -10750,9 +10788,11 @@ __export(init_exports, {
|
|
|
10750
10788
|
init: () => init,
|
|
10751
10789
|
initHttp: () => initHttp,
|
|
10752
10790
|
initSelfRepo: () => initSelfRepo,
|
|
10791
|
+
promptForSelfModeAgents: () => promptForSelfModeAgents,
|
|
10753
10792
|
resolveInheritUserScope: () => resolveInheritUserScope,
|
|
10754
10793
|
resolveInitRepo: () => resolveInitRepo,
|
|
10755
|
-
resolveInitScope: () => resolveInitScope
|
|
10794
|
+
resolveInitScope: () => resolveInitScope,
|
|
10795
|
+
resolveSelfModeSelection: () => resolveSelfModeSelection
|
|
10756
10796
|
});
|
|
10757
10797
|
import YAML10 from "yaml";
|
|
10758
10798
|
import fs14 from "fs";
|
|
@@ -10971,11 +11011,12 @@ async function initHttp(url, options) {
|
|
|
10971
11011
|
log.debug(`Role selection skipped: ${msg}`);
|
|
10972
11012
|
}
|
|
10973
11013
|
}
|
|
10974
|
-
|
|
11014
|
+
const requestedAgents = normalizeAgentList(options.agent);
|
|
11015
|
+
if (requestedAgents.length > 0) {
|
|
10975
11016
|
const existing = await loadLocalConfigForScope(scope, projectRoot);
|
|
10976
11017
|
const prev = existing?.enabledAgents ?? [];
|
|
10977
|
-
localConfig.enabledAgents = [.../* @__PURE__ */ new Set([...prev,
|
|
10978
|
-
localConfig.disabledAgents = (existing?.disabledAgents ?? []).filter((t) => t
|
|
11018
|
+
localConfig.enabledAgents = [.../* @__PURE__ */ new Set([...prev, ...requestedAgents])];
|
|
11019
|
+
localConfig.disabledAgents = (existing?.disabledAgents ?? []).filter((t) => !requestedAgents.includes(t));
|
|
10979
11020
|
}
|
|
10980
11021
|
await ensureDir(teamaiHome);
|
|
10981
11022
|
if (scope === "project") {
|
|
@@ -10991,7 +11032,7 @@ async function initHttp(url, options) {
|
|
|
10991
11032
|
await saveStateForScope(state, scope, projectRoot);
|
|
10992
11033
|
} catch {
|
|
10993
11034
|
}
|
|
10994
|
-
const filterAgents2 =
|
|
11035
|
+
const filterAgents2 = requestedAgents.length > 0 ? requestedAgents : void 0;
|
|
10995
11036
|
await reconcileTeamHooksForConfig(teamConfig, localConfig, { filterAgents: filterAgents2 });
|
|
10996
11037
|
const { initLocalAgentHttp: initLocalAgentHttp2 } = await Promise.resolve().then(() => (init_local_agent(), local_agent_exports));
|
|
10997
11038
|
try {
|
|
@@ -11032,6 +11073,61 @@ function buildSelfModeGitignore() {
|
|
|
11032
11073
|
""
|
|
11033
11074
|
].join("\n");
|
|
11034
11075
|
}
|
|
11076
|
+
function resolveSelfModeSelection(indices, detected) {
|
|
11077
|
+
const out = [];
|
|
11078
|
+
const seen = /* @__PURE__ */ new Set();
|
|
11079
|
+
const add = (id) => {
|
|
11080
|
+
if (id && !seen.has(id)) {
|
|
11081
|
+
seen.add(id);
|
|
11082
|
+
out.push(id);
|
|
11083
|
+
}
|
|
11084
|
+
};
|
|
11085
|
+
const pickedAuto = indices.includes(0);
|
|
11086
|
+
if (pickedAuto) {
|
|
11087
|
+
if (detected.length > 0) detected.forEach(add);
|
|
11088
|
+
else add("claude");
|
|
11089
|
+
}
|
|
11090
|
+
for (const i of indices) {
|
|
11091
|
+
if (i === 0) continue;
|
|
11092
|
+
const id = SELF_MODE_AGENT_CHOICES[i - 1];
|
|
11093
|
+
if (id) add(id);
|
|
11094
|
+
}
|
|
11095
|
+
return out;
|
|
11096
|
+
}
|
|
11097
|
+
async function promptForSelfModeAgents(options) {
|
|
11098
|
+
const explicit = normalizeAgentList(options.agent);
|
|
11099
|
+
if (explicit.length > 0) return explicit;
|
|
11100
|
+
if (options.silent || options.force || !process.stdin.isTTY) {
|
|
11101
|
+
return detectHomeInstalledAgents();
|
|
11102
|
+
}
|
|
11103
|
+
const detected = await detectHomeInstalledAgents();
|
|
11104
|
+
const tools = SELF_MODE_AGENT_CHOICES.map((id) => {
|
|
11105
|
+
const meta = KNOWN_AGENTS.find((a) => a.id === id);
|
|
11106
|
+
const root = meta?.skillsPath.split("/")[0] ?? `.${id}`;
|
|
11107
|
+
return { id, label: meta?.displayName ?? id, root };
|
|
11108
|
+
});
|
|
11109
|
+
const detectedLabels = detected.map((id) => tools.find((t) => t.id === id)?.label ?? id).join(", ");
|
|
11110
|
+
const autoLabel = detected.length > 0 ? `Auto \u2014 the AI tools already installed here: ${detectedLabels}` : "Auto \u2014 none detected (will set up Claude Code)";
|
|
11111
|
+
console.log("");
|
|
11112
|
+
console.log("Which AI tools should teamai set up in this repo?");
|
|
11113
|
+
console.log("(creates the skills dir, injects hooks, commits settings to main)");
|
|
11114
|
+
console.log("");
|
|
11115
|
+
console.log(` 1. ${autoLabel}`);
|
|
11116
|
+
tools.forEach((t, i) => {
|
|
11117
|
+
console.log(` ${i + 2}. ${t.label} (${t.root})`);
|
|
11118
|
+
});
|
|
11119
|
+
console.log("");
|
|
11120
|
+
const optionCount = tools.length + 1;
|
|
11121
|
+
const indices = await askSelection(
|
|
11122
|
+
`Select [1-${optionCount}, comma/range, or "all"] (default: 1 = Auto): `,
|
|
11123
|
+
optionCount,
|
|
11124
|
+
false
|
|
11125
|
+
);
|
|
11126
|
+
if (!indices || indices.length === 0) {
|
|
11127
|
+
return resolveSelfModeSelection([0], detected);
|
|
11128
|
+
}
|
|
11129
|
+
return resolveSelfModeSelection(indices, detected);
|
|
11130
|
+
}
|
|
11035
11131
|
async function initSelfRepo(options) {
|
|
11036
11132
|
log.info("Initializing teamai (single-repo mode)...");
|
|
11037
11133
|
const cwd = process.cwd();
|
|
@@ -11143,11 +11239,12 @@ async function initSelfRepo(options) {
|
|
|
11143
11239
|
log.debug(`Role selection skipped: ${msg}`);
|
|
11144
11240
|
}
|
|
11145
11241
|
}
|
|
11146
|
-
|
|
11242
|
+
const selectedAgents = await promptForSelfModeAgents(options);
|
|
11243
|
+
if (selectedAgents.length > 0) {
|
|
11147
11244
|
const existing = await loadLocalConfigForScope("project", businessRepoRoot);
|
|
11148
11245
|
const prev = existing?.enabledAgents ?? [];
|
|
11149
|
-
localConfig.enabledAgents = [.../* @__PURE__ */ new Set([...prev,
|
|
11150
|
-
localConfig.disabledAgents = (existing?.disabledAgents ?? []).filter((t) => t
|
|
11246
|
+
localConfig.enabledAgents = [.../* @__PURE__ */ new Set([...prev, ...selectedAgents])];
|
|
11247
|
+
localConfig.disabledAgents = (existing?.disabledAgents ?? []).filter((t) => !selectedAgents.includes(t));
|
|
11151
11248
|
}
|
|
11152
11249
|
await ensureDir(teamaiHome);
|
|
11153
11250
|
await saveLocalConfigForScope(localConfig, "project", businessRepoRoot);
|
|
@@ -11155,6 +11252,15 @@ async function initSelfRepo(options) {
|
|
|
11155
11252
|
const gitignorePath = path38.join(teamaiHome, ".gitignore");
|
|
11156
11253
|
await writeFile(gitignorePath, buildSelfModeGitignore());
|
|
11157
11254
|
log.debug("Generated single-repo .teamai/.gitignore");
|
|
11255
|
+
const filterAgents2 = selectedAgents.length > 0 ? selectedAgents : void 0;
|
|
11256
|
+
try {
|
|
11257
|
+
const { seedSelfModeToolDirs: seedSelfModeToolDirs2 } = await Promise.resolve().then(() => (init_known_agents(), known_agents_exports));
|
|
11258
|
+
const seeded = await seedSelfModeToolDirs2(localConfig, teamConfig);
|
|
11259
|
+
if (seeded.length > 0) log.debug(`Seeded tool dirs for: ${seeded.join(", ")}`);
|
|
11260
|
+
} catch (e) {
|
|
11261
|
+
log.debug(`Tool-dir seeding skipped: ${e.message}`);
|
|
11262
|
+
}
|
|
11263
|
+
await reconcileTeamHooksForConfig(teamConfig, localConfig, { filterAgents: filterAgents2 });
|
|
11158
11264
|
if (!options.dryRun) {
|
|
11159
11265
|
try {
|
|
11160
11266
|
const { commitPaths: commitPaths2, hasCommits: hasCommits2 } = await Promise.resolve().then(() => (init_git(), git_exports));
|
|
@@ -11165,9 +11271,12 @@ async function initSelfRepo(options) {
|
|
|
11165
11271
|
".teamai/docs",
|
|
11166
11272
|
".teamai/learnings",
|
|
11167
11273
|
".teamai/teamai.yaml",
|
|
11168
|
-
".teamai/.gitignore"
|
|
11169
|
-
".claude/settings.json"
|
|
11274
|
+
".teamai/.gitignore"
|
|
11170
11275
|
];
|
|
11276
|
+
for (const id of selectedAgents) {
|
|
11277
|
+
const settingsPath = teamConfig.toolPaths?.[id]?.settings;
|
|
11278
|
+
if (settingsPath) skeletonPaths.push(settingsPath);
|
|
11279
|
+
}
|
|
11171
11280
|
const committed = await commitPaths2(
|
|
11172
11281
|
businessRepoRoot,
|
|
11173
11282
|
"[teamai] Initialize single-repo mode (skills/rules/docs/learnings skeleton)",
|
|
@@ -11212,15 +11321,6 @@ async function initSelfRepo(options) {
|
|
|
11212
11321
|
await saveStateForScope(state, "project", businessRepoRoot);
|
|
11213
11322
|
} catch {
|
|
11214
11323
|
}
|
|
11215
|
-
try {
|
|
11216
|
-
const { seedSelfModeToolDirs: seedSelfModeToolDirs2 } = await Promise.resolve().then(() => (init_known_agents(), known_agents_exports));
|
|
11217
|
-
const seeded = await seedSelfModeToolDirs2(localConfig, teamConfig);
|
|
11218
|
-
if (seeded.length > 0) log.debug(`Seeded tool dirs for: ${seeded.join(", ")}`);
|
|
11219
|
-
} catch (e) {
|
|
11220
|
-
log.debug(`Tool-dir seeding skipped: ${e.message}`);
|
|
11221
|
-
}
|
|
11222
|
-
const filterAgents2 = options.agent ? [options.agent] : void 0;
|
|
11223
|
-
await reconcileTeamHooksForConfig(teamConfig, localConfig, { filterAgents: filterAgents2 });
|
|
11224
11324
|
log.success("teamai initialized (single-repo mode)!");
|
|
11225
11325
|
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.");
|
|
11226
11326
|
log.info("Add skills/rules later with `teamai push` \u2014 it opens a PR against your repo without touching your working tree.");
|
|
@@ -11493,11 +11593,12 @@ async function init(options) {
|
|
|
11493
11593
|
process.exit(1);
|
|
11494
11594
|
}
|
|
11495
11595
|
}
|
|
11496
|
-
|
|
11596
|
+
const requestedAgents = normalizeAgentList(options.agent);
|
|
11597
|
+
if (requestedAgents.length > 0) {
|
|
11497
11598
|
const existing = await loadLocalConfigForScope(scope, projectRoot);
|
|
11498
11599
|
const prev = existing?.enabledAgents ?? [];
|
|
11499
|
-
localConfig.enabledAgents = [.../* @__PURE__ */ new Set([...prev,
|
|
11500
|
-
localConfig.disabledAgents = (existing?.disabledAgents ?? []).filter((t) => t
|
|
11600
|
+
localConfig.enabledAgents = [.../* @__PURE__ */ new Set([...prev, ...requestedAgents])];
|
|
11601
|
+
localConfig.disabledAgents = (existing?.disabledAgents ?? []).filter((t) => !requestedAgents.includes(t));
|
|
11501
11602
|
}
|
|
11502
11603
|
await ensureDir(teamaiHome);
|
|
11503
11604
|
if (scope === "project") {
|
|
@@ -11538,7 +11639,7 @@ async function init(options) {
|
|
|
11538
11639
|
}
|
|
11539
11640
|
const reloadedTeamConfig = await loadTeamConfig(localPath);
|
|
11540
11641
|
if (reloadedTeamConfig) {
|
|
11541
|
-
const filterAgents2 =
|
|
11642
|
+
const filterAgents2 = requestedAgents.length > 0 ? requestedAgents : void 0;
|
|
11542
11643
|
await reconcileTeamHooksForConfig(reloadedTeamConfig, localConfig, { filterAgents: filterAgents2 });
|
|
11543
11644
|
}
|
|
11544
11645
|
log.success("teamai initialized successfully!");
|
|
@@ -11559,6 +11660,7 @@ var init_init = __esm({
|
|
|
11559
11660
|
init_types();
|
|
11560
11661
|
init_roles();
|
|
11561
11662
|
init_prompt();
|
|
11663
|
+
init_known_agents();
|
|
11562
11664
|
}
|
|
11563
11665
|
});
|
|
11564
11666
|
|
|
@@ -30816,7 +30918,7 @@ program.name("teamai").description("TeamAI \u2014 The team harness for AI agents
|
|
|
30816
30918
|
const opts = thisCommand.opts();
|
|
30817
30919
|
if (opts.verbose) setVerbose(true);
|
|
30818
30920
|
});
|
|
30819
|
-
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>", "
|
|
30921
|
+
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) => {
|
|
30820
30922
|
const globalOpts = program.opts();
|
|
30821
30923
|
const { init: init2 } = await Promise.resolve().then(() => (init_init(), init_exports));
|
|
30822
30924
|
await init2({ ...globalOpts, ...cmdOpts, repoPositional: repoArg });
|