feat(cli): add initial CLI implementation with argument parsing and prompt handling
Some checks failed
CI — Test & Build / Test & Build (pull_request) Has been cancelled
Preview — PR Build Check / PR Preview Build (pull_request) Has been cancelled

- Created package.json and package-lock.json for CLI package.
- Implemented argument parsing in args.ts to handle various flags and commands.
- Developed main CLI logic in cli.ts to execute commands and handle errors.
- Added configuration loading from a JSON file in config.ts, with environment variable support.
- Implemented prompt resolution and provider interaction in prompt.ts.
- Added usage documentation for the CLI.
- Configured TypeScript settings in tsconfig.json for the CLI package.
- Updated README in vscode package to reflect the new CLI functionality.
- Refactored root tsconfig.json to streamline project structure.
This commit is contained in:
john kevin asprec
2026-08-13 19:19:42 +08:00
parent d63d698b57
commit 2c00d2e431
37 changed files with 9303 additions and 166 deletions

View File

@@ -30,24 +30,29 @@ jobs:
- name: Install dependencies
run: npm ci
working-directory: packages/chrome
# Same gates as CI — a release must never check less than a push.
- name: Prepare WXT types
run: npx wxt prepare
working-directory: packages/chrome
- name: Type check
run: npm run typecheck
working-directory: packages/chrome
- name: Run tests
run: npm test -- --run
working-directory: packages/chrome
- name: Build extension
run: npm run build
working-directory: packages/chrome
- name: Package as ZIP
run: |
VERSION=${{ gitea.ref_name || 'manual' }}
ZIPFILE="$(pwd)/lexai-chrome-mv3-${VERSION}.zip"
ZIPFILE="$(cd ../.. && pwd)/lexai-chrome-mv3-${VERSION}.zip"
# Verify manifest exists and check version
node -e "console.log('Manifest version:', require('./.output/chrome-mv3/manifest.json').version)"
# Zip from inside the chrome-mv3 dir so manifest.json is at root
@@ -55,6 +60,7 @@ jobs:
echo "ZIP_FILE=${ZIPFILE}" >> $GITHUB_ENV
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "✅ Packaged: lexai-chrome-mv3-${VERSION}.zip"
working-directory: packages/chrome
- name: Get Chrome Web Store OAuth2 Token