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

# Swift Packages

> Manage Swift Package Manager dependencies

Commands for managing Swift Package Manager (SPM) dependencies in your Xcode project.

## flowdeck project packages list

List packages (direct and transitive).

```bash theme={null}
flowdeck project packages list
flowdeck project packages list --json
flowdeck project packages list --verbose
```

### Options

| Option               | Short | Description                  |
| -------------------- | ----- | ---------------------------- |
| `--project <path>`   | `-p`  | Project directory            |
| `--workspace <path>` | `-w`  | Path to workspace or project |
| `--json`             | `-j`  | Output as JSON               |
| `--verbose`          | `-v`  | Show detailed output         |

***

## flowdeck project packages add

Add a package dependency.

```bash theme={null}
# Remote package
flowdeck project packages add https://github.com/Alamofire/Alamofire.git \
  --kind upToNextMajor --value 5.0.0

# Local package
flowdeck project packages add ../MyLocalPackage
```

### Options

| Option               | Short | Description                                            |
| -------------------- | ----- | ------------------------------------------------------ |
| `--kind <type>`      | `-k`  | Version rule type (required for remote packages)       |
| `--value <value>`    | `-V`  | Version/branch/revision (required for remote packages) |
| `--project <path>`   | `-p`  | Project directory                                      |
| `--workspace <path>` | `-w`  | Path to workspace or project                           |
| `--json`             | `-j`  | Output as JSON                                         |
| `--verbose`          | `-v`  | Show detailed output                                   |

Supported rule types: `upToNextMajor`, `upToNextMinor`, `exact`, `branch`, `revision`.

***

## flowdeck project packages remove

Remove a package dependency by identity or URL.

```bash theme={null}
flowdeck project packages remove alamofire
flowdeck project packages remove https://github.com/Alamofire/Alamofire.git
```

### Options

| Option               | Short | Description                  |
| -------------------- | ----- | ---------------------------- |
| `--project <path>`   | `-p`  | Project directory            |
| `--workspace <path>` | `-w`  | Path to workspace or project |
| `--json`             | `-j`  | Output as JSON               |
| `--verbose`          | `-v`  | Show detailed output         |

***

## flowdeck project packages resolve

Resolve package dependencies without updating to newer versions.

```bash theme={null}
flowdeck project packages resolve
flowdeck project packages resolve --scheme MyApp
```

### Options

| Option                       | Short | Description                                                                    |
| ---------------------------- | ----- | ------------------------------------------------------------------------------ |
| `--project <path>`           | `-p`  | Project directory                                                              |
| `--workspace <path>`         | `-w`  | Path to workspace or project                                                   |
| `--scheme <name>`            | `-s`  | Scheme name                                                                    |
| `--derived-data-path <path>` |       | Custom derived data path (default: `~/Library/Developer/FlowDeck/DerivedData`) |
| `--json`                     | `-j`  | Output as JSON                                                                 |
| `--verbose`                  | `-v`  | Show detailed xcodebuild output                                                |

***

## flowdeck project packages update

Update packages (clears cache and re-resolves).

```bash theme={null}
flowdeck project packages update
flowdeck project packages update --scheme MyApp
```

### Options

| Option                       | Short | Description                                                                    |
| ---------------------------- | ----- | ------------------------------------------------------------------------------ |
| `--project <path>`           | `-p`  | Project directory                                                              |
| `--workspace <path>`         | `-w`  | Path to workspace or project                                                   |
| `--scheme <name>`            | `-s`  | Scheme name                                                                    |
| `--derived-data-path <path>` |       | Custom derived data path (default: `~/Library/Developer/FlowDeck/DerivedData`) |
| `--json`                     | `-j`  | Output as JSON                                                                 |
| `--verbose`                  | `-v`  | Show detailed xcodebuild output                                                |

***

## flowdeck project packages clear

Clear the Swift package cache (SourcePackages).

```bash theme={null}
flowdeck project packages clear
```

### Options

| Option                       | Short | Description                                                                    |
| ---------------------------- | ----- | ------------------------------------------------------------------------------ |
| `--project <path>`           | `-p`  | Project directory                                                              |
| `--workspace <path>`         | `-w`  | Path to workspace or project                                                   |
| `--derived-data-path <path>` |       | Custom derived data path (default: `~/Library/Developer/FlowDeck/DerivedData`) |
| `--json`                     | `-j`  | Output as JSON                                                                 |
| `--verbose`                  | `-v`  | Show detailed output                                                           |

***

## flowdeck project packages link

Link package products to a target.

```bash theme={null}
flowdeck project packages link https://github.com/apple/swift-collections \
  --target MyApp --products Collections,DequeModule
```

### Options

| Option               | Short | Description                      |
| -------------------- | ----- | -------------------------------- |
| `--target <name>`    | `-t`  | Target name to link products to  |
| `--products <list>`  |       | Comma-separated products to link |
| `--project <path>`   | `-p`  | Project directory                |
| `--workspace <path>` | `-w`  | Path to workspace or project     |
| `--json`             | `-j`  | Output as JSON                   |
| `--verbose`          | `-v`  | Show detailed output             |
