โ† Back to CLI Utilities
CLI Utilities by @cmanfre7

project-scaffold

Scaffold new projects with best-practice structure

0
Source Code

project-scaffold

Scaffold new projects with best-practice structure, tooling, and configuration.

Usage

When Colt (or you) needs to start a new project, use this skill to generate the full boilerplate.

Decision Tree

Ask or infer the project type:

Web App (React / Next.js)

my-app/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ app/              # Next.js app router
โ”‚   โ”œโ”€โ”€ components/       # Reusable UI components
โ”‚   โ”œโ”€โ”€ lib/              # Utilities, helpers, API clients
โ”‚   โ”œโ”€โ”€ styles/           # Global styles, Tailwind config
โ”‚   โ””โ”€โ”€ types/            # TypeScript type definitions
โ”œโ”€โ”€ public/               # Static assets
โ”œโ”€โ”€ tests/                # Test files
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ .eslintrc.json
โ”œโ”€โ”€ tailwind.config.ts
โ”œโ”€โ”€ tsconfig.json
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ README.md

Init commands:

npx create-next-app@latest my-app --typescript --tailwind --eslint --app --src-dir
cd my-app && npm install

API / Backend (FastAPI)

my-api/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ main.py           # FastAPI app entry
โ”‚   โ”œโ”€โ”€ routers/          # Route modules
โ”‚   โ”œโ”€โ”€ models/           # Pydantic models / DB models
โ”‚   โ”œโ”€โ”€ services/         # Business logic
โ”‚   โ””โ”€โ”€ config.py         # Settings / env vars
โ”œโ”€โ”€ tests/
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ requirements.txt
โ””โ”€โ”€ README.md

Init commands:

mkdir my-api && cd my-api
uv init && uv pip install fastapi uvicorn

Mobile App (SwiftUI)

MyApp/
โ”œโ”€โ”€ MyApp/
โ”‚   โ”œโ”€โ”€ App.swift
โ”‚   โ”œโ”€โ”€ ContentView.swift
โ”‚   โ”œโ”€โ”€ Models/
โ”‚   โ”œโ”€โ”€ Views/
โ”‚   โ”œโ”€โ”€ ViewModels/
โ”‚   โ””โ”€โ”€ Services/
โ”œโ”€โ”€ MyAppTests/
โ”œโ”€โ”€ MyAppUITests/
โ””โ”€โ”€ README.md

Init: Use Xcode or swift package init --type executable

CLI Tool (Node / Python)

my-cli/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ index.ts          # Entry point
โ”œโ”€โ”€ bin/
โ”‚   โ””โ”€โ”€ my-cli            # Executable wrapper
โ”œโ”€โ”€ tests/
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ tsconfig.json
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ README.md

Browser Extension

my-extension/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ background.ts
โ”‚   โ”œโ”€โ”€ content.ts
โ”‚   โ”œโ”€โ”€ popup/
โ”‚   โ”‚   โ”œโ”€โ”€ popup.html
โ”‚   โ”‚   โ”œโ”€โ”€ popup.ts
โ”‚   โ”‚   โ””โ”€โ”€ popup.css
โ”‚   โ””โ”€โ”€ options/
โ”œโ”€โ”€ icons/
โ”œโ”€โ”€ manifest.json
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ tsconfig.json
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ README.md

Post-Scaffold Checklist

After generating structure:

  1. git init && git add -A && git commit -m "Initial scaffold"
  2. Create .gitignore appropriate to the project type
  3. Set up linting config (ESLint / Ruff)
  4. Add a basic README with project name and setup instructions
  5. Add a basic test file to verify the test runner works

Asset Templates

.gitignore (universal base)

node_modules/
__pycache__/
.env
.env.local
dist/
build/
.next/
*.pyc
.DS_Store
*.log
coverage/