Skip to content

feat(init): default to project scope and accept positional repo - #256

Open
jeff-r2026 wants to merge 2 commits into
Tencent:mainfrom
jeff-r2026:feat/init-default-project-scope
Open

feat(init): default to project scope and accept positional repo#256
jeff-r2026 wants to merge 2 commits into
Tencent:mainfrom
jeff-r2026:feat/init-default-project-scope

Conversation

@jeff-r2026

Copy link
Copy Markdown
Collaborator

Summary

  • Closes feat(init): 默认改为项目级 scope,并支持 teamai init <repo> 位置参数 #250: teamai init without --scope now defaults to project (<cwd>/.teamai + <cwd>/.claude/...); restore previous behavior with --scope user.
  • Supports positional teamai init <repo>; --repo remains a permanent equivalent alias (conflict errors if both differ).
  • Stops locking local install location to remote teamai.yaml.scope (validateScopeMatch removed); new default teamai.yaml no longer writes scope:.
  • Adds E1 (cwd === $HOME realpath-aware fallback / block) and E2 (warn when not inside a git repo) guards; updates bilingual docs + CHANGELOG breaking note.

Test plan

  • npx vitest run src/__tests__/init-scope-default.test.ts src/__tests__/init.test.ts src/__tests__/scope.test.ts
  • npx tsc --noEmit + npm run build
  • Real CLI early-path checks: --help, conflicting positional/--repo, invalid scope, default project summary + tip, E1 fallback/block, --scope user, --repo alias
  • CI remote e2e: teamai init <repo> --force sandboxed case (needs TEAMAI_TEST_* / GitHub token)
  • Manual: after authenticated init, teamai status / teamai pull in the project directory
  • Manual: remote teamai.yaml with scope: user + local default project → init succeeds, local config is project

Made with Cursor

jeff-r2026 and others added 2 commits July 28, 2026 17:33
…ent#250)

Align init with project-first downstream commands: omit --scope installs
under <cwd>/.teamai, support `teamai init <repo>`, and stop locking local
install location to remote teamai.yaml.scope.

Co-authored-by: Cursor <cursoragent@cursor.com>
init now defaults to project scope (Tencent#250), so the HTTP-consumer E2E test
wrote config under cwd/.teamai instead of $HOME/.teamai and failed to read
it back. The test models a user-level HTTP read-only consumer (apikey and
config under $HOME), so pass scope:'user' explicitly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(init): 默认改为项目级 scope,并支持 teamai init <repo> 位置参数

1 participant