The Problem

Teams using AI coding agents face fragmented context, inconsistent rules, and no standardized skill set across sessions. Each agent session starts from scratch, re-inventing patterns, and there's no reliable way to push team-wide conventions, MCP configs, or knowledge bases to every agent type Claude Code, Codex, Cursor, or custom internal agents use.

What This Does

teamai-cli is a command-line tool that manages team-wide AI configuration: skills, rules, MCP, environment variables, and codebase graphs. It operates on a shared git repo where admins publish updates that all team members automatically pull.

The codebase is TypeScript-heavy (443 of 497 files) with a clear src/ hierarchy. Entry points live in src/index.ts and src/maintenance/index.ts — the former is the primary CLI dispatch, the latter handles scheduled housekeeping. Provider modules under src/providers/ handle git host integration: git/index.ts, gitcode/index.ts, and cnb/index.ts connect to GitHub, GitCode, and CNB respectively. A network of hook handlers under src/hooks/ dispatches events (pre-push, post-commit, etc.) and reconciles scope across members. Skills and rules are defined in skills/team-wiki-codebase/ as markdown SKILL.md files processed by scripts like scan_repo.py and validate_kb.py. Tests are extensive: 225 test files under src/__tests__, covering agents, providers, hooks, CI extraction, and e2e flows against live hosts.

How It Is Wired

Execution starts at src/index.ts, which parses CLI args and dispatches to subcommands (init, pull, push, maintenance). init (referenced in AGENTS.md and the README) clones a team repo and runs teamai init https://github.com/yourorg/yourrepo to scaffold skills, rules, and MCP under the project or user scope. pull fetches the latest Harness updates from the shared git repo and applies them to the local agent config — the actual pull logic routes through provider modules (src/providers/git/index.ts, src/providers/gitcode/index.ts, src/providers/cnb/index.ts) depending on the git host. push similarly uploads local changes to the team repo. Maintenance tasks under src/maintenance/index.ts handle pruning, deduplication, and graph integrity.

The call graph fans out from src/index.ts → provider-specific fetch → hook dispatch → skill/rules apply. The widest blast radius is in the provider layer: each provider (git, gitcode, cnb) implements a common interface but has its own fetch/auth logic, meaning adding a new git host requires implementing all three concern areas rather than one extension point. Hook handlers in src/hooks/ fan out to many small functions — a change to hook dispatch can affect pre-push, post-commit, and scope isolation simultaneously.

What this code touches outside itself: it writes to the local filesystem under ~/.teamai/ or the project .teamai/ dir (depending on --scope), pushes/pulls from the configured git remote via the provider, and updates agent-specific config files (Claude Code settings.json, Codex .codex/, Cursor .cursor/, etc.). It does not install or run agents itself; it emits config that agents pick up.

How To Use It

Install:

npm install -g teamai-cli

Team admin setup:

# Create a shared-experience repo on your git host, grant write access to team members
teamai init https://github.com/yourorg/yourrepo

Or start from a template: browse teamai-hub, click Use this template, then teamai init against your new repo.

Team members (project-scope, default):

cd /path/to/my-project
teamai init https://github.com/yourorg/yourrepo

User-scope install:

teamai init https://github.com/yourorg/yourrepo --scope user

After init, every AI session automatically pulls the latest skills/rules — no manual sync needed. Full usage guide: docs/usage-guide.md.

Real-World Use

A mid-size engineering team standardizes on Claude Code for implementation and Cursor for review. The admin creates a team repo with skills/team-wiki-codebase/SKILL.md defining code style, security heuristics, and commit message format. They add MCP configs for code review and rules for PR template enforcement. All team members run teamai init once. Going forward, whenever the admin updates the skill or MCP config and pushes, every AI session automatically reflects the change — no per-agent migration scripts, no wiki out-of-sync. The team also uses teamai pull in CI to validate that PRs respect the team's rule set before merge.

Code Health & Issues

Analysis of the structure found no structural red flags: tests/CI/license/lockfile are present where expected. The repo has 225 test files under src/__tests__ and passing CI (GitHub Actions workflows in .github/workflows/ci.yml and .github/workflows/release.yml). License is MIT (LICENSE). Config files package.json and tsconfig.json are present. A .versionrc file suggests version tooling is in use.

SDLC observations from the directory structure:

  • Skills and rules live as markdown files under skills/team-wiki-codebase/, processed by scripts (scan_repo.py, validate_kb.py) — the pipeline from markdown to agent config is defined but not automatically wired into CI beyond the test suite.
  • Provider abstraction exists (git, gitcode, cnb) but adding a new git host requires implementing host-specific fetch logic in each provider rather than a single plugin point.
  • Hook dispatch in src/hooks/ is expansive (200+ test files) — coverage is high, but the breadth of hook types means a change to the dispatch layer has wide reach.

The Bottom Line

This is a functional, well-tested CLI for team-wide AI agent harmonization. It works best when a team already uses a shared git repo and wants to synchronize skills, rules, and MCP across multiple agent types. The TypeScript codebase is extensive and test-covered, but the provider layer is the main extension point — adding new git hosts or agent integrations requires touching multiple files rather than a single plugin. Teams that standardize on a small set of agents and have a dedicated admin to maintain the team repo will see the most value; teams with diverse, dynamically changing agent landscapes may find the initial setup overhead higher than per-agent tooling.