CLI tool for fnd-platform monorepo scaffolding
npm install @fnd-platform/cliCommand-line interface for fnd-platform projects.
``bashGlobal installation (recommended)
pnpm add -g @fnd-platform/cli
Commands
$3
Create a new fnd-platform monorepo project.
`bash
fnd new my-app
`Arguments:
| Argument | Description |
| -------- | ---------------------------------------------------------------------------- |
|
name | Project name (lowercase alphanumeric with hyphens, must start with a letter) |Options:
| Option | Default | Description |
| ------------------------ | ------- | ----------------------------------------- |
|
--package-manager | pnpm | Package manager to use (pnpm or yarn) |
| --no-git | - | Skip git repository initialization |
| --no-install | - | Skip dependency installation |Examples:
`bash
Create a new project with defaults
fnd new my-saas-appCreate without installing dependencies
fnd new my-app --no-installCreate with yarn instead of pnpm
fnd new my-app --package-manager yarnCreate without git initialization
fnd new my-app --no-git
`$3
Synthesize project configuration using Projen. Run this after modifying
.projenrc.ts to regenerate configuration files.`bash
fnd synth
`Options:
| Option | Description |
| --------- | --------------------------------------------------------- |
|
--watch | Watch for changes and re-synthesize (not yet implemented) |$3
Build all packages using NX.
`bash
fnd build
`Options:
| Option | Description |
| ------------------ | ----------------------------- |
|
--skip-cache | Skip NX cache (force rebuild) |
| --parallel | Number of parallel tasks |
| --package | Build specific package only |Examples:
`bash
Build all packages
fnd buildBuild without cache
fnd build --skip-cacheBuild with limited parallelism
fnd build --parallel 2Build specific package
fnd build --package api
`$3
Add a package to an existing project. Modifies
.projenrc.ts with the new package configuration.Subcommands:
####
fnd add apiAdd a Lambda API package.
`bash
fnd add api --name=api
`| Option | Default | Description |
| ----------------- | ----------------- | -------------------------------- |
|
--name | required | Package name |
| --outdir | packages/ | Output directory |
| --no-dynamodb | - | Disable DynamoDB integration |
| --no-cognito | - | Disable Cognito auth integration |####
fnd add frontendAdd a Remix frontend package (requires API package).
`bash
fnd add frontend --name=frontend --api=api
`| Option | Default | Description |
| ----------------- | ----------------- | ---------------------------------- |
|
--name | required | Package name |
| --api | required | API package name to link |
| --outdir | packages/ | Output directory |
| --no-auth | - | Disable authentication integration |
| --port | 3000 | Development server port |
| --theme | zinc | shadcn/ui theme color |####
fnd add cmsAdd a CMS admin package (requires API package).
`bash
fnd add cms --name=cms --api=api
`| Option | Default | Description |
| ----------------------------- | ----------------- | ---------------------------------- |
|
--name | required | Package name |
| --api | required | API package name to link |
| --outdir | packages/ | Output directory |
| --port | 3001 | Development server port |
| --no-media-upload | - | Disable media upload features |
| --rich-text-editor | tiptap | Rich text editor (tiptap\|lexical) |
| --theme | zinc | shadcn/ui theme color |####
fnd add component-libraryAdd a component library package with Storybook.
`bash
fnd add component-library --name=ui
`| Option | Default | Description |
| ----------------- | ----------------- | ------------------------- |
|
--name | required | Package name |
| --outdir | packages/ | Output directory |
| --port | 6006 | Storybook dev server port |Quick Start
`bash
Create a new project
fnd new my-saas-appNavigate to project
cd my-saas-appModify .projenrc.ts if needed, then regenerate
fnd synthBuild all packages
fnd buildAdd packages to an existing project
fnd add api --name=api
fnd add frontend --name=frontend --api=api
fnd add cms --name=cms --api=apiDeploy (coming in Phase 8)
fnd deploy --stage=dev
`Project Name Requirements
Project names must:
- Start with a lowercase letter
- Contain only lowercase letters, numbers, and hyphens
- Match pattern:
/^[a-z][a-z0-9-]*$/Valid examples:
my-app, saas-platform, app123Invalid examples:
MyApp, 123-app, my_app`- Node.js 20+
- pnpm 8+ (or yarn)
- Git (optional, for repository initialization)
See the full API documentation for detailed type definitions and examples.
- @fnd-platform/core - Core Projen project classes
- CLI Commands Reference - Detailed command documentation
MIT