Index of every page on this site: llms.txt
All skills
tencent avatar

/setup

@df433c6
by tencenttencent/teamai-cli5.9k stars
531
Run it yourself

TeamAI day 0 and repo lifecycle: create a team repo as admin, join an existing team as a member, manage members, roles, MCP and env, and uninstall. Loaded on demand by the teamai discovery stub.

  • 6 files
  • 74.9 KB
  • Updated last month
  • GitHub
Use this Skill: https://skilld.dev/gh/tencent/teamai-cli/setup

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesjoin-member.md

≈2.8k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Scenario: Member — join an existing team

Goal: the user joins a team that already has a TeamAI repo. You need the team repo's full URL (the admin shares it). Do NOT create a new repo.

Run the commands yourself. Only stop to ask when a step says "ASK".

Step 0 — Get the repo URL (REQUIRED — stop if missing)

A member joins an existing repo. You need its full URL from the admin.

If the user has not given a full URL, ask for it: "Paste the full team repo URL your admin gave you (e.g. https://github.com/your-org/your-repo)." Do not proceed with owner/repo short form.

If the user does not have the URL, STOP here. Do not guess a URL, do not probe platforms, and — most importantly — do not create a new repo. Tell the user: "Ask your team's TeamAI admin for the repository URL, then come back and paste it here." A member without a repo URL cannot continue; creating one would fork the team into a second, empty repo. (Setting up a brand-new team repo is the admin flow — see {SKILL_DIR}/references/setup-admin.md — not this one.)

Step 1 — Install and verify

npm install -g teamai-cli
teamai --version

If it fails, Node.js ≥ 20 is missing — have them install Node 20+ first.

Step 2 — Choose scope (ASK)

  • This project only (default): cd into the project directory first. Inside Git, init uses the repository root. If it already has a workspace config, re-run init at that root; a plain subfolder cannot replace it, even with --force. Nested repositories and linked worktrees keep their own roots.
  • Whole machine: add --scope user.
  • A folder holding several repos (a workspace): set up each repo from inside it, then run the same init in the folder. The folder also receives what each repo inside selects; pass --project there only for a project the folder itself belongs to.

Step 3 — Log in to the same platform as the URL

Match the login to the URL's host (do NOT create a second repo):

  • git.woa.com/... (Tencent TGit) → after telling the user this installs the gf binary and stores a credential, and getting their OK, you may run the gf install and gf … auth login for them (or show the commands if they prefer to run them). Follow {SKILL_DIR}/references/provider-tgit.md ("Log in"); the user's only action is approving the login URL in their browser / iOA. No GITLAB_URL needed. (No headless shortcut: TGIT_TOKEN is REST-API-only and cannot clone, so the login has to be run once on the machine.)
  • cnb.cool/... → install the CNB CLI, then authorize, in this order:
    1. npm install -g @cnbcool/cnb-cli
    2. cnb login — have the user approve it in the browser (OAuth2 device flow); wait until they confirm before continuing.
  • github.com/... → you run the login yourself; never hand the user a command. Log them in before teamai init: gh auth login --web --git-protocol https. Relay the one-time code and the https://github.com/login/device URL it prints, and ask the user to open that URL and approve — that approval is their only action. Confirm with gh auth status before continuing. (Headless/CI only: pre-set GITHUB_TOKEN — a token with repo scope — instead.)
  • gitlab.com/... or self-hosted GitLab → set GITLAB_TOKEN (and GITLAB_URL for self-hosted, with api scope). Exception: a member who only syncs and never needs the CLI to open merge requests (typical for non-developers) can skip the token: add --provider git to the init in Step 4. Git then uses their existing SSH key or credential helper, and push leaves the MR for them to open on the web.
  • Other Git hosts, including Azure Repos → use the existing Git credential helper or SSH key. Keep the clone path as provided, including whether it ends in .git; do not embed HTTPS credentials in the URL.

If they have no account on that platform, they register there, then ask the admin to add them to the repo.

Step 4 — Initialize with the URL (you run it)

Before running init, ask whether the user wants to activate any logical projects this team repo declares. If init lists Available projects, show the names/IDs and ask which belong to this setup; enter the corresponding comma-separated numbers. Press Enter for none only when the user explicitly chooses no project. If the IDs are already known, pass --project id1,id2 to skip the picker. For a non-interactive run, ask first and pass --project: without it, init keeps projects: [] and prints a teamai projects set <id> follow-up instead of waiting for a choice.

# this project only (run from inside the project)
teamai init https://<platform>/<org>/<repo>

# or whole machine
teamai init https://<platform>/<org>/<repo> --scope user

Set up all their AI tools by default (global rule 9). Don't add --agent to restrict the install unless the user said to. Omitting it gives a picker — select every AI tool already installed. Afterwards, tell the user (in their language) which agents will auto-sync TeamAI, including any required hook-trust step, and note any detected tool that was skipped and why.

Read-only / restricted environments (no Git access): some sandboxed hosts cannot use Git. If the admin provides an HTTP endpoint + API key instead, use:

teamai init --http https://your-team-host/api --token <api-key>

An agent access token (sk-) works for one agent only: pass that agent with --agent <tool> (see teamai init --help).

This is a read-only consumer mode — push / contribute are not available, but skills and rules still sync, in each workspace where teamai bind-project ran once (run it in the user's project). Binding a ClawPro project is optional: teamai bind-project --skip enrolls the workspace without one and stops the prompt. A worktree inherits its main checkout's choice, so run it once per project, not per worktree.

Claude Code or Codex kept in a different directory (CLAUDE_CONFIG_DIR, CODEX_HOME): init records that directory (as toolRoots.claude / toolRoots.codex in the local config) and syncs every path of that tool there, so run init from a shell that has the variable exported. A directory outside the home directory is recorded only for that tool's sessions: teamai reads them there and keeps syncing the tool's other files to its default root, as init says. Re-running init after changing it moves the install (the old root's hooks and managed MCP servers are removed, and for Claude Code its delivered model credentials; its skills and rules are left and named in the output). To end the relocation, run init once with the variable set but blank: CLAUDE_CONFIG_DIR= teamai init … or CODEX_HOME= teamai init ….

Step 5 — Verify with doctor

teamai doctor
teamai hooks list      # per-tool: which AI tools actually got the hooks

Fix anything doctor reports. Don't trust the "Hooks injected into all AI tool settings" message alone — it prints even for tools where nothing was written; teamai doctor / teamai hooks list show the real per-tool status. If it flags hook problems, load the troubleshooting reference ("$(teamai skill path core)/references/troubleshooting.md"), section "Which tools actually get hooks".

Step 6 — Confirm the skills actually arrived

teamai init does not copy team skills, rules or MCP. They arrive on the next session start when its hook is trusted and enabled, or when you run teamai pull. A workspace-scope init run without a terminal and without --agent creates no tool directory; that directory appears when the user first opens that tool in the project, and that session start pulls. To confirm after a session start or a pull:

teamai list        # see the team skills / rules / docs you now have

Then explain how this tool syncs. For JoyCode Desktop, the user must review and trust each TeamAI hook in Settings > Hooks before it can run. Until the hooks are trusted and enabled, run teamai pull at the start of each session. Other tools with an enabled session-start hook auto-sync on a new session; for tools without one (e.g. Gemini CLI), run teamai pull by hand.

Reassure them about privacy (in their language): "TeamAI does not send any of your session data to third parties. The only place anything is reported is the team repo you just joined — usage counts and knowledge you choose to contribute, never your raw conversation content." (Team reporting is opt-in and carries counts + tool names only, on a separate branch of that same repo.)

Agent-specific note

If this conversation is running in ChatGPT App or WorkBuddy, the hooks that drive auto-sync need an extra manual step — load the troubleshooting reference ("$(teamai skill path core)/references/troubleshooting.md"), section "Agent-specific caveats" and walk the user through it before finishing.

If something is denied

Permission errors (can't clone, can't read) usually mean the admin has not added this user to the repo yet. Have them copy the exact error message to their admin.

Wrap up in the user's language, and how to leave

Summarize the outcome in the user's own language (global rule 1). Cover:

  1. They're done — sync is automatic. From now on, opening a session in this AI tool keeps their team skills up to date; no commands needed.
  2. Sharing a session learning is automatic — no command to remember. When a session produced something worth sharing, TeamAI prompts them on its own (at the end of the session) and offers the teamai-share-learnings workflow, whose learning step runs the share skill (teamai skill get share) with them to summarize and contribute it. They do not invoke /teamai for this. (This prompt only appears when recall is on — it is off by default; the admin turns it on in teamai.yaml (sharing.recall.enabled), a member with teamai recall enable — and the admin has not switched the reminder off in teamai.yaml. It also stays silent while their teamai config cannot be loaded; teamai skill get share then names the file and the error.)
  3. They can also contribute a skill — just ask in plain language. A member does not need to be an admin to publish a skill. They tell TeamAI something like "share this xxx skill with my team", in their own language, and you run the publish for them (see "$(teamai skill path core)/references/contribute-member.md"; it needs no recall).
  4. How to leave — via the skill, not raw commands. They can remove TeamAI any time by re-invoking the skill; you'll run it for them: /teamai Uninstall TeamAI (in their language; the /teamai prefix stays as-is). One line, in their language: "This only removes things from your machine; the team repo stays — rejoin any time with /teamai and the repo URL."

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at df433c6. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated last month

README badge

README badge for tencent/teamai-cli/setup