@iceywu/cli
v0.0.11
Published
提供多个情景下的项目模板,快捷搭建项目🎉
Downloads
159
Readme
@iceywu/cli
TypeScript CLI package for project scaffolding and template discovery.
The legacy icey-cli source has been re-architected in this workspace package.
Current package goals:
- keep
@iceywu/utilsas a local workspace dependency - publish the scoped package while preserving
iceyandicey-clicommand aliases - use TypeScript for command, service, and prompt boundaries
- use
@clack/promptsfor interaction andexecafor subprocess execution - keep the current command behavior stable while improving maintainability
- keep the source tree fully in TypeScript and fetch template data dynamically
Template discovery now uses this priority order:
- GitHub API
- mirror APIs from
ICEY_CLI_TEMPLATE_API_MIRRORS(comma-separated URLs, supports名称=URL) - local runtime cache written after a successful fetch
Optional runtime configuration:
ICEY_CLI_TEMPLATE_API_MIRRORS=杭州镜像=https://mirror-a.example.com/repos,备用镜像=https://mirror-b.example.com/reposICEY_CLI_TEMPLATE_CACHE_TTL_MS=43200000to control cache expiration in milliseconds
Structure
src/app.ts: CLI composition and command registrationsrc/commands/*: user-facing command handlerssrc/services/*: GitHub, git, filesystem, and npm interactionssrc/ui/*: prompt wrappers and terminal feedbacksrc/lib/*: validation, formatting, package metadata, and errorssrc/types/*: shared TypeScript models
