New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@systemlabs/foundation-cli

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@systemlabs/foundation-cli

Foundation CLI — scaffold and configure full-stack applications with modular architecture.

latest
Source
npmnpm
Version
0.3.1
Version published
Weekly downloads
5
150%
Maintainers
1
Weekly downloads
 
Created
Source

@systemlabs/foundation-cli

Scaffold production-ready full-stack projects in under 3 minutes.

npx @systemlabs/foundation-cli create my-app

Foundation CLI is a dependency-aware project assembler. You describe your intent — "I want a SaaS with Next.js, Express, PostgreSQL, and JWT auth" — and the engine resolves the full dependency graph, merges configurations without conflicts, injects integration code, and produces a working project.

It is NOT:

  • A static template copier (like create-next-app or degit)
  • A code scaffolding tool (like Yeoman or Hygen)
  • A deployment tool — it generates deployment config, not deploy artifacts

Quick start

# One-shot, no install needed
npx @systemlabs/foundation-cli

# Or install globally
npm install -g @systemlabs/foundation-cli
foundation create my-app

Example session

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  FOUNDATION CLI  ·  Build your architecture in minutes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

? Project name › my-saas-app
? What are you building?
❯ SaaS Application
  AI Application
  E-commerce
  API Backend
  Internal Tool

? Frontend framework   › Next.js
? Backend             › Express
? Database            › PostgreSQL
? ORM                 › Prisma
? Auth                › JWT
? UI system           › Tailwind + ShadCN
? Deployment          › Docker

✔ Files staged (47 files)
✔ npm packages installed

🎉 my-saas-app is ready.  cd my-saas-app && npm run dev

Commands

Create

foundation create [project-name]        # interactive
foundation new [project-name]           # alias
foundation create my-app --preset saas  # non-interactive / CI mode

Available presets: saas, ai-app, ecommerce, api-backend, internal-tool

Module management

foundation add orm-prisma               # add a built-in module
foundation add stripe                   # add an official add-on
foundation add foundation-plugin-redis  # add a community plugin

foundation switch orm prisma            # swap the active ORM
foundation switch backend nestjs        # swap the active backend
foundation switch database mongodb      # swap the active database

foundation search <query>               # search the plugin registry on npm

Code generation

foundation generate model Post          # interactive field prompts → ORM schema
foundation generate crud Post           # model + service + controller + routes
foundation generate --list              # list all available generators

Project inspection

foundation info                         # stack summary, modules, ORM, plugins
foundation doctor                       # health checks: Node version, env vars, compatibility
foundation validate                     # validate project.lock and foundation.config.json

Dev automation

foundation dev                          # delegates to npm run dev
foundation test                         # delegates to npm run test

foundation db migrate                   # npm run db:migrate / alembic upgrade head
foundation db seed                      # npm run db:seed
foundation db reset                     # npm run db:reset
foundation db studio                    # Prisma Studio (Prisma only)
foundation db push                      # Prisma db push (Prisma only)

Tooling

foundation eject [module-id]            # copy module files into your project
foundation upgrade [--dry-run]          # upgrade modules via the lockfile
foundation create-plugin [name]         # scaffold a new plugin package

AI assistant (optional — requires API key)

foundation ai "create a blog with posts, comments, and JWT auth"

Requires ANTHROPIC_API_KEY or OPENAI_API_KEY in your environment. The CLI sends your prompt to the model with the full module catalogue, receives a structured plan, and runs foundation add + foundation generate automatically.

Available modules

Frontend

Next.js · React + Vite · Vue 3 · Svelte

Backend

Express · NestJS · FastAPI · Django

Database

PostgreSQL · MySQL · MongoDB · SQLite · Supabase

ORM

Prisma · TypeORM · Mongoose · SQLAlchemy

Auth

JWT · OAuth (Google + GitHub) · Session · Clerk · Auth0

UI

Tailwind CSS · ShadCN/UI · Material UI · Chakra UI · Bootstrap

State

Zustand · Redux Toolkit · TanStack Query

Deployment

Docker · Vercel · Render · AWS ECS

Official add-ons

Stripe · Redis · OpenAI

How it works

Every project generation runs through a four-stage pipeline:

  • Module Registry — loads, validates, and indexes all built-in and plugin modules
  • Dependency Resolver — builds a DAG of selected modules, detects conflicts, topologically sorts
  • Composition Planner — merges file trees and config patches before touching disk
  • Execution Pipeline — renders EJS templates, writes files atomically via FileTransaction, runs 14 lifecycle hooks, installs packages

All file writes are staged to a temp directory and committed atomically. Any failure rolls back completely — no partial scaffolds.

Configuration files

After generation, your project contains:

.foundation/
├── project.lock            ← exact module + CLI versions (read by upgrade, switch, info, doctor)
└── foundation.config.json  ← user selections + installed plugins (read by add, switch, generate, eject)

Requirements

  • Node.js ≥ 18
  • npm, pnpm, or yarn

Part of the Foundation CLI ecosystem

PackageDescription
@systemlabs/foundation-cli← you are here — user-facing CLI
@systemlabs/foundation-coreEngine: dependency resolver, composition planner, file transaction
@systemlabs/foundation-modulesAll built-in modules (frontend, backend, database, auth, …)
@systemlabs/foundation-plugin-sdkPlugin contract, types, manifest schema
@systemlabs/foundation-testingTest utilities for module and plugin authors

License

MIT — see LICENSE

Keywords

cli

FAQs

Package last updated on 25 Mar 2026

Related posts