Files
bun.sh/docs/guides/install/add-git.md
Colin McDonnell 404b90badc Add ecosystem guides (#3847)
* Add ecosystem guides

* Update titles

* Rename stric

* Add unlink and fetch guides

* Add formdata guide

* Tweak title

* Moar
2023-07-31 12:20:23 -07:00

37 lines
694 B
Markdown

---
name: Add a Git dependency
---
Bun supports directly adding GitHub repositories as dependencies of your project.
```sh
$ bun add github:lodash/lodash
```
---
This will add the following line to your `package.json`:
```json-diff#package.json
{
"dependencies": {
+ "lodash": "github:lodash/lodash"
}
}
```
---
Bun supports a number of protocols for specifying Git dependencies.
```sh
$ bun add git+https://github.com/lodash/lodash.git
$ bun add git+ssh://github.com/lodash/lodash.git#4.17.21
$ bun add git@github.com:lodash/lodash.git
$ bun add github:colinhacks/zod
```
---
See [Docs > Package manager](/docs/cli/install) for complete documentation of Bun's package manager.