@supunkalharajayasinghe/project-cli
v1.3.2
Published
Intent-based TypeScript CLI for scaffolding production-shaped Next.js starter projects
Maintainers
Readme
ts-cli-tool
An intent-based TypeScript project scaffolder for generating production-shaped Next.js starter projects. Generated projects feature premium, light-themed starter layouts ("Premium Blueprint Starters") with customized styles, responsive cards, interactive state indicators, built-in lucide-react icons, and central documentation links.
Instead of only asking low-level setup questions, ts-cli-tool asks what kind of project you want to build, creates an official Next.js base project, and then applies a tailored blueprint structure.
What it does
ts-cli-tool helps generate practical starter projects from developer intent.
Current supported blueprints:
- Website
- Full-stack Product
- AI App
The CLI flow:
project-cli create
↓
Project name
↓
Choose project blueprint
↓
Choose blueprint-specific shape
↓
Choose relevant modules
↓
Create Next.js base project
↓
Apply custom blueprint files
↓
Apply optional feature modules
↓
Optionally install dependencies
↓
Print next stepsWhy this exists
Traditional project scaffolding usually starts with framework configuration.
This tool starts with project intent.
For example, instead of only creating a blank Next.js app, the CLI can generate:
- A multi-page website with pages, layout components, contact form placeholder, and SEO files
- A full-stack product starter with dashboard structure, API route placeholders, Prisma/PostgreSQL, Redis, Docker, and GitHub Actions
- An AI app starter with chat UI, API route placeholder, AI configuration, and optional persistence modules
Installation
Global install (recommended)
npm install -g @supunkalharajayasinghe/project-cli
project-cli createRun without installing
npx @supunkalharajayasinghe/project-cli createFrom source (for contributors)
git clone https://github.com/SupunKalharaJayasinghe/ts-cli-tool.git
cd ts-cli-tool
npm install
npm run build
npm link
project-cli createCommands
project-cli greet <name>
Prints a test greeting.
project-cli greet Supunproject-cli create
Starts the project scaffolding flow.
project-cli createBlueprint: Website
Use this for public-facing websites.
Examples:
- Landing page
- Portfolio
- Business website
- Documentation-style website
Website options include:
- One-page landing page
- Multi-page website
- Selected sections
- Selected pages
- SEO starter files
- Contact form placeholder
- GitHub Actions CI
- Optional Docker files
Example generated structure:
src/
├── app/
│ ├── page.tsx
│ ├── about/page.tsx
│ ├── services/page.tsx
│ ├── contact/page.tsx
│ ├── layout.tsx
│ ├── robots.ts
│ └── sitemap.ts
├── components/
│ ├── forms/
│ │ └── ContactForm.tsx
│ ├── layout/
│ │ ├── Navbar.tsx
│ │ └── Footer.tsx
│ └── sections/
├── lib/
│ └── site-config.ts
└── types/Blueprint: Full-stack Product
Use this for production-style apps with backend logic.
Examples:
- SaaS starter
- Dashboard app
- Admin-style app
- Custom full-stack product
Full-stack options include:
- SaaS starter
- Dashboard with database
- Custom full-stack app
- Prisma + PostgreSQL
- Redis
- Docker files
- GitHub Actions CI
- Environment example file
Example generated structure:
src/
├── app/
│ ├── page.tsx
│ ├── dashboard/
│ │ └── page.tsx
│ ├── api/
│ │ └── health/
│ │ └── route.ts
│ └── layout.tsx
├── components/
│ └── dashboard/
├── lib/
│ ├── db.ts
│ ├── env.ts
│ ├── redis.ts
│ └── utils.ts
├── server/
│ ├── actions/
│ └── services/
└── types/
prisma/
└── schema.prisma
.env.example
Dockerfile
docker-compose.yml
.github/workflows/ci.ymlBlueprint: AI App
Use this for AI-first applications.
Examples:
- Chat app
- AI assistant
- Content generator
AI options include:
- Chat app
- AI assistant
- Content generator
- AI API route placeholder
- Chat UI components
- AI config helper
- Optional database support
- Optional Redis support
- GitHub Actions CI
Example generated structure:
src/
├── app/
│ ├── page.tsx
│ ├── api/
│ │ └── chat/
│ │ └── route.ts
│ └── layout.tsx
├── components/
│ └── chat/
│ ├── Chat.tsx
│ ├── ChatInput.tsx
│ └── MessageList.tsx
├── lib/
│ └── ai.ts
└── types/
└── ai.tsFeature modules
The scaffolder can apply optional modules based on the selected blueprint.
Prisma + PostgreSQL
Adds:
prisma/schema.prisma
src/lib/db.ts
.env.exampleAlso updates package.json with Prisma dependencies and scripts:
npm run db
npm run db:push
npm run db:generateRedis
Adds:
src/lib/redis.ts
REDIS_URL in .env.exampleDocker
Adds:
Dockerfile
docker-compose.ymlFor projects using PostgreSQL or Redis, Docker Compose includes matching services.
GitHub Actions
Adds:
.github/workflows/ci.ymlThe generated workflow runs install, lint, typecheck, and build steps.
Generated project next steps
After generating a project:
cd your-project-name
npm install
npm run devIf .env.example is generated:
cp .env.example .envOn Windows PowerShell:
Copy-Item .env.example .envIf Prisma is enabled:
npm run db:pushLocal development
Install dependencies:
npm installRun the CLI in development mode:
npm run devBuild:
npm run buildRun the built CLI:
node dist/index.js createManual verification
Generated projects have been manually verified for:
- Website blueprint
- Full-stack Product blueprint
- AI App blueprint
See:
docs/generated-project-verification.mdCurrent limitations
This version focuses on the first stable intent-based scaffolder flow.
Not included yet:
- Authentication implementation
- Payment integration
- Full UI component library
- Deployment automation
- Backend API blueprint
- TypeScript package / CLI blueprint
- Plugin system
- Dry-run mode
These can be added in future versions.
License
MIT
