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

# Workspace Generator

> Scaffold a full FrontMCP Nx monorepo with apps/, libs/, and servers/ directories

Scaffolds a complete FrontMCP Nx monorepo with pre-configured tooling, dependencies, and directory structure.

## Usage

```bash theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
nx g @frontmcp/nx:workspace my-platform
```

Or via the CLI shortcut:

```bash theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
npx frontmcp create my-platform --nx
```

## Options

| Option            | Type                               | Default | Description                                                                           |
| ----------------- | ---------------------------------- | ------- | ------------------------------------------------------------------------------------- |
| `name`            | `string`                           | —       | **Required.** The name of the workspace                                               |
| `packageManager`  | `npm` \| `yarn` \| `pnpm` \| `bun` | `npm`   | Package manager to use                                                                |
| `skipInstall`     | `boolean`                          | `false` | Skip package installation                                                             |
| `skipGit`         | `boolean`                          | `false` | Skip git initialization. When `false`, runs `git init` and creates an initial commit. |
| `createSampleApp` | `boolean`                          | `true`  | Create a sample demo application                                                      |

## Generated Files

```
my-platform/
├── apps/                    # FrontMCP applications (with sample demo app if enabled)
├── libs/                    # Shared libraries
├── servers/                 # Deployment shells
├── nx.json                  # Nx workspace configuration
├── tsconfig.base.json       # Shared TypeScript config
├── package.json             # Dependencies and scripts
├── README.md
├── AGENTS.md                # AI agent guidance
├── CLAUDE.md                # Claude Code project instructions
├── .cursorrules             # Cursor editor rules
├── .mcp.json
├── .nvmrc
├── .gitignore
└── .prettierrc
```

## Example

```bash theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
nx g @frontmcp/nx:workspace my-platform --packageManager yarn --createSampleApp
```

The `package.json` includes all FrontMCP dependencies:

```json theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
{
  "dependencies": {
    "@frontmcp/sdk": "...",
    "frontmcp": "...",
    "reflect-metadata": "^0.2.2",
    "zod": "^4.0.0"
  },
  "devDependencies": {
    "@frontmcp/nx": "...",
    "@frontmcp/testing": "...",
    "nx": "22.6.4",
    "typescript": "~5.9.2"
  }
}
```

The `nx.json` configures plugins for TypeScript, ESLint, and Jest with build caching and dependency ordering.
