Typorithm · medium

bun pm & Linking

bun-pm-commandsbunbun-pmlinkingglobal
Saved on this device
Full lesson · 8 learning steps Open any exercise for focused practice
1

Step 1 of 8 · intro card

Learn bun pm & Linking

0%

Package Manager

bun pm ls lists installed packages and bun pm cache rm clears the cache. bun link registers a local package, then bun link <pkg> symlinks it into another project for local development. bun update and bun remove manage deps, and bun add -g installs globally.

bun pm is the package-management subcommand: bun pm ls prints the installed dependency tree, and bun pm cache rm empties Bun's global cache to force clean re-downloads.

For local development, run bun link inside a package to register it globally, then bun link <pkg> in another project to symlink that package in — edits are picked up without republishing.

Day-to-day maintenance uses bun update to bump dependencies, bun remove to delete one, and bun add -g to install a package globally so its CLI is on your PATH.

01

bun pm ls lists installed deps; bun pm cache rm clears the cache.

02

bun link registers a package; bun link <pkg> consumes it.

03

bun update bumps deps, bun remove deletes, bun add -g installs globally.

bun pm ls
bun pm cache rm
bun link
bun link my-lib
bun add -g typescript

Read the implementation

Connect each part of the code to the concept before you type.

1. List installed

bun pm ls prints the installed dependency tree for the current project.

bun pm ls

2. Clear cache

bun pm cache rm clears Bun's global package cache to force fresh downloads.

bun pm cache rm

3. Register a local package

Running bun link inside a package registers it globally so other projects can link to it.

bun link

4. Link into a project

bun link <pkg> symlinks a previously registered local package into the current project.

bun link my-lib

5. Global install

bun add -g installs a package globally so its CLI is available everywhere.

bun add -g typescript

A complete learning loop

01

Understand

Read the concept map and follow the code breakdown.

02

Reconstruct

Type the implementation, repair mistakes and work through every recall exercise.

03

Verify

Use the final check without hints; revisit weak concepts in short practice sessions.

bun pm & Linking: Lesson & Practice · Typorithm | ApplyDjinn