aboutsummaryrefslogtreecommitdiff
path: root/docs/install/utilities.md
diff options
context:
space:
mode:
authorGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-04-13 18:26:45 -0700
committerGravatar GitHub <noreply@github.com> 2023-04-13 18:26:45 -0700
commit011e157cac7698050370e24495a9002dacfceea9 (patch)
treeebb561dbda3e8f67302cc4d5b398f4a2744f7884 /docs/install/utilities.md
parent0cc56e8efce9c7d4905b3649827bf9b40a677b25 (diff)
downloadbun-011e157cac7698050370e24495a9002dacfceea9.tar.gz
bun-011e157cac7698050370e24495a9002dacfceea9.tar.zst
bun-011e157cac7698050370e24495a9002dacfceea9.zip
Docs restructuring (#2638)
* Restructure * Update nav * Reorg * Reshuffle ecosystem pages * Split up runtime/runtime * Back to runtime/index * Fix issue * Split up runtime/index * Add Writing Tests page * Prettier matcher table * More updates
Diffstat (limited to 'docs/install/utilities.md')
-rw-r--r--docs/install/utilities.md58
1 files changed, 58 insertions, 0 deletions
diff --git a/docs/install/utilities.md b/docs/install/utilities.md
new file mode 100644
index 000000000..689f177d8
--- /dev/null
+++ b/docs/install/utilities.md
@@ -0,0 +1,58 @@
+The `bun pm` command group provides a set of utilities for working with Bun's package manager.
+
+To print the path to the `bin` directory for the local project:
+
+```bash
+$ bun pm bin
+/path/to/current/project/node_modules/.bin
+```
+
+To print the path to the global `bin` directory:
+
+```bash
+$ bun pm bin -g
+<$HOME>/.bun/bin
+```
+
+To print a list of installed dependencies in the current project and their resolved versions, excluding their dependencies.
+
+```bash
+$ bun pm ls
+/path/to/project node_modules (135)
+├── eslint@8.38.0
+├── react@18.2.0
+├── react-dom@18.2.0
+├── typescript@5.0.4
+└── zod@3.21.4
+```
+
+To print all installed dependencies, including nth-order dependencies.
+
+```bash
+$ bun pm ls --all
+/path/to/project node_modules (135)
+├── @eslint-community/eslint-utils@4.4.0
+├── @eslint-community/regexpp@4.5.0
+├── @eslint/eslintrc@2.0.2
+├── @eslint/js@8.38.0
+├── @nodelib/fs.scandir@2.1.5
+├── @nodelib/fs.stat@2.0.5
+├── @nodelib/fs.walk@1.2.8
+├── acorn@8.8.2
+├── acorn-jsx@5.3.2
+├── ajv@6.12.6
+├── ansi-regex@5.0.1
+├── ...
+```
+
+To print the path to Bun's global module cache:
+
+```bash
+$ bun pm cache
+```
+
+To clear Bun's global module cache:
+
+```bash
+$ bun pm cache rm
+```