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

# Create Project

> Create a new SwiftUI-based Xcode project

Create a new Xcode project using FlowDeck's built-in SwiftUI template. A single multi-platform app target covers iOS, macOS, tvOS, and visionOS (via XcodeGen `supportedDestinations`), depending on the SDKs installed in Xcode. watchOS is handled separately — see [watchOS apps](#watchos-apps) below.

```bash theme={null}
# Create an iOS project in the current directory
flowdeck project create MyApp

# Create the project in a specific directory
flowdeck project create MyApp --path ~/Projects

# Create a multi-platform project (iOS, macOS, tvOS, visionOS share one target)
flowdeck project create MyApp --platforms ios,macos,visionos

# Create a standalone watchOS app
flowdeck project create MyWatchApp --platforms watchos

# Create an iOS app with an embedded companion watchOS app
flowdeck project create MyApp --watch-companion

# Set a custom bundle identifier
flowdeck project create MyApp --bundle-id com.acme.MyApp

# Customize deployment targets
flowdeck project create MyApp --ios-target 17.0 --macos-target 14.0

# JSON output for automation
flowdeck project create MyApp --json

# Preview generated files without writing them
flowdeck project create MyApp --dry-run --json
```

## Arguments

| Argument | Description              |
| -------- | ------------------------ |
| `<name>` | App name (e.g., `MyApp`) |

## Options

| Option                        | Short | Description                                                                               |
| ----------------------------- | ----- | ----------------------------------------------------------------------------------------- |
| `--bundle-id <id>`            | `-b`  | Bundle identifier (default: `com.example.<name>`)                                         |
| `--platforms <list>`          |       | Comma-separated platforms: `ios`, `macos`, `tvos`, `watchos`, `visionos` (default: `ios`) |
| `--path <path>`               | `-o`  | Output directory (default: current directory)                                             |
| `--ios-target <version>`      |       | iOS deployment target (default: 26.0)                                                     |
| `--macos-target <version>`    |       | macOS deployment target (default: 26.0)                                                   |
| `--tvos-target <version>`     |       | tvOS deployment target (default: 26.0)                                                    |
| `--watchos-target <version>`  |       | watchOS deployment target (default: 26.0)                                                 |
| `--visionos-target <version>` |       | visionOS deployment target (default: 26.0)                                                |
| `--watch-companion`           |       | Add an embedded companion watchOS app (requires `ios` in `--platforms`)                   |
| `--dry-run`                   |       | Preview project generation without writing files                                          |
| `--json`                      | `-j`  | Output as JSON                                                                            |

## watchOS apps

A watch app is always its own target — Xcode and XcodeGen do not allow `watchos` as a shared multiplatform destination, so it can't be listed alongside the others in `--platforms`. There are two ways to create one:

* **Standalone watch app** — pass `--platforms watchos` on its own. Runs on Apple Watch without an iPhone app. Set its deployment target with `--watchos-target`.

  ```bash theme={null}
  flowdeck project create MyWatchApp --platforms watchos --watchos-target 11.0
  ```

* **Companion watch app** — pass `--watch-companion` alongside an iOS app. This generates the multi-platform app plus a second, embedded `watchOS` target (bundle id `<bundle-id>.watchkitapp`) that ships inside the iOS app and auto-installs on the paired Watch. It reuses the app's SwiftUI sources, so the same views build for both. `--watch-companion` requires `ios` in `--platforms` (a companion needs an iPhone host) and honors `--watchos-target`.

  ```bash theme={null}
  flowdeck project create MyApp --watch-companion --watchos-target 11.0
  flowdeck project create MyApp --platforms ios,macos --watch-companion   # multi-platform app + companion watch
  ```

<Note>
  Combining `watchos` with other platforms in `--platforms` (e.g. `--platforms ios,watchos`) is rejected. Use `--watch-companion` for a companion, or `--platforms watchos` on its own for a standalone watch app.
</Note>

## JSON Output

```json theme={null}
{
  "success": true,
  "projectPath": "/Users/me/Projects/MyApp",
  "xcodeproj": "/Users/me/Projects/MyApp/MyApp.xcodeproj",
  "bundleIdentifier": "com.example.MyApp",
  "platforms": ["iOS"]
}
```

With `--watch-companion`, the embedded watch app is reported in `platforms` as `"watchOS (Companion)"` alongside the app's destinations (e.g. `["iOS", "watchOS (Companion)"]`).
