mirror of
https://github.com/iflytek/skillhub.git
synced 2026-08-28 11:25:00 +00:00
Implement complete CLI tool for SkillHub with 12 commands, 7 backend API endpoints, and comprehensive documentation. CLI Commands: - help, version: Basic information - login, logout, whoami: Authentication management - search: Discover published skills - install: Install skills to agent directories (14 Tier 1 agents supported) - list, remove, doctor: Local skill management - publish: Publish skill packages - update: Self-update mechanism Backend API: - Add /api/cli/v1 endpoints for auth, search, resolve, download, delete, publish - Implement CliAuthController and CliSkillController - Add security policies for CLI routes - Full test coverage (19 backend tests) CLI Implementation: - TypeScript with strict mode, Bun runtime - Pure JS zip handling (fflate) for cross-platform compatibility - 15 agent profiles (14 Tier 1 + generic fallback) - Secure token storage (0600 permissions) - Path safety validation for remove operations - Comprehensive error handling (404/403/network distinction) - 41 unit and integration tests Documentation: - CLI user guide (Chinese and English) - README updates with quick start - GitHub Actions workflow for cross-platform CI Quality: - lint: 0 errors - typecheck: pass - test: 41/41 pass - build: 0.30 MB (target=node for npm/npx compatibility)
39 lines
857 B
JSON
39 lines
857 B
JSON
{
|
|
"name": "skillhub",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"packageManager": "bun@1.3.13",
|
|
"bin": {
|
|
"skillhub": "./dist/index.js"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"scripts": {
|
|
"build": "bun build src/index.ts --target=node --outfile=dist/index.js",
|
|
"test": "bun test",
|
|
"typecheck": "tsc --noEmit",
|
|
"lint": "eslint src test --ext .ts"
|
|
},
|
|
"dependencies": {
|
|
"cac": "^6.7.14",
|
|
"fflate": "^0.8.2",
|
|
"prompts": "^2.4.2",
|
|
"semver": "^7.6.3",
|
|
"zod": "^3.24.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bun": "^1.3.13",
|
|
"@types/prompts": "^2.4.9",
|
|
"@types/semver": "^7.5.8",
|
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
"@typescript-eslint/parser": "^7.18.0",
|
|
"eslint": "^8.57.1",
|
|
"typescript": "^5.7.0"
|
|
},
|
|
"engines": {
|
|
"node": ">=18.0.0"
|
|
}
|
|
}
|