@luucaohoang/lumit
v0.1.3
Published
A modular starter project generator CLI for developers.
Downloads
278
Maintainers
Readme
lumit
lumit is a CLI for creating starter projects quickly. It creates the project, installs dependencies, initializes Git, creates the first commit, and can optionally create and push a GitHub repository with GitHub CLI.
The MVP supports React + Vite templates.
Install
npm install -g @luucaohoang/lumitCheck that it works:
lumit --helpQuick Start
Create a React + Vite + TypeScript app:
lumit create my-app --template react-vite-tsThen run it:
cd my-app
npm run devCopy-Paste Commands
Create with interactive prompts:
lumit createCreate React + Vite + TypeScript:
lumit create my-app --template react-vite-tsCreate React + Vite JavaScript:
lumit create my-app --template react-viteUse pnpm:
lumit create my-app --template react-vite-ts --package-manager pnpmUse yarn:
lumit create my-app --template react-vite-ts --package-manager yarnUse bun:
lumit create my-app --template react-vite-ts --package-manager bunSkip dependency installation:
lumit create my-app --template react-vite-ts --no-installSkip Git initialization:
lumit create my-app --template react-vite-ts --no-gitCreate a private GitHub repo and push:
lumit create my-app --template react-vite-ts --github --privateCreate a public GitHub repo and push:
lumit create my-app --template react-vite-ts --github --publicWhat It Runs
This command:
lumit create my-app --template react-vite-tsRuns the equivalent of:
npm create vite@latest my-app -- --template react-ts
cd my-app
npm install
git init
git add .
git commit -m "Initial commit"With GitHub enabled:
lumit create my-app --template react-vite-ts --github --privateIt also runs:
gh repo create my-app --source=. --remote=origin --private --pushTemplates
| Template | Description |
| --- | --- |
| react-vite | React + Vite |
| react-vite-ts | React + Vite + TypeScript |
Options
| Option | Description |
| --- | --- |
| --template <id> | Select a template: react-vite or react-vite-ts |
| --package-manager <name> | Select npm, pnpm, yarn, or bun |
| --no-install | Skip dependency installation |
| --no-git | Skip git init, git add ., and initial commit |
| --github | Create a GitHub repository with GitHub CLI |
| --private | Create a private GitHub repository |
| --public | Create a public GitHub repository |
Interactive Mode
If you do not pass enough options, lumit asks what to do:
lumit createIt can ask for:
- Project name
- Template
- Package manager
- Whether to install dependencies
- Whether to initialize Git
- Whether to create a GitHub repository
- Public or private repository
- Whether to push immediately
Requirements
- Node.js 20+
- npm, pnpm, yarn, or bun
- Git, unless you use
--no-git - GitHub CLI, only if you use
--github
For GitHub repo creation, install and login with GitHub CLI:
gh auth loginLocal Development
Install dependencies:
npm installRun typecheck:
npm run typecheckBuild:
npm run buildLink locally:
npm linkRun the local CLI:
lumit create my-app --template react-vite-tsRun from source without linking:
npm run dev -- create my-app --template react-vite-tsRelease to npm
The package is published as:
@luucaohoang/lumitThe installed command is still:
lumitBefore the first release, add an npm automation token to GitHub:
GitHub repository
Settings
Secrets and variables
Actions
New repository secret
Name: NPM_TOKENRelease flow:
npm ci
npm run typecheck
npm run build
npm version patch
git push --follow-tagsThen create a GitHub Release from the new tag and publish it. The GitHub Actions release workflow will publish to npm.
Troubleshooting
PowerShell blocks lumit.ps1 on Windows:
lumit.cmd --helpGit commit fails because user identity is missing:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"GitHub CLI is not logged in:
gh auth loginPackage manager is missing:
npm --version
pnpm --version
yarn --version
bun --versionExtending Templates
Add new template modules under src/templates/ and export them through src/templates/index.ts.
Each template defines:
- Template id
- Display name
- Framework
- Create command per package manager
- Dev command
This keeps future support for Next.js, Vue, Svelte, Express, NestJS, Laravel, Tailwind, ESLint, Prettier, React Router, Zustand, Axios, shadcn/ui, and custom presets separate from the create command orchestration.
