Skip to content

Commit

Permalink
add deps doc page
Browse files Browse the repository at this point in the history
  • Loading branch information
ComradeVanti committed Oct 11, 2024
1 parent 72c0480 commit 6a9bf09
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 6 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,14 @@ openupm view com.my.package
Checkout [the commands doc page](./docs/cmd-view.md) for more information.

### View package dependencies
```
openupm deps <pkg>
```

Using option `--deep` to view dependencies recursively
Use `openupm deps` to print package dependencies.

```sh
openupm deps com.my.package
```
openupm deps <pkg> --deep
```

Checkout [the commands doc page](./docs/cmd-deps.md) for more information.

### Authenticate with a scoped registry

Expand Down
44 changes: 44 additions & 0 deletions docs/cmd-deps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# `openupm deps`

The `deps` command prints the names and versions of dependencies for a package.

The command will first search openupm and then the Unity registry to find the package.

This command has the `dep` alias. On this doc page we will always use the primary command name `deps`.

## Arguments

### Package reference

The name of the package for which you want to resolve dependencies. The general format for a package reference is `name@version`.

```sh
openupm deps com.my.package@1.0.0
```

The version may be a specific version or predefined tag. The `deps` command does not work for url versions. For more information about how the version can be specified checkout the corresponding [help page](./help-package-reference.md).


## Options

### Deep

By default the `deps` command will only resolve and print a packages direct dependencies. If you want to recursively print all dependencies (ie the full dependency tree) you can run with the `--deep` option.

```sh
openupm deps com.my.package --deep
```

### Registry

By default openupm finds packages on the openupm and Unity registries in that order. This behavior is configurable, specifically if you want to work with 3rd party registries.

You can override the primary registry from which to resolve packages using the `--registry` option.

```sh
openupm deps com.my.package --registry https://packages.my.registry
```

### Windows system-user authentication

This command supports Windows system-user authentication. For more information check out the corresponding [article](./help-system-user.md).

0 comments on commit 6a9bf09

Please sign in to comment.