Skip to content

feat(cli): optimize startup time#96

Merged
codeaholicguy merged 2 commits into
mainfrom
feature-cli-startup-performance
Jun 2, 2026
Merged

feat(cli): optimize startup time#96
codeaholicguy merged 2 commits into
mainfrom
feature-cli-startup-performance

Conversation

@codeaholicguy
Copy link
Copy Markdown
Owner

Summary

Optimize ai-devkit CLI startup by replacing eager command registration with a lightweight runtime and lazy command loading.

Changes

  • Add a startup benchmark script and CI gate for CLI startup/help paths.
  • Keep --version inline in cli.ts so it avoids loading runtime code.
  • Add cli-command-manifest.ts as the lightweight source of truth for top-level command metadata.
  • Add cli-runtime.ts for static root/top-level help rendering and lazy command execution.
  • Lazy-load Commander and only the selected command module for real command execution.

Verification

  • npm run build
  • npm test -w packages/cli
  • npm run test:e2e
  • npm run benchmark:startup -w packages/cli

@codeaholicguy codeaholicguy merged commit 2ffdb43 into main Jun 2, 2026
7 checks passed
@codeaholicguy codeaholicguy deleted the feature-cli-startup-performance branch June 2, 2026 10:12
codeaholicguy added a commit that referenced this pull request Jun 2, 2026
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.

1 participant