create-smx
v0.0.5
Published
CLI tool for scaffolding TypeScript Express applications with various features
Maintainers
Readme
create-smx
A modern CLI tool for quickly scaffolding TypeScript Express applications with various features.
Overview
create-smx helps you quickly bootstrap a TypeScript Express application with best practices and common utilities. It generates a clean, modern project structure that's ready for development.
Features
- Interactive Mode: Select features through an interactive prompt
- TypeScript with ES Modules: Modern TypeScript setup with ESM imports
- Express.js: Fast, unopinionated web framework for Node.js
- App/Server Separation: Clean separation of Express app and server initialization
- Environment Config: Built-in dotenv configuration
- Middleware: Essential middleware (CORS, Helmet) pre-configured
- Advanced Logger: Rich logging system with file rotation, colorized output, and request/error tracking
- API Response Utilities: Standardized API response format
- Clean Project Structure: Well-organized file structure following best practices
- Development Ready: Fast ts-node-dev setup for development
Quick Start
# Using npx (recommended, interactive mode by default)
npx create-smx my-app
# Install globally
npm install -g create-smx
create-smx my-appThere's no need to create a directory first - just run the command and create-smx will create the project folder for you.
Command Line Options
npx create-smx [options] <project-name>Arguments
project-name: Name of your project (required)
Options
--interactive: Use interactive prompts to select features (default: true)--no-interactive: Skip interactive prompts--logger: Include advanced logger (default: true)--no-logger: Skip logger configuration--custom-api-response: Include custom API response utility--no-custom-api-response: Skip custom API response utility-v, --version: Output the current version-h, --help: Display help information
Examples
# Create a project using interactive prompts (recommended)
npx create-smx my-app
# Skip interactive mode and create a basic app
npx create-smx my-app --no-interactive
# Create an app with custom API response utilities
npx create-smx my-app --custom-api-response
# Create a minimal app without logger
npx create-smx minimal-app --no-logger
# Get help information
npx create-smx --helpInteractive Mode
When you run create-smx without any feature flags, it will start in interactive mode (unless --no-interactive is specified):
📋 Let's configure your Express + TypeScript application:
? Select the features you want to include: (Press <space> to select, <a> to toggle all)
❯◉ Advanced Logger (file rotation, colorized output, request tracking)
◯ Custom API Response utilitiesSimply use the arrow keys to navigate, space to select/deselect features, and enter to confirm your choices.
Generated Project Structure
my-app/
├── .gitignore
├── .env
├── .env.example
├── package.json
├── README.md
├── tsconfig.json
├── logs/ (if logger is selected)
└── src/
├── app.ts (Express application setup)
├── server.ts (Server initialization)
└── utils/
├── api-response.ts (if selected)
└── logger.ts (if selected)What's Included
Base Configuration
- TypeScript configuration optimized for Node.js
- Express setup with app/server separation
- Environment Variables with dotenv
- CORS and Helmet middleware for security
- ESLint for code quality
- ts-node-dev for fast development
Optional Features
Advanced Logger (enabled by default)
- Multi-level logging (error, warn, info, http, debug)
- Automatic file rotation by date
- Colorized console output
- Request timing with detailed metrics
- Structured logging with metadata support
- Production/development mode detection
Custom API Response (opt-in)
- Standardized success response format
- Consistent error response handling
- Type-safe response utilities
After Creating a Project
cd my-app
npm install
npm run devYour app will be running at http://localhost:3000
Development
Want to contribute to create-smx?
- Clone this repository
- Install dependencies:
npm install - Build the project:
npm run build - Link for local development:
npm link
License
MIT
Roadmap
- Database integration options
- Authentication scaffolding
- GraphQL support
- Testing setup
- Docker configuration
- Deployment options
