@hkt-cpe-lab/create-sst-monorepo
v1.0.4
Published
CLI tool to create a new SST monorepo from the official template
Readme
create-sst-monorepo
CLI tool to create a new SST monorepo from the official template.
How to Use This CLI
Quick Start
Use npm create to create a new SST monorepo:
npm create @hkt-cpe-lab/create-sst-monorepo <project-name>Usage
With Project Name Parameter
Create a new SST monorepo by providing the project name as an argument:
npm create @hkt-cpe-lab/create-sst-monorepo my-awesome-appInteractive Mode
If you don't provide a project name, the CLI will prompt you:
npm create @hkt-cpe-lab/create-sst-monorepoYou'll be asked: What is your app name?
Alternative Methods
You can also use npx directly:
npx @hkt-cpe-lab/create-sst-monorepo <project-name>Or install globally and use the command:
npm install -g @hkt-cpe-lab/create-sst-monorepo
create-sst-monorepo <project-name>Project Name Validation
The project name must:
- Only contain letters, numbers, hyphens, and underscores
- Not be empty
What It Does
- Downloads the official SST monorepo template from GitHub
- Extracts it to a new directory with your project name
- Replaces template placeholders with your project name
- Automatically detects and installs dependencies using your preferred package manager (yarn, pnpm, bun, or npm)
- Sets up the monorepo structure with workspaces
Next Steps
After creation, the CLI will display next steps:
cd <project-name>
npx sst deployHow to Run This Project
Prerequisites
- Node.js (v18 or higher recommended)
- A package manager: npm, yarn, pnpm, or bun
Development Setup
Clone or download this repository
Install dependencies
npm installor with yarn:
yarn installLink the CLI locally (optional, for development)
npm linkThis allows you to use
create-sst-monorepocommand globally from your local development version.Test the CLI
node bin/create-sst-monorepo.js test-projector if linked:
create-sst-monorepo test-project
Project Structure
create-sst-monorepo/
├── bin/
│ └── create-sst-monorepo.js # Main CLI entry point
├── utils/
│ ├── downloadAndUnzip.js # Downloads and extracts template
│ ├── replaceAppName.js # Replaces placeholders in files
│ └── resolvePackageManager.js # Detects package manager
├── package.json
└── README.mdBuilding/Publishing
This project uses ES modules ("type": "module"). To publish:
npm publishLicense
MIT
