Skip to content

Installation

ronak parmar edited this page Mar 24, 2026 · 2 revisions

Installation


Requirements

Requirement Minimum version
Node.js 20.x or later
npm 10.x or later
pnpm (optional) 9.x or later

Note: Foundation CLI itself is a Node.js tool. If your project includes a Python backend (FastAPI or Django), Python 3.11+ must also be available on your PATH for the package installation step to complete.


Option 1 — No Install (Recommended for first use)

Run Foundation CLI directly with npx or pnpm dlx. No global installation required.

# npm
npx @systemlabs/foundation-cli create

pnpm

pnpm dlx create-foundation-app

This always pulls the latest published version.


Option 2 — Global Install

Install once, use everywhere. Gives you the foundation command globally.

# npm
npm install -g @systemlabs/foundation-cli

pnpm

pnpm add -g @systemlabs/foundation-cli

Verify the installation:

foundation --version
# 0.3.0

Running the CLI

Create a new project

# Interactive mode (recommended)
foundation create

With a project name pre-filled

foundation create my-app

Non-interactive mode using an archetype preset

foundation create my-app --preset saas foundation create my-api --preset api-backend

Available preset values: saas, ai-app, ecommerce, crm, dashboard, api-backend, internal-tool

Add an integration to an existing project

cd my-existing-foundation-project
foundation add stripe
foundation add redis
foundation add openai

Other commands

foundation --help           # show all commands
foundation create --help    # show flags for a specific command

CI / Non-Interactive Mode

When running in a CI environment, pass --preset to skip prompts entirely:

foundation create test-project --preset saas --ci

The --ci flag suppresses interactive prompts and uses archetype defaults. Pair it with --allow-experimental if your preset includes experimental modules:

foundation create test-project --preset saas --ci --allow-experimental

Verifying a Generated Project

After generation, Foundation CLI prints the exact commands to get your project running:

cd my-app
cp .env.example .env       # fill in your credentials
docker-compose up -d       # if Docker was selected
npm run dev                # start the development server

Updating

# npm global install — update to latest
npm update -g @systemlabs/foundation-cli

pnpm

pnpm update -g @systemlabs/foundation-cli

To upgrade modules inside an existing Foundation project (reads .foundation/project.lock):

cd my-app
foundation upgrade

Uninstalling

# npm
npm uninstall -g @systemlabs/foundation-cli

pnpm

pnpm remove -g @systemlabs/foundation-cli

Clone this wiki locally