Tencent / teamai-cli
Tencent / teamai-cli
TeamAI — Make Every Team AI Native TeamAI — 让每个团队都成为 AI 原生团队
TeamAI manages your team’s skills, rules, MCP, and knowledge across Claude Code, Codex, CodeBuddy, WorkBuddy, OpenCode, Cursor, and other AI agents. TeamAI 能够跨 Claude Code、Codex、CodeBuddy、WorkBuddy、OpenCode、Cursor 以及其他 AI Agent,统一管理团队的技能(Skills)、规则(Rules)、MCP 和知识库。
Contributors
贡献者
Thanks to everyone who has contributed to TeamAI! Made with contrib.rocks. 感谢所有为 TeamAI 做出贡献的人!由 contrib.rocks 提供支持。
Quick Start
快速开始
Install 安装
npm install -g teamai-cli
Team admin / solo user 团队管理员 / 个人用户
Create a shared-experience repo on your git host (GitHub, GitLab, GitCode, CNB, TGit, or a private Git service), grant write access to team members, then run teamai init https://github.com/yourorg/yourrepo.
在你的 Git 托管平台(GitHub、GitLab、GitCode、CNB、TGit 或私有 Git 服务)上创建一个共享经验仓库,授予团队成员写入权限,然后运行 teamai init https://github.com/yourorg/yourrepo。
No team repo yet? Start from a template pre-loaded with production-ready skills, rules, and review agents. Browse the teamai-hub org, click “Use this template”, then teamai init against your new repo.
还没有团队仓库?可以从预装了生产级技能、规则和审查 Agent 的模板开始。浏览 teamai-hub 组织,点击“Use this template”,然后针对你的新仓库运行 teamai init。
Team members 团队成员
# Choose one, depending on where you want resources installed
# 选择一种方式,取决于你希望资源安装的位置
# Project-scope init (default, resources installed under the project directory)
# 项目级初始化(默认,资源安装在项目目录下)
cd /path/to/my-project
teamai init https://github.com/yourorg/yourrepo
# Or, user-scope init (resources installed under ~/)
# 或者,用户级初始化(资源安装在 ~/ 下)
teamai init https://github.com/yourorg/yourrepo --scope user
Once initialized, every AI session automatically pulls the latest skills / rules and other Harness updates published by admins — no manual sync needed. 初始化完成后,每次 AI 会话都会自动拉取管理员发布的最新技能、规则以及其他 Harness 更新——无需手动同步。
Full usage guide: docs/usage-guide.md (中文版) — covers everything from team creation to day-to-day use. 完整使用指南:docs/usage-guide.md(中文版)——涵盖了从团队创建到日常使用的所有内容。
Product architecture
产品架构
Team Execution × Team Context (beta) × Team Improvement (beta): 团队执行 × 团队上下文(测试版) × 团队改进(测试版):
- Team Execution: Make every agent work the team’s way (init / pull / push, skills, rules, agents, hooks, MCP, env). 团队执行:让每个 Agent 都按照团队的方式工作(init / pull / push,技能,规则,Agent,钩子,MCP,环境变量)。
- Team Context (beta): Make every agent understand the team (recall, learnings, codebase graph, teamwiki…). 团队上下文(测试版):让每个 Agent 都理解团队(召回、学习心得、代码库图谱、团队维基等)。
- Team Improvement (beta): Make every execution improve the team (friction-based share-learnings, sessions, digest, dashboard…). 团队改进(测试版):让每一次执行都提升团队水平(基于摩擦力的经验分享、会话、摘要、仪表盘等)。
Distribution Controls
分发控制
Team-wide settings an admin configures once and delivers to every member on teamai pull:
管理员只需配置一次,即可通过 teamai pull 分发给所有成员的团队级设置:
| Capability | Command | What it does |
|---|---|---|
| Roles | teamai roles | Define role → namespace mappings so each member syncs only the skills for their role. |
| Tags | teamai tags | Tag skills / rules so members subscribe to just the tags they need. |
| Sources | teamai source | Subscribe to additional skill repos — other teams’ public repos, or shared/public repos within your own org. |
| 功能 | 命令 | 作用 |
|---|---|---|
| 角色 (Roles) | teamai roles | 定义角色到命名空间的映射,确保每位成员仅同步其角色所需的技能。 |
| 标签 (Tags) | teamai tags | 为技能/规则打标签,让成员仅订阅他们需要的标签。 |
| 来源 (Sources) | teamai source | 订阅额外的技能仓库——例如其他团队的公开仓库,或组织内部的共享/公开仓库。 |
Team Execution
团队执行
One Team. One Harness. Every Agent. 一个团队。一套工具。所有 Agent。
TeamAI keeps skills, rules, docs, and hooks in a shared git repo and distributes them to every member’s local AI tools through a “push → review & merge → pull” flow. TeamAI 将技能、规则、文档和钩子保存在一个共享的 Git 仓库中,并通过“推送 → 审查与合并 → 拉取”的流程分发到每位成员的本地 AI 工具中。
How It Works 工作原理
teamai push → create branch + MR → reviewer approves + merges ↓
teamai push → 创建分支 + 合并请求 → 审查者批准并合并 ↓
SessionStart hook → teamai pull → synced to local AI tools
SessionStart 钩子 → teamai pull → 同步到本地 AI 工具
Team Context (beta)
团队上下文(测试版)
Every agent understands how the team works. Beyond distributing the Harness, TeamAI organizes accumulated team experience and code structure into a searchable knowledge base that the AI recalls automatically when needed. 让每个 Agent 都了解团队的工作方式。除了分发工具集,TeamAI 还将积累的团队经验和代码结构组织成可搜索的知识库,AI 会在需要时自动召回相关信息。
Automatic Experience Sharing 自动经验分享
When a session ends, the Stop hook scores it by “friction” — signals that the session hit something worth remembering: you interrupted or corrected the AI, denied a tool call, or the AI had to retry failing tools. 当会话结束时,Stop 钩子会根据“摩擦力”进行评分——即会话中出现了值得记录的情况:你打断或纠正了 AI、拒绝了工具调用,或者 AI 不得不重试失败的工具。
If the score is high enough, the AI suggests: 如果分数足够高,AI 会建议:
[teamai] This session may contain a problem worth documenting… Consider running
/teamai-share-learningsto summarize what you learned and share it with your team. [teamai] 本次会话可能包含值得记录的问题……考虑运行/teamai-share-learnings来总结你的学习心得并与团队分享。
The /teamai-share-learnings skill summarizes the session and pushes a learning document directly to the team repo.
/teamai-share-learnings 技能会总结会话内容,并将学习文档直接推送到团队仓库。