@bold-ai/create-product
v0.2.2
Published
CLI tool to create new products with Company Auth pre-configured
Maintainers
Readme
@bold/create-product
CLI tool to quickly scaffold new products with Company Auth pre-configured.
Usage
Create a new product interactively
npx @bold/create-productCreate with project name
npx @bold/create-product my-awesome-productWith options
npx @bold/create-product my-product --skip-installOptions
--template <type>- Template to use (default:default)--skip-install- Skip installing dependencies--skip-register- Skip registering product with auth service
What It Does
- Creates a new Next.js project from the product template
- Configures authentication with your auth service URL
- Sets up environment variables with placeholder values
- Downloads Bold packages from GitHub (agents, auth-sdk, logger, subscriptions) ⭐ NEW!
- Builds all packages automatically so they're ready to use ⭐ NEW!
- Installs dependencies (optional)
- Registers the product with your auth service (optional)
- Automatically updates .env.local with real credentials after registration
Interactive Prompts
The CLI will ask you for:
- Project name - Lowercase with hyphens (e.g.,
my-product) - Display name - Human-readable name (e.g.,
My Product) - Description - Short description of your product
- Auth Service URL - URL of your central auth service
- Supabase credentials - Can be added later
- Download Bold packages? - Automatically download from GitHub ⭐ NEW!
- GitHub Token - Personal access token with
repoaccess (only if downloading packages) ⭐ NEW! - Register product? - Automatically register with auth service
- Admin API Key - If registering, provide your
ADMIN_API_KEYfrom the auth service
After Creation
If you downloaded packages and registered during setup:
cd my-product
pnpm install # Install all dependencies
pnpm dev # Everything is ready!Your project includes:
- ✅ Real Product ID & API Key (from registration)
- ✅ Built Bold packages in
./packages/folder - ✅ All dependencies configured in package.json
- ✅ Auth Service URL configured
Your project structure:
my-product/
├── packages/ ⭐ Downloaded and built Bold packages
│ ├── agents/
│ │ ├── dist/ ✅ Built and ready
│ │ └── src/
│ ├── auth-sdk/
│ │ ├── dist/ ✅ Built and ready
│ │ └── src/
│ ├── logger/
│ │ ├── dist/ ✅ Built and ready
│ │ └── src/
│ └── subscriptions/
│ ├── dist/ ✅ Built and ready
│ └── src/
├── src/
├── package.json ✅ Configured with file:./packages/* references
└── .env.local ✅ Real credentials populatedIf you skipped package download:
cd my-product
# Download packages manually from repository
# Place them in ./packages/
# Then run:
pnpm install
pnpm devIf you skipped registration:
cd my-product
# Update AGENCY_AUTH_PRODUCT_ID and AGENCY_AUTH_API_KEY in .env.local
pnpm devYour new product will be running at http://localhost:3001 with authentication fully configured!
Manual Product Registration
If you skipped registration during CLI setup, you have two options:
Option 1: Via Web UI
- Go to your Auth Service at
http://localhost:3000 - Login with admin credentials
- Navigate to Developer Portal
- Click "Create Product"
- Fill in the details
- Copy the Product ID and API Key
- Update your
.env.local
Option 2: Via CLI/API
curl -X POST http://localhost:3000/api/admin/products \
-H "X-Admin-Key: YOUR_ADMIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "My Product",
"slug": "my-product",
"description": "A great product"
}'Then update your .env.local with the returned credentials.
Template Structure
The generated project includes:
- ✅ Next.js 14 with App Router
- ✅ TypeScript configured
- ✅ Tailwind CSS
- ✅ Auth SDK integrated
- ✅ Login/Signup pages
- ✅ Protected dashboard
- ✅ Middleware for route protection
- ✅ Example components
How to Get a GitHub Personal Access Token
To download Bold packages, you need a GitHub token with repo access:
Steps:
- Go to: https://github.com/settings/tokens
- Click "Generate new token" → "Generate new token (classic)"
- Give it a name:
Bold CLI Package Download - Select scopes:
- ✅
repo(Full control of private repositories)
- ✅
- Click "Generate token"
- Copy the token immediately (you won't see it again!)
- Use it when the CLI prompts for your GitHub token
Security Note:
- ✅ Token gives access to Bold repo (private)
- ✅ Only team members with repo access can use it
- ✅ Monorepo stays private
- ✅ Can revoke token anytime at GitHub settings
License
MIT
