Skip to content

ramunasnognys/init-nextjs-command

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

/init-nextjs

One-shot Next.js project initialization with GitHub and Vercel deployment.

Usage

/init-nextjs <project-name>           # Normal mode (with confirmations)
/init-nextjs <project-name> --yolo    # YOLO mode (skip all confirmations)

What It Does

Step Action
1 Creates Next.js app with TypeScript + Tailwind + App Router
2 Creates public GitHub repository and pushes code
3 Deploys to Vercel (preview + production)

Prerequisites

Install and authenticate these CLIs before first use:

# GitHub CLI
brew install gh
gh auth login

# Vercel CLI
npm i -g vercel
vercel login

Example

/init-nextjs my-saas-app

Output:

Project initialized successfully!

Local:    ./my-saas-app
GitHub:   https://github.com/<username>/my-saas-app
Vercel:   https://my-saas-app-xxx.vercel.app

Next steps:
  cd my-saas-app
  npm run dev

Manual Workflow

If you prefer to run each step manually, copy and paste these commands:

Step 1: Create Next.js App

npx create-next-app@latest my-project --typescript --tailwind --app --eslint --src-dir --import-alias "@/*" --use-npm

Step 2: Navigate to Project

cd my-project

Step 3: Create GitHub Repository

gh repo create my-project --public --source=. --push

Step 4: Deploy to Vercel (Preview)

vercel --yes

Step 5: Deploy to Vercel (Production)

vercel --prod --yes

Step 6: Start Development

npm run dev

Open http://localhost:3000 in your browser.


Stack Created

  • Framework: Next.js 16 (App Router + Turbopack)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Linting: ESLint
  • Structure: src/ directory with @/* import alias

Customization

Edit ~/.claude/commands/init-nextjs.md to:

  • Change default options (remove Tailwind, add different flags)
  • Switch to private repos (--private instead of --public)
  • Skip Vercel deployment
  • Add additional setup steps (shadcn/ui, testing, etc.)

Troubleshooting

Error Solution
gh: command not found Install GitHub CLI: brew install gh
gh auth fails Run gh auth login
vercel: command not found Install Vercel CLI: npm i -g vercel
vercel auth fails Run vercel login
Project name exists Choose a different name or delete existing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors