@forgedevstack/forge-cli
v1.0.2
Published
CLI to create and manage ForgeStack projects - React apps with optional server, state management, and UI components
Maintainers
Readme
Forge CLI
Quick Start
# With npx
npx create-forge my-app
# With pnpm
pnpm create forge my-app
# With yarn
yarn create forge my-app
# With bun
bunx create-forge my-appFeatures
- Multiple Templates - React, Server, Full-Stack monorepo
- Select All Packages - One-click to include all ForgeStack packages
- Bear UI Integration - Beautiful component library with customizable themes
- Synapse State - Powerful state management with "nuclear" folder structure
- Forge Compass - Type-safe routing with guards
- Forge Form - Advanced form management
- Forge Query - Data fetching with caching
- Grid Table - Powerful data grid component
- Relay - Zero-dependency HTTP client with WebSocket support
- Forge Auth - Authentication & OAuth (Google, Facebook, GitHub)
- Crucible - Full-stack testing framework (client & server)
- Anvil Utils - Common utilities and hooks
- Harbor Backend - Complete Node.js framework (MongoDB, JWT, WebSocket, Scheduling)
- Multiple Package Managers - npm, pnpm, yarn, bun
- Docker Support - Production-ready Dockerfile and docker-compose
- Code Generators - Generate pages, components, and slices
Commands
Create a New Project
forge create [project-name]
# Options:
# -t, --template <template> Project template (react, server, fullstack)
# -p, --package-manager <pm> Package manager (npm, pnpm, yarn, bun)
# -o, --out-dir <path> Output directory
# -y, --yes Skip prompts and use defaultsAdd ForgeStack Packages
forge add [package]
# Available packages:
# bear - UI Component Library
# grid-table - Data Grid
# forge-query - Data Fetching
# forge-form - Form Management
# forge-compass - Routing
# synapse - State Management
# anvil - Utilities & Hooks
# harbor - Backend Framework
# relay - HTTP Client & WebSockets
# forge-auth - Authentication & OAuth
# crucible - Testing Framework (client & server)
# Options:
# -c, --color <hex> Bear UI primary color
# -s, --scope <scope> Crucible scope (client, server, both)Generate Synapse Nuclear Slice
forge nuclear [slice-name]
# Options:
# -p, --path <path> Base path (default: src)Templates
React (react)
- Vite + React 18 + TypeScript
- Bear UI with theme customization
- Forge Compass routing
- Synapse state with nuclear structure
- Anvil utilities
- Grid Table for data display
- API layer with Synapse hooks
Server Only (server)
Choose between two server frameworks:
| Framework | Description | |-----------|-------------| | Harbor | ForgeStack's complete backend framework (recommended) | | Express | Standard Express.js setup |
Harbor includes:
- Zero-config server (Express under the hood)
- MongoDB ODM (optional)
- JWT authentication ready
- Built-in validation
- Rate limiting & caching
- Health checks & metrics
Full-Stack Monorepo (fullstack)
- Workspace-based monorepo
- Client with React + Vite
- Server with Harbor or Express
Project Structure
src/
├── api/ # API client & hooks
├── components/ # UI components
│ ├── Layout/
│ └── common/
├── config/ # App configuration
├── pages/ # Page components
│ └── Home/
│ ├── Home.tsx
│ ├── Home.types.ts
│ └── index.ts
├── types/ # TypeScript types
└── nuclear/ # Synapse state (if enabled)
├── config/
└── slices/
└── app/
├── app.nucleus.ts
├── app.hooks.ts
└── index.tsGenerated Scripts
# Start development server
npm run dev
# Build for production
npm run build
# Generate new page
npm run generate:page
# Generate new component
npm run generate:component
# Generate Synapse slice
npm run generate:slice
# Docker
npm run docker:build
npm run docker:composeExamples
Create with All Options
npx create-forge my-app --template react --package-manager pnpm --yesCustom Output Directory
npx create-forge my-app --out-dir ./projects/my-appAdd Packages to Existing Project
cd my-project
npx forge add bear --color "#3b82f6"
npx forge add synapse
npx forge add relay
npx forge add forge-auth
npx forge add crucible --scope both
npx forge nuclear user
npx forge nuclear cartForgeStack Packages
| Package | Version | Description |
|---------|---------|-------------|
| @forgedevstack/bear | | UI Component Library |
|
@forgedevstack/synapse | | State Management |
|
@forgedevstack/forge-compass | | Routing |
|
@forgedevstack/forge-form | | Form Management |
|
@forgedevstack/forge-query | | Data Fetching |
|
@forgedevstack/grid-table | | Data Grid |
|
@forgedevstack/relay | | HTTP Client & WebSockets |
|
@forgedevstack/forge-auth | | Authentication & OAuth |
|
@forgedevstack/crucible | | Testing Framework |
|
@forgedevstack/anvil | | Utilities |
|
@forgedevstack/harbor | | Backend Framework |
Documentation
Changelog
See CHANGELOG.md for release history.
License
MIT © ForgeStack
