aboutsummaryrefslogtreecommitdiff
path: root/docs/cli/install.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/cli/install.md')
-rw-r--r--docs/cli/install.md20
1 files changed, 14 insertions, 6 deletions
diff --git a/docs/cli/install.md b/docs/cli/install.md
index 9aafae301..3a60fb054 100644
--- a/docs/cli/install.md
+++ b/docs/cli/install.md
@@ -142,7 +142,20 @@ This will add the following to your `package.json`:
}
```
-To install a package globally:
+To view a complete list of options for this command:
+
+```bash
+$ bun add --help
+```
+
+## `bun add --global`
+
+{% callout %}
+**Note** — This would not modify package.json of your current project folder.
+**Alias** - `bun add --global`, `bun add -g`, `bun install --global` and `bun install -g`
+{% /callout %}
+
+To install a package globally, use the `-g`/`--global` flag. This will not modify the `package.json` of your current project. Typically this is used for installing command-line tools.
```bash
$ bun add --global cowsay # or `bun add -g cowsay`
@@ -169,11 +182,6 @@ globalBinDir = "~/.bun/bin"
```
{% /details %}
-To view a complete list of options for a given command:
-
-```bash
-$ bun add --help
-```
## `bun remove`