feat(init): default to project scope and accept positional repo - #256
Open
jeff-r2026 wants to merge 2 commits into
Open
feat(init): default to project scope and accept positional repo#256jeff-r2026 wants to merge 2 commits into
jeff-r2026 wants to merge 2 commits into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
teamai init <repo>位置参数 #250:teamai initwithout--scopenow defaults to project (<cwd>/.teamai+<cwd>/.claude/...); restore previous behavior with--scope user.teamai init <repo>;--reporemains a permanent equivalent alias (conflict errors if both differ).teamai.yaml.scope(validateScopeMatchremoved); new defaultteamai.yamlno longer writesscope:.$HOMErealpath-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.tsnpx tsc --noEmit+npm run build--help, conflicting positional/--repo, invalid scope, default project summary + tip, E1 fallback/block,--scope user,--repoaliasteamai init <repo> --forcesandboxed case (needsTEAMAI_TEST_*/ GitHub token)teamai status/teamai pullin the project directoryteamai.yamlwithscope: user+ local default project → init succeeds, local config is projectMade with Cursor