FffStack.Cli 0.1.2

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet tool install --global FffStack.Cli --version 0.1.2
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local FffStack.Cli --version 0.1.2
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=FffStack.Cli&version=0.1.2
                    
nuke :add-package FffStack.Cli --version 0.1.2
                    

FffStack.Cli

The fff command-line tool for FFF Stack — scaffold code, enforce DDD structure, and manage your project.

Installation

dotnet tool install -g FffStack.Cli

Commands

New project

fff new <name>

Creates a new FFF Stack project with a full DDD directory structure, migrations, dev server, and git repository initialized.

fff new my-app
cd my-app && bun install && bun run demo

Tip: bunx create-fff-app my-app does the same thing without requiring the fff CLI.


Prototype a feature

fff prototype <Name>

Scaffolds a complete vertical slice in one command — Domain stub, in-memory Workflow, API Routes, Form and List FJSX pages. Works immediately with bun run demo without any database setup.

fff prototype Orders

When the domain model is stable, replace the in-memory workflow with D1 queries using fff generate feature.


Generate code

fff generate feature   <Name>      # Domain + Workflows + Endpoints (D1)
fff generate model     <Name>      # Domain type file only
fff generate form      <TypeName>  # Form FJSX from domain record
fff generate edit      <TypeName>  # Edit form FJSX from domain record
fff generate list      <TypeName>  # List/table FJSX from domain record
fff generate page      <Name>      # Server FJSX page
fff generate component <Name>      # Client component + FJSX file
fff generate migration <desc>      # SQL migration file (auto-numbered)

fff generate form and fff generate list read your domain type definition from Domain/ and infer input types automatically:

Field name / F# type Generated input
email <input type="email">
body, description, notes <textarea>
bool <input type="checkbox">
int, float <input type="number">
*At, *Date, date <input type="date">
Discriminated Union <select> with options
id, createdAt, slug skipped

Inspect & validate

fff routes                 # Colour-coded list of all registered HTTP routes
fff check                  # Validate DDD layer dependencies (CI-ready)
fff context                # Bounded context map + cross-context violation check
fff context --mermaid      # Output Mermaid graph definition for docs
fff doctor                 # Project health check
fff openapi                # Generate openapi.yaml from route definitions
fff openapi -o api.yaml    # Write to a specific path

fff check catches layer violations and exits with a non-zero code, making it suitable for CI:

✗ Domain/Orders/Order.fs:12 — forbidden import 'open FffStack.Server'
✗ Domain/Users/User.fs:8 — Domain/Users imports Domain/Posts — use Anti-Corruption Layer
2 violation(s) found.

fff doctor checks .NET SDK, Bun, Wrangler versions, missing Server.fsproj entries, undeclared env vars, and migration status.


Database migrations

fff migrate               # Apply pending migrations (local D1)
fff migrate --remote      # Apply to production D1
fff migrate:status        # Show pending / applied status

DDD Layer Rules

FFF Stack enforces a strict three-layer architecture:

Domain/       Pure types — no side effects, no IO
Workflows/    Business logic — orchestrates Domain, accesses D1/R2
Endpoints/    HTTP layer — calls Workflows, renders pages

fff check validates:

  • Domain/ must not open FffStack.Server or make DB calls
  • Domain/<A>/ must not import from Domain/<B>/ (bounded context isolation)
  • Workflows/ must not import from Endpoints/
  • Endpoints/ should call Workflows; direct DB calls trigger a warning

License

MIT

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated