arch-tsdown-cli
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesearch-tsdown-cli is a TypeScript CLI package starter (based on hairyf/starter-cli) that uses tsdown for building. It provides a minimal, opinionated setup: dual surface (library + bin), ESM-only output, automatic generation, dev bin via tsx, pnpm, Vitest, ESLint, and optional npm Trusted Publisher for CI-based releases.
.d.tsThe skill is based on starter-cli (arch-tsdown-cli source), generated at 2026-01-30.
Recommended practices:
- Use dev bin (tsx) locally and prod bin (dist) in publishConfig
- Build pure ESM; enable and keep
dtsfor dependenciesexternal - Use npm Trusted Publisher for releases
arch-tsdown-cli是一个基于tsdown构建的TypeScript CLI包启动模板(基于hairyf/starter-cli)。它提供了一个极简且带有明确约定的配置:双入口(库 + 可执行文件)、仅ESM输出、自动生成文件、通过tsx运行开发版可执行文件、pnpm、Vitest、ESLint,以及可选的用于基于CI发布的npm可信发布工具。
.d.ts本技能基于starter-cli(arch-tsdown-cli源码)生成,生成时间为2026-01-30。
推荐实践:
- 本地使用开发版可执行文件(tsx),发布配置中使用生产版可执行文件(dist)
- 构建纯ESM;启用并保留依赖的
dts配置external - 使用npm可信发布工具进行版本发布
Core References
核心参考文档
| Topic | Description | Reference |
|---|---|---|
| Overview | Project purpose, structure, when to use | core-overview |
| Bin Entry | dev vs prod bin, shebang, tsx | core-bin-entry |
| tsdown Config | entry, format, dts, external | core-tsdown-config |
| Scripts & Release | build, dev, start, release, npm Trusted Publisher | core-scripts |
| Package Exports | dist, bin, publishConfig, files | core-package-exports |
| Tooling | ESLint, TypeScript, Vitest config | core-tooling |
| Git Hooks | simple-git-hooks, lint-staged, pre-commit | core-git-hooks |
| CI | GitHub Actions — lint, typecheck, test matrix | core-ci |
| Testing | Vitest, vitest-package-exports | core-testing |
| 主题 | 描述 | 参考链接 |
|---|---|---|
| 概述 | 项目用途、结构、适用场景 | core-overview |
| 可执行文件入口 | 开发版vs生产版可执行文件、shebang、tsx | core-bin-entry |
| tsdown配置 | 入口、格式、dts、external | core-tsdown-config |
| 脚本与发布 | 构建、开发、启动、发布、npm可信发布工具 | core-scripts |
| 包导出配置 | dist、bin、publishConfig、files | core-package-exports |
| 工具链 | ESLint、TypeScript、Vitest配置 | core-tooling |
| Git钩子 | simple-git-hooks、lint-staged、pre-commit | core-git-hooks |
| 持续集成 | GitHub Actions — 代码检查、类型校验、测试矩阵 | core-ci |
| 测试 | Vitest、vitest-package-exports | core-testing |
Best Practices
最佳实践
| Topic | Description | Reference |
|---|---|---|
| CLI & Package | bin, ESM, dts, external, release | best-practices-cli |
| 主题 | 描述 | 参考链接 |
|---|---|---|
| CLI与包 | bin、ESM、dts、external、发布 | best-practices-cli |