refactor(cli): move cache under import command#71
Merged
Conversation
added 2 commits
June 30, 2026 14:26
…e-gc) Cache only serves import's shallow clone repos. Move it under the import command for better discoverability: teamai import --cache-status # show cache disk usage teamai import --cache-gc # garbage-collect stale entries The old `teamai cache` command is preserved as a hidden alias for backward compatibility.
…ternal options - Remove top-level `teamai cache` command; functionality now accessible via `teamai import --cache-status` / `--cache-gc` - Hide low-frequency codebase options from --help: --extract, --incremental, --project, --max-files, --upgrade-wiki (still functional, just not shown to avoid noise) - `teamai codebase` now shows only its core: --lint / --fix / --json
jeff-r2026
added a commit
that referenced
this pull request
Jun 30, 2026
Post-merge quality cleanups on the HTTP team-repo + status-reporter code (PRs #68/#70/#71), surfaced by /simplify. No behavior change. - path-safety: extract assertWithinRoot() and replace the hand-rolled containment check duplicated in source-http.ts and skill-command.ts. It compares resolved-but-not-symlink-followed paths, so it stays correct for not-yet-created targets and under symlinked roots (e.g. macOS /var -> /private/var) — unlike assertSafePath, which would false-reject legitimate writes there. - status-report: drop the no-op `await import('fs-extra')` in flushQueue (fs-extra is already loaded via utils/fs) and use the project remove/writeFile helpers; parallelize scanReportableSkills with Promise.all instead of awaiting per-skill reads in a loop. - team-push: reuse readJson/writeJson for the reported-interventions snapshot instead of hand-rolled JSON.parse/stringify. Verified: `tsc --noEmit` clean; full unit suite green (1662 passed). 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
Simplify the CLI command surface for better discoverability:
1. Move
cacheunderimportCache only serves import's shallow clone repos. Remove the standalone top-level command; functionality now accessible as import options.
Before:
After:
2. Hide internal
codebaseoptionsteamai codebasehad 5 options that are either redundant withimport --from-repoor one-time migration utilities. Hide them from--help(still functional for advanced users):--extract— redundant withteamai import --from-repo .--incremental,--project,--max-files— extract sub-options--upgrade-wiki— one-time migration tool, no longer needed after migrationteamai codebase --helpnow shows only its core purpose:Test plan
npx tsc --noEmit— zero errorsnpx vitest run— 1587 passedteamai import --helpshows--cache-statusand--cache-gcteamai --helpno longer showscacheteamai codebase --helponly shows--lint / --fix / --json