> ## Documentation Index
> Fetch the complete documentation index at: https://docs.forest.app/llms.txt
> Use this file to discover all available pages before exploring further.

# forest start

> Go from an empty terminal to a running Forest back-office in one command

# forest start

Set up Forest from scratch: log in, create a project, start its back-end locally, and give your coding agent the Forest skills to build on it. `forest start` chains other CLI commands and prints each one before running it, so every step stays visible and reproducible by hand.

## Usage

```bash theme={null}
npm install -g forest-cli
forest start [options]
```

## Options

| Option | Description |
| - | - |
| `--flow` | How Forest runs: `demo`, `standalone` or `inapp`. Skips the first question. A non-interactive run defaults to `demo` |
| `--name` | Project name. Skips the name prompt. Not used by the `demo` flow, which picks a free `forest-demo-xxxx` name |
| `--db` | Database connection URL, for the `standalone` flow. Skips the database prompts |
| `--schema` | Database schema, with `--db`. Default `public` |
| `--stack` | Stack of your application, for the `inapp` flow: `rails` or `node` |
| `--mount` | How to mount Forest in a Node.js application: `ai` (with your coding agent), `manual` (code snippet) or `standalone` (switch to the `standalone` flow) |
| `--dry-run` | Print every command instead of running it |

## Flows

`forest start` first logs you in with [`forest login`](https://docs.forest.app/reference/cli/login) (skipped when a session is active), then asks how you want to run Forest.

| Flow | For | Steps |
| - | - | - |
| `demo` | Trying Forest on sample data, with no database | [`projects:create:demo`](https://docs.forest.app/reference/cli/projects-create-demo) in TypeScript on port 3310, `npm install` and build, start the back-end, then [`layout:apply --with-workflows`](https://docs.forest.app/reference/cli/layout-apply) to load the curated layout and workflows |
| `standalone` | A Node.js back-end generated on your SQL database | [`projects:create:sql`](https://docs.forest.app/reference/cli/projects-create-sql), `npm install` and build, start the back-end |
| `inapp` with `--stack rails` | Mounting Forest in your Rails application | [`projects:create:in-app`](https://docs.forest.app/reference/cli/projects-create-in-app) on port 3002, `bundle add` of the five Forest gems, `bin/rails g forest_admin_rails:install`, then `bin/rails server -p 3002` |
| `inapp` with `--stack node` | Mounting Forest in your Node.js application (Express, NestJS, Fastify, Koa) | [`projects:create:in-app`](https://docs.forest.app/reference/cli/projects-create-in-app) on port 3001, `npm install @forestadmin/agent` and the datasource package matching your ORM, mount the agent, then `npm start` |

Each flow waits for the back-end to start and send its schema to Forest before going further.

The `standalone` and `demo` flows generate the project in a new directory. The `inapp` flows run in your application's directory: run `forest start` from its root. For Node.js, the CLI writes `FOREST_ENV_SECRET` and `FOREST_AUTH_SECRET` to the `.env` file, without overwriting values already set there.

## After the back-end starts

In an interactive terminal, `forest start` keeps the back-end running and offers next steps:

* **Demo**: create a real project on your own database, keep exploring, or stop.
* **Other flows**: install the Forest skills for your coding agent with [`forest skills:init`](https://docs.forest.app/reference/cli/skills-init), deploy to production through your coding agent, open the documentation, or keep exploring.

## Requirements

* Node.js 18 or later
* macOS or Linux. On Windows, run `forest start` in WSL
* For the `inapp` Rails flow: Bundler and a Rails application

## Examples

```bash theme={null}
# Pick a flow interactively
forest start

# Try Forest on sample data
forest start --flow demo

# Generate a back-end on your PostgreSQL database
forest start --flow standalone --name my-back-office --db "postgres://user:password@localhost:5432/shop"

# Mount Forest in an existing Rails application
forest start --flow inapp --stack rails --name my-app

# Review every command of a flow without running anything
forest start --flow standalone --dry-run
```

> [!NOTE]
>
> In the commands it shows, `forest start` replaces your database URL and your environment secret with `<redacted>`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.