create-nextjs-saas-kit 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # Indie Kit CLI
2
+
3
+ The official CLI for [Indie Kit](https://indiekit.pro) - The ultimate Next.js SaaS Starter Kit.
4
+
5
+ Scaffold a new production-ready SaaS application in seconds.
6
+
7
+ ## Usage
8
+
9
+ To scaffold a new project, run the following command directly:
10
+
11
+ ```bash
12
+ # ✅ Correct usage
13
+ npx indiekit@latest
14
+
15
+ # or
16
+ pnpm dlx indiekit@latest
17
+
18
+ # or
19
+ yarn dlx indiekit@latest
20
+ ```
21
+
22
+ **Note:** Do NOT use `npm init indiekit` or `pnpm create indiekit`. These commands attempt to run a package named `create-indiekit`, which is not this package. This CLI is named `indiekit` and should be executed directly.
23
+
24
+ ```bash
25
+ # ❌ Incorrect usage (will fail)
26
+ npm init indiekit
27
+ pnpm create indiekit
28
+ yarn create indiekit
29
+ ```
30
+
31
+ ## Features
32
+
33
+ - 🚀 **Instant Setup**: Scaffolds a Next.js 14+ project optimized for SaaS.
34
+ - 📦 **Smart Caching**: Uses `tiged` for fast, history-free cloning.
35
+ - 🛠 **Interactive Wizard**: Customized setup for your needs.
36
+ - 💎 **Version Selection**: Choose between the free Open Source version or the Pro Production Suite.
37
+
38
+ ## Versions
39
+
40
+ ### Lite (Open Source)
41
+ Free forever. Includes:
42
+ - Next.js 14 (App Router)
43
+ - Tailwind CSS & Shadcn UI
44
+ - Basic Authentication Setup
45
+ - Marketing Landing Page
46
+
47
+ ### Pro (Production SaaS)
48
+ Everything in Lite, plus:
49
+ - Stripe Payments & Subscriptions
50
+ - Admin Dashboard
51
+ - AI Integration
52
+ - Blog & Documentation Support
53
+ - Email Marketing Integration
54
+
55
+ ### Pro (B2B Multi-tenant)
56
+ Advanced features for B2B applications:
57
+ - Organization/Team Management
58
+ - Member Invites & Roles
59
+ - RBAC (Role-Based Access Control)
60
+ - Enterprise Features
61
+
62
+ [Get Indie Kit Pro](https://indiekit.pro)
63
+
64
+ ## License
65
+
66
+ ISC © [Indie Kit](https://indiekit.pro)
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import{Command as O}from"commander";import r from"path";import s from"fs-extra";import _ from"tiged";import u from"ora";import{input as $,select as C,confirm as j}from"@inquirer/prompts";import{execa as g}from"execa";import N from"open";import E from"picocolors";import R from"crypto";import b from"picocolors";var k=()=>{console.log(),console.log(b.cyan(`
3
+ \u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557
4
+ \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2551 \u2588\u2588\u2554\u255D\u2588\u2588\u2551\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D
5
+ \u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u2588\u2588\u2551
6
+ \u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551
7
+ \u2588\u2588\u2551\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551
8
+ \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D
9
+ `)),console.log(b.dim(" Next.js SaaS Starter Kit CLI")),console.log()};import d from"picocolors";var n={success:t=>console.log(d.green(`\u2714 ${t}`)),error:t=>console.log(d.red(`\u2716 ${t}`)),info:t=>console.log(d.blue(`\u2139 ${t}`)),warn:t=>console.log(d.yellow(`\u26A0 ${t}`))};var T=async t=>{k();let a=t[0];a||(a=await $({message:"Where should we create your new project?",default:"my-saas"}));let o=r.resolve(process.cwd(),a);s.existsSync(o)&&s.readdirSync(o).length>0&&(n.error(`Directory ${a} is not empty.`),process.exit(1));let w=await C({message:"Which version would you like to use?",choices:[{name:"Lite (Open Source) - Free, basic features",value:"lite"},{name:"Pro (Production SaaS) - Payments, Auth, Admin, AI",value:"pro"},{name:"Pro (B2B Multi-tenant) - Organizations, Roles, Invites",value:"b2b"}]}),f="Indie-Kit/nextjs-saas-starter",p=!1,m="";if(w==="pro"?(f="indie-kit/indie-kit",m="https://github.com/indie-kit/indie-kit.git",p=!0):w==="b2b"&&(f="indie-kit/b2b-boilerplate",m="https://github.com/indie-kit/b2b-boilerplate.git",p=!0),p){let e=u("Checking repository access...").start();try{await g("git",["ls-remote",m],{env:{GIT_TERMINAL_PROMPT:"0"}}),e.succeed("Access verified.")}catch{e.fail("Access denied."),n.error("You do not have access to this repository."),n.info("Opening access page..."),await N("https://indiekit.pro/app/repo-access?ref=cli&utm_source=cli&utm_medium=terminal"),process.exit(0)}}let x=u("Downloading template...").start();try{p?(await g("git",["clone","--depth","1",m,o]),await s.remove(r.join(o,".git"))):await _(f,{disableCache:!0,force:!0}).clone(o),x.succeed("Template downloaded successfully.")}catch(e){x.fail("Failed to download template."),n.error(e.message),process.exit(1)}let S=await j({message:"Install dependencies now?",default:!0});if(S){let e=u("Installing dependencies...").start(),i=process.env.npm_config_user_agent||"",v=i.startsWith("yarn")?"yarn":i.startsWith("pnpm")?"pnpm":"npm";try{await g(v,["install"],{cwd:o}),e.succeed("Dependencies installed.")}catch(l){e.fail("Failed to install dependencies."),n.error(l.message)}}if(await j({message:"Initialize .env.local file with fresh secrets?",default:!0})){let e=u("Generating secrets...").start();try{let i=r.join(o,".env.example"),v=r.join(o,".env.local");if(s.existsSync(i)){let l=s.readFileSync(i,"utf-8"),P=R.randomBytes(32).toString("hex");l=l.replace(/BETTER_AUTH_SECRET=.*|NEXTAUTH_SECRET=.*/g,`BETTER_AUTH_SECRET="${P}"`),s.writeFileSync(v,l),e.succeed("Generated .env.local with secure keys.")}else e.warn("No .env.example found, skipping.")}catch{e.fail("Failed to setup .env.local")}}let h=r.join(o,"package.json");if(s.existsSync(h)){let e=s.readJsonSync(h);e.name=r.basename(o),e.version="0.1.0",s.writeJsonSync(h,e,{spaces:2})}n.success(`Project created at ${E.green(o)}`),console.log(),console.log("Next steps:"),console.log(` cd ${a}`),S||console.log(" pnpm install"),console.log(" pnpm dev"),console.log(),console.log(E.yellow('AI Tip: "Open in Cursor/Claude and run /bootstrap"'));let c=await C({message:"Open project in which editor?",choices:[{name:"Cursor (Recommended)",value:"cursor"},{name:"Claude (CLI)",value:"claude"},{name:"Antigravity",value:"antigravity"},{name:"Windsurf",value:"windsurf"},{name:"VS Code",value:"code"},{name:"None",value:"none"}]});if(c!=="none")try{await g(c,[o]),n.success(`Opened project in ${c}.`)}catch{n.warn(`Could not open ${c} automatically. Please run "${c} ." manually.`)}};var I={name:"indiekit",version:"0.1.2",description:"The AI-Native Next.js SaaS CLI",private:!1,homepage:"https://indiekit.pro",bugs:{url:"https://indiekit.pro/contact"},keywords:["nextjs","saas","boilerplate","starter","ai","cli"],type:"module",bin:{indiekit:"./dist/index.js"},scripts:{dev:"tsup --watch",build:"tsup",start:"node dist/index.js",release:"bumpp"},files:["dist"],publishConfig:{access:"public",provenance:!1},dependencies:{"@inquirer/prompts":"^8.2.0",commander:"^14.0.3",execa:"^9.6.1","fs-extra":"^11.3.3",open:"^11.0.0",ora:"^9.3.0",picocolors:"^1.1.1",tiged:"^2.12.7"},devDependencies:{"@types/fs-extra":"^11.0.4","@types/node":"^25.2.2",bumpp:"^10.4.1",tsup:"^8.5.1",typescript:"^5.9.3"}};var A=()=>I.version;var y=new O;y.name("indiekit").description("CLI to scaffold Next.js SaaS applications").version(A());y.argument("[directory]","Directory to create the project in").action(t=>{T(t?[t]:[])});y.parse(process.argv);
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "create-nextjs-saas-kit",
3
+ "version": "0.1.2",
4
+ "description": "The AI-Native Next.js SaaS CLI",
5
+ "private": false,
6
+ "homepage": "https://indiekit.pro",
7
+ "bugs": {
8
+ "url": "https://indiekit.pro/contact"
9
+ },
10
+ "keywords": [
11
+ "nextjs",
12
+ "saas",
13
+ "boilerplate",
14
+ "starter",
15
+ "ai",
16
+ "cli"
17
+ ],
18
+ "type": "module",
19
+ "bin": {
20
+ "indiekit": "./dist/index.js"
21
+ },
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "publishConfig": {
26
+ "access": "public",
27
+ "provenance": false
28
+ },
29
+ "dependencies": {
30
+ "@inquirer/prompts": "^8.2.0",
31
+ "commander": "^14.0.3",
32
+ "execa": "^9.6.1",
33
+ "fs-extra": "^11.3.3",
34
+ "open": "^11.0.0",
35
+ "ora": "^9.3.0",
36
+ "picocolors": "^1.1.1",
37
+ "tiged": "^2.12.7"
38
+ },
39
+ "devDependencies": {
40
+ "@types/fs-extra": "^11.0.4",
41
+ "@types/node": "^25.2.2",
42
+ "bumpp": "^10.4.1",
43
+ "tsup": "^8.5.1",
44
+ "typescript": "^5.9.3"
45
+ },
46
+ "scripts": {
47
+ "dev": "tsup --watch",
48
+ "build": "tsup",
49
+ "start": "node dist/index.js",
50
+ "release": "bumpp"
51
+ }
52
+ }