Skip to content
/ ctsm Public

Create a modern TypeScript library with a single command! ✨

Notifications You must be signed in to change notification settings

alii/ctsm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Apr 6, 2025
5e59149 · Apr 6, 2025

History

33 Commits
Apr 6, 2025
Apr 5, 2025
Apr 6, 2025
Apr 6, 2025
Apr 6, 2025
Apr 6, 2025
Apr 6, 2025
Apr 6, 2025
Apr 6, 2025
Apr 6, 2025
Apr 6, 2025
Apr 6, 2025
Apr 6, 2025

Repository files navigation

🚀 CTSM - Create TypeScript Module

Tests npm version License: MIT

Create a modern TypeScript library with a single command! ✨

💫 Features

  • Zero Config - Get up and running in seconds
  • Modern Defaults - ESM and CJS dual package setup
  • TypeScript Ready - Full TypeScript support with declaration files
  • Multiple Package Managers - Works with npm, yarn, pnpm, and bun
  • Git Integration - Auto-initializes your repo and adds proper .gitignore
  • License Generation - Automatically creates MIT license with your name
  • Optimized Builds - Uses tsup for fast, efficient builds
  • Smart Defaults - Sensible configs for prettier and TypeScript
  • Tree Shaking - Built-in support for optimized bundles

🚀 Quick Start

bunx ctsm@latest my-awesome-library

🛠️ Command Line Options

ctsm [name] [options]

Options:

  • -y - Skip confirmation prompts
  • -p=<manager> - Specify package manager to use for the package (options: bun,npm,yarn,pnpm)

📦 What You Get

CTSM scaffolds a complete TypeScript library project with:

  • Modern package.json with ESM and CJS support
  • TypeScript configuration
  • Prettier formatting
  • tsup build setup
  • Git initialization
  • MIT license
  • Clean directory structure
  • Development dependencies installed

📂 Project Structure

my-awesome-library/
├── src/
│   └── index.ts         # Your library entry point
├── .gitignore           # Git ignore file
├── .prettierrc          # Prettier configuration
├── LICENSE              # MIT license
├── package.json         # Package configuration
├── tsconfig.json        # TypeScript configuration
└── tsup.config.ts       # Build configuration

🧙‍♂️ Advanced Usage

CTSM detects your Git user info to automatically:

  • Populate package.json author fields
  • Generate license with your name
  • Initialize Git repository

💖 Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

📜 License

MIT © Alistair Smith

bunx ctsm [name]

Flags:

  • -y: Skips confirmations
  • -p=bun|npm|yarn|pnpm: Sets the package manager to install with

About

Create a modern TypeScript library with a single command! ✨

Topics

Resources

Stars

Watchers

Forks