Typorithm · easy

bun install & run

bun-install-runbuninstallpackagesruntime
Saved on this device
Full lesson · 8 learning steps Open any exercise for focused practice
1

Step 1 of 8 · intro card

Learn bun install & run

0%

bun CLI

Bun is a drop-in faster npm: bun install for deps, bun add for packages (-d for dev), bun run for scripts, and bun index.ts to execute TypeScript with zero build step.

Bun is an all-in-one JavaScript and TypeScript toolkit whose package manager is a near drop-in replacement for npm, only much faster.

bun install resolves and installs dependencies; bun add <pkg> adds one and updates package.json, with -d for dev-only packages.

bun run <script> runs a package.json script, and bun index.ts executes a TypeScript file directly with no separate compile step.

01

bun install replaces npm install, much faster.

02

bun add <pkg> adds deps; -d for devDependencies.

03

bun index.ts runs TypeScript with no build step.

bun install
bun add zod
bun add -d typescript
bun run dev
bun index.ts

Read the implementation

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

1. Install deps

bun install reads package.json and installs every dependency, far faster than npm install.

bun install

2. Add a package

bun add <pkg> installs a runtime dependency and writes it to package.json.

bun add zod

3. Dev dependency

-d (or --dev) records the package under devDependencies.

bun add -d typescript

4. Run a script

bun run <script> executes the matching script from package.json, like npm run.

bun run dev

5. Run TS directly

bun runs TypeScript files directly — no tsc, no build step, no config.

bun index.ts

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 install & run: Lesson & Practice · Typorithm | ApplyDjinn