4 views
Tencent/teamai-cli
Make Every Team AI Native
TypeScript★ 3,929+841 that day#4 on trending
1.85%duplicated code · 1,205 of 65,306 lines
105clones in code
244code files of 567 scanned
7.57%duplicated over all files · 916 clones
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code.
Largest clones in the code
- 46 lines in 2 placestypescript251 tokens
287log.info('Initializing teamai (HTTP read-only consumer)...'); 288 289// Step 0: scope (same rules as git init — default project) 290let scope: Scope; 291let projectRoot: string | undefined; 292let explicit: boolean; 293let fallbackReason: string | undefined; 294try { 295 ({ scope, projectRoot, explicit, fallbackReason } = resolveInitScope( 296 options.scope,1002log.info('Initializing teamai...'); 1003 1004// Step 0: Resolve scope (default project; only explicit --scope user → ~/ ) 1005let scope: Scope; 1006let projectRoot: string | undefined; 1007let explicit: boolean; 1008let fallbackReason: string | undefined; 1009try { 1010 ({ scope, projectRoot, explicit, fallbackReason } = resolveInitScope( 1011 options.scope,First 10 of 46 lines, the second copy on the right.
- 13 lines in 4 placestypescript69 tokenssrc/wiki-engine/code-knowledge/extractors/java.ts:114–126src/wiki-engine/code-knowledge/extractors/python.ts:118–130src/wiki-engine/code-knowledge/extractors/rust.ts:131–143src/wiki-engine/code-knowledge/extractors/typescript.ts:95–107
114 return /(?:application|bootstrap|config)\.(?:properties|ya?ml)$/iu.test(relativePath); 115} 116 117function makeFact( 118 kind: CodeFactKind, 119 name: string, 120 file: string, 121 lineStart: number, 122 rawLine: string, 123 confidence: CodeFact["confidence"]First 10 of 13 lines.
- 9 lines in 4 placestypescript59 tokenssrc/providers/gitcode/gitcode-api.ts:217–225src/providers/gitcode/gitcode-api.ts:261–269src/providers/gitlab/gitlab-api.ts:255–263src/providers/gitlab/gitlab-api.ts:333–341
217const resp = await fetch(endpoint, { 218 method: 'POST', 219 headers: authHeaders(token), 220 body: JSON.stringify(body), 221 redirect: 'manual', 222}); 223if (!resp.ok) { 224 const errBody = await resp.text().catch(() => ''); 225 throw new Error(`Failed to create GitCode repo: ${resp.status} ${errBody}`);261const resp = await fetch(`${gitcodeApiBase()}/repos/${opts.repo}/pulls`, { 262 method: 'POST', 263 headers: authHeaders(token), 264 body: JSON.stringify(body), 265 redirect: 'manual', 266}); 267if (!resp.ok) { 268 const errBody = await resp.text().catch(() => ''); 269 throw new Error(`Failed to create GitCode PR: ${resp.status} ${errBody}`);
7 more
- 12 lines in 3 placestypescript88 tokens
- 12 lines in 3 placestypescript88 tokens
- 22 lines in 2 placestypescript171 tokens
- 14 lines in 2 placestypescript156 tokens
- 11 lines in 3 placestypescript75 tokens
- 15 lines in 2 placestypescript148 tokens
- 23 lines in 2 placestypescript148 tokens
Largest clones over all files, tests and data included
- 30 lines in 2 placesmarkdowndocs and examples1,935 tokens
69<table> 70 <thead> 71 <tr> 72 <th rowspan="2">Agent</th> 73 <th colspan="7">Team Execution</th> 74 <th colspan="3">Team Context (beta)</th> 75 <th colspan="3">Team Improvement (beta)</th> 76 </tr> 77 <tr> 78 <th>skills</th><th>rules</th><th>docs</th><th>env</th><th>agents</th><th>hooks</th><th>mcp</th>First 10 of 30 lines.
- 10 lines in 14 placestypescripttests55 tokenssrc/__tests__/agent-skills.test.ts:8–17src/__tests__/builtin-agents.test.ts:9–18src/__tests__/coauthor-reconcile.test.ts:8–17src/__tests__/gf-org.test.ts:10–19src/__tests__/git.test.ts:47–56and 9 more
8 info: vi.fn(), 9 success: vi.fn(), 10 warn: vi.fn(), 11 error: vi.fn(), 12 debug: vi.fn(), 13 dim: vi.fn(), 14 }, 15})); 16 17import {9 info: vi.fn(), 10 success: vi.fn(), 11 warn: vi.fn(), 12 error: vi.fn(), 13 debug: vi.fn(), 14 dim: vi.fn(), 15 }, 16})); 17 18import { deployBuiltinAgents, BUILTIN_AGENT_NAMES } from '../builtin-agents.js'; - 14 lines in 8 placestypescripttests96 tokenssrc/__tests__/agent-format.test.ts:1–14src/__tests__/agent-skills.test.ts:1–14src/__tests__/coauthor-reconcile.test.ts:1–14src/__tests__/pre-push-sync.test.ts:1–14src/__tests__/search-index-multi.test.ts:1–14and 3 more
1import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; 2import path from 'node:path'; 3import os from 'node:os'; 4import fse from 'fs-extra'; 5 6vi.mock('../utils/logger.js', () => ({ 7 log: { 8 info: vi.fn(), 9 success: vi.fn(), 10 warn: vi.fn(),First 10 of 14 lines.
- 37 lines in 4 placestypescripttests215 tokens
- 10 lines in 7 placestypescripttests93 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 231 | 63,911 | 105 | 1,205 | 1.89% |
| bash | 9 | 644 | 0 | 0 | 0% |
| python | 2 | 474 | 0 | 0 | 0% |
| perl | 1 | 174 | 0 | 0 | 0% |
| javascript | 1 | 103 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 474 | 124,129 | 892 | 10,194 | 8.21% |
| markdown | 31 | 9,845 | 8 | 123 | 1.25% |
| yaml | 10 | 815 | 6 | 85 | 10.43% |
| bash | 18 | 1,219 | 5 | 26 | 2.13% |
| markup | 3 | 55 | 3 | 31 | 56.36% |
| text | 19 | 1,149 | 2 | 20 | 1.74% |
| json | 8 | 514 | 0 | 0 | 0% |
| python | 2 | 474 | 0 | 0 | 0% |
| perl | 1 | 174 | 0 | 0 | 0% |
| javascript | 1 | 103 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Sep 11, 2026 | #4 | 3,929 (+841) | 567 | 138,477 | 916 | 7.57% | 1.85% | — | 7b8e95d |
| Sep 10, 2026 | #2 | 3,221 (+556) | 563 | 136,733 | 899 | 7.56% | 1.87% | — | 4068f6f |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.