- Split browser.ts (700 lines) into src/browser/ module (page, mcp, errors, discover, tabs, index) - Add unified error handling: CliError base class + logger module - Enable TypeScript strict mode, fix 12 type errors - Extract inline build scripts to scripts/clean-yaml.cjs and copy-yaml.cjs - All 178 unit tests pass, build produces 83 entries across 19 sites
1.4 KiB
description
| description |
|---|
| Migrate commands from an external CLI project into opencli adapters |
// turbo-all
Steps
- Clone the source CLI project for analysis:
git clone <source_repo_url> /tmp/<source-cli>
-
Analyze source project: list all commands, auth method, API endpoints, and output fields.
-
Check existing opencli adapters for the target site:
ls src/clis/<site>/
opencli list | grep <site>
-
Generate a comparison matrix table (source commands vs opencli existing). Mark each as: ✅ New / ✅ Enhance / ❌ Skip. Ask user to confirm which commands to migrate.
-
Implement YAML Read adapters first (highest ROI, 10-20 lines each). Place files in
src/clis/<site>/<name>.yaml. -
Implement TS Read adapters for complex cases (GraphQL, pagination, signing). Place files in
src/clis/<site>/<name>.ts. -
Implement TS Write adapters using
Strategy.UIorStrategy.COOKIE. Place files insrc/clis/<site>/<name>.ts. -
Verify build:
npx tsc --noEmit
- Verify all commands are registered:
opencli list | grep <site>
- Run each new command to verify it works:
opencli <site> <command> --limit 3 -f json
-
Update README.md with new command examples in the appropriate platform section.
-
Update SKILL.md Commands Reference with new commands.
-
Commit and push:
git add -A
git commit -m "feat(<site>): migrate <N> commands from <source-cli>"
git push