@hegoatek/cli
v1.2.1
Published
HegoaTek CLI - Create and manage HegoaTek projects
Downloads
179
Maintainers
Readme
HegoaTek CLI
Interactive command-line tool for creating and managing HegoaTek projects.
For development setup: See DEVELOPMENT.md
Installation
Global Installation (Recommended)
Install globally to use hegoatek command from anywhere:
npm install -g @hegoatek/cli
hegoatek --versionPer-Project Installation
Install as a dev dependency in your project:
npm install --save-dev @hegoatek/cli
npx hegoatek new my-projectQuick Start
Interactive Mode (Recommended)
hegoatek newAnswer the questions to customize your project:
- Project name
- Project type (SaaS Single-Tenant, Multi-Tenant, Site Vitrine)
- Authentication provider (JWT, Supabase, Auth0)
- Storage provider (Cloudflare R2, AWS S3, Local)
- Email provider (Resend, SendGrid, SMTP)
- Billing (Stripe)
Non-Interactive Mode
hegoatek new my-project --template=saas-single-tenantCommands
hegoatek new [name]
Create a new HegoaTek project.
Usage:
hegoatek new # Fully interactive
hegoatek new my-project # Name provided, then interactive
hegoatek new my-project -t saas-single-tenant # Non-interactive (skip questions)Options:
-t, --template <template>- Template name (optional)-d, --directory <dir>- Output directory (default: current directory)
Available Templates:
saas-single-tenant- SaaS for one customer (Angular + NestJS)saas-multitenant- Multi-tenant SaaS with RLS (Angular + NestJS)site-vitrine-nextjs- Marketing site with contact form (Next.js)
hegoatek info
Display information about available templates and providers.
Usage:
hegoatek infoShows details about:
- Available project templates
- Authentication providers
- Storage providers
- Email providers
hegoatek help [command]
Show help for a specific command or list all commands.
Usage:
hegoatek help # Show all commands
hegoatek help new # Help for 'new' commandEnvironment Setup
After creating a project, you'll need to configure environment variables.
SaaS Templates (Angular + NestJS)
Create a .env file in the project root (a template is generated automatically):
# Authentication
AUTH_PROVIDER=custom
JWT_SECRET=your-secret-key-here
JWT_EXPIRATION_SECONDS=86400
# Database (Neon PostgreSQL)
DATABASE_URL=postgresql://user:password@host:5432/dbname
# Storage (if configured)
STORAGE_PROVIDER=cloudflare-r2
R2_ACCOUNT_ID=your-account-id
R2_ACCESS_KEY_ID=your-key-id
R2_SECRET_ACCESS_KEY=your-secret-key
R2_BUCKET_NAME=your-bucket-name
# Email (if configured)
RESEND_API_KEY=re_your_api_key
# Frontend (Angular)
API_URL=http://localhost:3000Next.js Templates
# Email
RESEND_API_KEY=re_your_api_key
[email protected]Project Structure
SaaS Single-Tenant
my-project/
├── frontend/ # Angular 21 application
│ ├── src/
│ │ ├── app/
│ │ │ ├── login/
│ │ │ └── home/
│ │ └── main.ts
│ ├── angular.json
│ └── package.json
├── backend/ # NestJS 11 API
│ ├── src/
│ │ ├── app.controller.ts
│ │ ├── app.module.ts
│ │ └── main.ts
│ ├── nest-cli.json
│ └── package.json
├── prisma/ # Database schema
│ ├── schema.prisma
│ └── migrations/
├── .env
├── .env.example
└── package.jsonSite Vitrine (Next.js)
my-site/
├── src/
│ ├── app/
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ ├── about/
│ │ ├── contact/
│ │ └── api/
│ │ └── contact/route.ts
│ └── components/
├── public/
├── next.config.mjs
├── tailwind.config.ts
└── package.jsonDevelopment
Start SaaS Project
cd my-project
npm install
# Terminal 1: Backend
npm run start:backend
# Terminal 2: Frontend
npm run start:frontend
# Or both in parallel
npm run start:allStart Next.js Project
cd my-site
npm install
npm run devCommon Tasks
Run Tests
npm run testBuild for Production
npm run buildFormat Code
npm run formatLint Code
npm run lintDatabase Management (SaaS)
# Generate Prisma Client
npm run prisma:generate
# Create migration
npm run prisma:migrate
# Open Prisma Studio GUI
npm run prisma:studioTroubleshooting
"hegoatek: command not found"
Install globally:
npm install -g @hegoatek/cli"Templates not found"
Ensure you have a stable internet connection. You can also specify a version:
npm install -g @hegoatek/cli@latest"Permission denied" on macOS/Linux
Use sudo:
sudo npm install -g @hegoatek/cliOr fix npm permissions: https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
Port already in use
Change the port in your development configuration or kill the process:
# Find process using port 3000
lsof -i :3000
# Kill it
kill -9 <PID>Examples
Example 1: Create a SaaS Platform
$ hegoatek new my-saas-app
? Project name: my-saas-app
? Select project type: SaaS Single-Tenant (Angular + NestJS)
? Configure advanced features? Yes
? Authentication provider: Custom JWT (Recommended)
? File storage: Cloudflare R2 (Recommended)
? Email provider: Resend (Recommended)
? Enable Stripe billing? Yes
✨ Creating project "my-saas-app"...
✔ Copied template
✔ Updated configuration
✔ Generated .env file
✔ Initialized Git
🎉 Project created successfully!Example 2: Create a Marketing Site
hegoatek new my-website -t site-vitrine-nextjsExample 3: View Available Options
hegoatek infoNext Steps
After creating your project:
Install Dependencies
npm installConfigure Environment
- Edit
.envwith your API keys and configuration - Check
.env.examplefor required variables
- Edit
Start Development
npm run devDeploy (See project README for deployment guides)
Documentation
For more information:
- HegoaTek Studio Documentation
- @hegoatek/core - NestJS Modules
- @hegoatek/ui-angular - Angular Components
- @hegoatek/config-schemas - Configuration Schemas
License
MIT
Support
For issues or questions:
- Check the troubleshooting section above
- Review project README after creation
- Visit the main documentation
