npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@trapar-waves/cli-template

v1.1.20

Published

A CLI template with TypeScript, tsup, consola, destr, and picocolors, offering efficient builds, logging, data parsing, and colorful output, with ESLint for quality.

Readme

@trapar-waves/cli-template

npm version npm dm License GitHub last commit GitHub Actions Workflow Status Renovate


中文 | 日本語 | Русский язык

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.

✨ Features

  • CLI Toolchain: Integrates ts-node (for direct TypeScript execution during development) and tsup (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 from JSON.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.

💻 Tech Stack

  • 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 prevent JSON.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 (see pnpm-lock.yaml).

See the package.json for a full list of dependencies.

🚀 Getting Started

Follow these instructions to get the project running locally.

Prerequisites

Ensure you have the following installed:

  • Node.js (>= 18.x recommended)
  • Package manager (npm, yarn, or pnpm)
node -v
npm -v

Installation

Using create-trapar-waves to scaffold a new project:

pnpm create trapar-waves

Or, if you prefer to manually set up the template:

  1. Clone the repository:
    git clone https://github.com/Trapar-waves/cli-template.git
    cd cli-template
  2. Install dependencies:
    pnpm install
    # or
    npm install
    # or
    yarn install

Development

To run the CLI in development mode with ts-node:

pnpm start
# or
npm run start

Building

To build the CLI for production with tsup:

pnpm build
# or
npm run build

This will output the compiled JavaScript to the dist directory.

🤝 Contributing

Contributions are welcome and greatly appreciated! Please follow these steps to contribute:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please ensure your code adheres to the project's linting rules by running pnpm lint before committing.

👤 Author

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🔗 Links