Introduction
"An AI agent's capabilities shouldn't be trapped in one person's chat history — they should become a shared asset for the whole team."
This is the 187th article in the "One Open Source Project a Day" series. Today's project is TeamAI-CLI.
When everyone on a team is using Claude Code, Cursor, or Codex to write code, a hidden problem starts building up: everyone is independently "training" their own AI. One engineer spends half a day figuring out the right prompting approach to get Claude Code to correctly understand the project's architecture; another hits the exact same wall with no idea it's already been solved, and has to work through it from scratch. Skills, Rules, and CLAUDE.md configs scattered across the team never converge into anything shared or synchronized.
That's exactly the problem TeamAI-CLI addresses. It's not another AI coding assistant — the project's own documentation lists Claude Code, Codex, and Cursor as tools it's compatible with, not competitors. It's a meta-management layer that sits on top of the AI tools your team already uses, responsible for syncing skills, rules, and knowledge bases across members, and for turning individual experience gained while using AI into a shared team asset.
4.8k Stars, MIT License, built in TypeScript.
What You Will Learn
- TeamAI-CLI's three-layer product architecture: Team Execution / Team Context / Team Improvement
- The push → MR → review-and-merge → SessionStart-hook-sync distribution flow
- The friction-signal-driven mechanism for automatically capturing experience
- How the codebase knowledge graph is built (tree-sitter AST + regex heuristics)
- Its relationship to Claude Code, Codex, and similar tools: not a replacement, but a "team layer"
Prerequisites
- Some experience using AI coding tools like Claude Code, Cursor, or Codex
- Familiarity with Git workflows (branches, Merge Requests)
- Optional: basic understanding of MCP (Model Context Protocol)
Project Background
What It Is
TeamAI's official positioning is "the shared foundation for how your team works, learns, and improves with AI." The core idea, in one sentence: turn individual AI capabilities into shared team capabilities — across agents, machines, and team members.
Team and Background
- Organization: Tencent
- License: MIT License
- Primary language: TypeScript
-
Distribution: global npm install (
teamai-cli)
Project Stats
- ⭐ GitHub Stars: 4,800+
- 🍴 Forks: 340+
- 👀 Watchers: 17
- 📄 License: MIT
- 🔧 Open Issues: 33, Open PRs: 14 (actively maintained)
What It Does
The Problem It Solves
A team without TeamAI:
One engineer built a perfect set of project rules in Claude Code ← lives only on their machine
Another spent three days figuring out how to get the AI to understand the architecture ← that lesson never spreads
Someone's CLAUDE.md and team conventions went stale long ago ← nobody keeps them in sync
↑ Everyone's AI capability stays siloed — the team's collective ability never compounds
TeamAI's approach:
A unified team resource repository (Skills/Rules/Docs/Agents/Hooks/MCP)
↓ teamai push (share) → MR review → merge
↓ SessionStart hook auto-triggers teamai pull (sync)
Every team member's local AI tools automatically get the latest team standards
↑ Individual experience → team asset — AI capability can be version-controlled,
reviewed, and distributed just like code
Use Cases
-
A tech lead standardizing AI tool conventions across the team
- Write project-specific coding standards and architecture constraints as Skills/Rules once, sync them to everyone
-
New members onboarding quickly into an existing AI collaboration setup
- After joining the team repo, local AI tools automatically pull the latest skills and context — no starting from scratch
-
Team members sharing personal experience
- Use
teamai contributeto share a hard-won debugging insight with the whole team in one command
- Use
-
Codebase knowledge accumulation for AI retrieval
- The knowledge graph feature lets AI automatically retrieve relevant code context and historical decisions before tackling a coding task
-
Visualizing team-wide AI usage
- Use
dashboardanddigestcommands to understand team-wide AI usage trends and activity
- Use
Quick Start
Option 1: Conversational install (let the AI set it up)
Paste this directly to Claude Code or any agent that supports Skills:
Install the teamai skill: https://github.com/Tencent/teamai-cli/tree/main/skills/teamai ,
load the teamai skill, then set up TeamAI for my team from scratch.
Option 2: Manual CLI install
# Admin: create the team's shared repository
npm install -g teamai-cli
teamai init https://github.com/yourorg/yourrepo
# Team member: join an existing team
cd /path/to/my-project
teamai init https://github.com/yourorg/yourrepo
# Or install at the user scope (applies across all projects)
teamai init https://github.com/yourorg/yourrepo --scope user
Core Features
1. A Three-Layer Product Architecture
| Layer | Positioning | Core Capabilities |
|---|---|---|
| Team Execution | "Make every agent work the team's way" | init/pull/push sync for Skills/Rules/Agents/Hooks/MCP/Env |
| Team Context (beta) | "Make every agent understand the team" | Knowledge recall, learnings, codebase knowledge graph, team wiki |
| Team Improvement (beta) | "Make every execution improve the team" | Friction-signal-driven experience sharing, session logs, weekly digest, usage dashboard |
2. A Git-Native Distribution Flow
teamai push → creates a branch + MR → reviewer approves and merges
↓
SessionStart hook auto-triggers teamai pull → synced to local AI tools
Supports GitHub, GitLab, GitCode, CNB, TGit, and private Git servers — essentially folding AI collaboration standards into the normal code review process.
3. Key Commands
| Command | Function |
|---|---|
teamai init |
Initialize: OAuth login, link repo, register member, inject hooks |
teamai pull / push
|
Pull/push team resources |
teamai status |
Show the diff between local state and the team repo |
teamai contribute |
Share session experience to the team repo |
teamai recall <query> |
Search the team knowledge base (BM25 + graph-augmented) |
teamai codebase --extract/--deep-enrich/--reconcile |
Codebase knowledge graph operations |
teamai digest / dashboard
|
Team usage stats and visualization |
teamai doctor |
Diagnose configuration issues |
4. A Broad Agent Compatibility Matrix
TeamAI-CLI explicitly claims compatibility with over a dozen AI coding tools, including Claude Code, Codex, Cursor, GitHub Copilot CLI, CodeBuddy, OpenCode, and Kiro. The documentation includes a detailed compatibility table showing which capabilities (skills/rules/docs/env/hooks/mcp) each tool supports.
A Deeper Look
Friction-Signal-Driven Experience Capture
The most interesting design in TeamAI-CLI's Team Improvement layer is its trigger logic: instead of requiring users to proactively log their experience, it monitors friction signals in a session to detect "something worth recording just happened."
Examples of friction signals:
"The user interrupted the AI twice"
"The AI retried the same failing tool call 8 times in a row"
↓
The system identifies unusual friction
↓
It prompts the user: "This debugging session looks like it has something
worth sharing — want to contribute it to the team?"
This is smarter than "asking employees to write weekly summaries of lessons learned" — most valuable debugging insights happen in the moment while solving a problem, and details fade fast in hindsight. Using interaction friction as the trigger captures experience while it's still fresh.
The Codebase Knowledge Graph: A Dual-Track Extraction Strategy
The codebase knowledge graph in the Team Context layer uses a dual-track strategy:
AST Track (precise, but costly)
Uses a tree-sitter WASM parser to parse code
↓ precisely extracts functions, classes, and dependency relationships
↓ suited to deep parsing of core modules
Heuristic Track (fast, but coarse-grained)
Scans code with regex heuristics
↓ quickly covers a broad range of files
↓ suited to fast indexing of peripheral code
Both tracks' results → written to the teamwiki/ directory → power the recall
command's BM25-based retrieval
This dual-track design reflects a practical trade-off: running tree-sitter-level precise AST parsing across an entire large codebase is expensive, while pure regex matching loses semantic relationships. Combining both — precise parsing for core modules, fast coverage for the periphery — is a pragmatic middle ground.
How It Relates to Claude Code and Codex
This is the point most likely to cause confusion about TeamAI-CLI, so it's worth clarifying directly:
Wrong framing: TeamAI-CLI competes with Claude Code, as another AI coding CLI
Correct framing: TeamAI-CLI sits on top of Claude Code/Codex/Cursor,
acting as a team-level distribution and knowledge management layer
Analogy:
Claude Code / Codex / Cursor ≈ the IDE on each person's machine
TeamAI-CLI ≈ the team's Git repo + code review process
(but for Skills/Rules/knowledge, not code)
It works by injecting hooks (like a SessionStart hook) and shared config files (CLAUDE.md, Skills directories, etc.) into already-installed AI tools. It doesn't provide reasoning capability itself — it orchestrates "who should use which rules, and when they get synced."
How It Compares to Similar Team Collaboration Tools
| Dimension | Manually Maintained CLAUDE.md | Cursor Rules (local) | TeamAI-CLI |
|---|---|---|---|
| Cross-agent compatibility | Depends on each tool's own implementation | Cursor only | ✅ A dozen+ tools |
| Team sync mechanism | Manual copy-paste / word of mouth | ❌ None | ✅ Git push/pull + MR review |
| Automatic experience capture | ❌ | ❌ | ✅ Friction-signal-driven |
| Codebase knowledge graph | ❌ | ❌ | ✅ AST + heuristic dual-track |
| Usage visualization | ❌ | ❌ | ✅ dashboard/digest |
| Version control and review | Manual | Local files, no review | ✅ Standard Git flow |
TeamAI-CLI's differentiation is treating "AI collaboration conventions" as a first-class citizen of standard software engineering process (version control, code review) — instead of leaving everyone to maintain their own local config files.
Project Links and Resources
Official Resources
- 🌟 GitHub: https://github.com/Tencent/teamai-cli
- 📦 npm package:
teamai-cli - 📄 License: MIT License
- 🐛 Issues: GitHub Issues
Related Resources
- tree-sitter — The parser framework behind TeamAI-CLI's codebase knowledge graph AST Track
- Model Context Protocol — The resource distribution standard involved in TeamAI-CLI's compatibility matrix
- Claude Code — One of the main AI coding agents TeamAI-CLI integrates with
Summary
Key Takeaways
- Not an AI coding assistant, but a team-level middleware layer: sits on top of Claude Code/Codex/Cursor, focused on syncing standards rather than generating code
- A three-layer architecture that builds progressively: Team Execution handles distribution, Team Context handles understanding, Team Improvement handles evolution
- A Git-native distribution flow: push → MR review → merge → hook-triggered sync — AI collaboration conventions follow standard software engineering process
- Friction-signal-driven experience capture: doesn't rely on manual summarization; interaction anomalies automatically trigger experience capture
- Compatible with a dozen+ agents: not locked to a single AI tool ecosystem, covering mainstream choices like Claude Code, Codex, and Cursor
Who This Is For
- Engineering team leads: want to standardize AI collaboration conventions across the team instead of letting everyone figure it out independently
- Mid-to-large engineering teams: members use different AI tools and need a neutral layer to keep standards in sync
- Teams that value knowledge management: want to systematically capture hard-won lessons and codebase knowledge instead of losing them to staff turnover
- Teams already using Claude Code/Cursor and similar tools: don't want to switch tools, just want the ones they already use to be smarter and more consistent
One-Line Verdict
TeamAI-CLI isn't trying to solve "how AI writes code" — it's trying to solve "how one person's AI experience becomes everyone's experience," which may be a more interesting direction than simply stacking on stronger models.
Check out PrimeSkills — a curated marketplace of AI agents and skills that have been validated in real-world, enterprise-grade workflows. No fluff, just what actually works.
Find more useful knowledge and interesting products on my Homepage
Top comments (0)