Dependency Commands
dcr add <name> [source]
Adds a dependency to dcr.toml.
dcr add fmt # registry lookup
dcr add mylib ../path/to/lib # path as source
dcr add mylib path:./lib # explicit path prefix
dcr add mylib git:https://github.com/user/repo # explicit git prefix
dcr add mylib github:user/repo # GitHub shorthand
dcr add mylib gitlab:user/repo # GitLab shorthand
Source prefixes:
path:— local pathgit:— generic git URLgithub:— expands tohttps://github.com/<user>/<repo>gitlab:— expands tohttps://gitlab.com/<user>/<repo>http:///https:///git@— full URL
Flags:
--branch <name>— git branch--tag <name>— git tag--rev <hash>— git commit
If source is omitted — DCR searches connected registries.
dcr tree
Displays the project dependency tree.
dcr tree
Example output:
my-app v0.1.0
├── fmt (registry)
│ └── spdlog (registry)
└── catch2 (registry)
For path dependencies, recursively shows their own dependencies (from their dcr.toml).