<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "PackageDescription",
  "identifier" : "/documentation/PackageDescription/Package/Dependency/package(path:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "PackageDescription"
    ],
    "preciseIdentifier" : "s:18PackageDescription0A0C10DependencyC7package4pathAESS_tFZ"
  },
  "title" : "package(path:)"
}
-->

# package(path:)

Adds a local dependency to a package located at the path you provide.

```
static func package(path: String) -> Package.Dependency
```

## Parameters

`path`

The file system path to the package.

## Return Value

A package dependency.

## Discussion

If the package you depend on defines traits, the package manager uses the dependency with its default set of traits.

The Swift Package Manager uses the package dependency as-is
and does not perform any source control access. Local package dependencies
are especially useful during development of a new package or when working
on multiple tightly coupled packages.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)