中文 | 日本語 | Русский язык
A CLI development template powered by modern tooling, integrating TypeScript, tsup for builds, consola for logging, and other core components to accelerate high-quality CLI project setup.
-
CLI Toolchain: Integrates
ts-node
(for direct TypeScript execution during development) andtsup
(for production-grade builds), supporting the full workflow from debugging to deployment. -
TypeScript Support: Full TypeScript configuration (including
tsconfig.json
) with type checking and auto-completion to ensure code maintainability. -
Structured Logging: Implements leveled logging (info/warn/error), custom formatting, and context-aware messages via
consola
to enhance debugging efficiency. -
Data Parsing: Built-in
destr
for safe parsing of JSON-like data (e.g., CLI arguments, config files), preventing exceptions fromJSON.parse
. -
Terminal Styling: Uses lightweight
picocolors
for cross-platform terminal color support (160+ color codes) and styles (bold/underline) to improve CLI interactivity. -
Code Quality: Integrated ESLint (based on
@antfu/eslint-config
) for automated code style checks, error detection, and best practice enforcement. -
Rapid Builds:
tsup
default configuration supports ESM output, source maps, and type declaration generation, with 30%+ faster build times compared to traditional tools.
-
Language:
TypeScript
: Typed superset of JavaScript with static type checking and modern syntax. -
Build Tool:
tsup
: Fast bundler based on esbuild, supporting ESM, CommonJS, and type declaration outputs. -
Logging:
consola
: Structured logging library with leveled messages, custom themes, and context support. -
Data Handling:
destr
: Safe parser for JSON-like strings (e.g., CLI arguments) to preventJSON.parse
errors. -
Terminal Styling:
picocolors
: Lightweight cross-platform terminal color library with 160+ color codes and styles (bold/underline). -
Code Linting:
ESLint
+@antfu/eslint-config
: Modern JavaScript/TypeScript linting rules with auto-fix for style and error issues. -
Package Manager:
pnpm
: Content-addressable package manager with faster installs and reduced disk usage (seepnpm-lock.yaml
).
See the package.json for a full list of dependencies.
Follow these instructions to get the project running locally.
Ensure you have the following installed:
- Node.js (>= 18.x recommended)
- Package manager (npm, yarn, or pnpm)
node -v
npm -v
Run script
pnpm create trapar-waves
Install dependencies
npm install
yarn install
pnpm install
Contributions are welcome and greatly appreciated! Please follow these steps to contribute:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Rikka: (admin@rikka.cc)
- GitHub Profile: Muromi-Rikka