> For the complete documentation index, see [llms.txt](https://docs.onepub.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onepub.dev/guides/package-dependencies/the-hard-way.md).

# The hard way

We recommend you use the [`onepub pub add`](/guides/package-dependencies.md) command to add a dependency. However, you can also add the dependency by hand.

#### Manually configure a OnePub dependency

The onepub pub add command simply adds a hosted dependency to your pubspec.yaml which of course you can also do manually (but why would you?).

For each private package that your project depends on, you can add a hosted key.

Copy the 'publish\_to' URL from your OnePub profile page:

![](https://2164893338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJazaE7yAHIXZjE9ucSqu%2Fuploads%2FFPZFIz2iKFDnGyPhypP8%2Fimage.png?alt=media\&token=ff772f80-1384-4113-8703-8d039593c8dd)

Now paste it into the 'hosted' key for the package.

```yaml
dependencies: 
  my_private_package:
    version: 1.0.2
    hosted: https://onepub.dev/api/xxxxxxxx
```

{% hint style="danger" %}
If your dart version is older than 2.15, then you must use the older hosted format.
{% endhint %}

```yaml
dependencies: 
  my_private_package:
    version: 1.0.2
    hosted: 
      name: my_private_package
      url: https://onepub.dev/api/xxxxx
```
