TSDX
TSDX is a zero-config CLI that helps you develop, test, and publish modern TypeScript packages with ease—so you can focus on your awesome new library and not waste another afternoon on configuration.
TSDX 2.0
TSDX 2.0 is a complete rewrite using modern, high-performance Rust-based tooling. See the Migration Guide if upgrading from v0.x.
Features
- Zero config - Sensible defaults, just start coding
- Modern tooling - Built on bunchee, vitest, oxlint, and oxfmt
- Dual ESM/CJS - Automatic dual module builds with proper exports
- TypeScript first - Full TypeScript support with declaration generation
- Lightning fast - Rust-powered linting (50-100x faster than ESLint) and formatting (35x faster than Prettier)
- Bun-native - Uses bun for package management
- Modern Node.js - Supports Node.js 20+ (LTS)
Tool Stack
TSDX 2.0 uses modern, high-performance tools:
| Tool | Purpose | Performance |
|---|---|---|
| bunchee | Bundling | Zero-config, built on Rollup + SWC |
| vitest | Testing | Vite-native, Jest-compatible API |
| oxlint | Linting | 50-100x faster than ESLint |
| oxfmt | Formatting | 35x faster than Prettier |
| bun | Package Management | Native speed, npm-compatible |
Requirements
- Node.js: 20+ (LTS)
- Bun: Latest version
Quick Example
# Create a new package
bunx tsdx create mylib
# Navigate to the project
cd mylib
# Start development
bun run devThat's it! Start editing src/index.ts and build your library.