Skip to main content
To install an npm package under an alias:
terminal
bun add my-custom-name@npm:zod

The zod package can now be imported as my-custom-name.
https://mintcdn.com/bun-1dd33a4e-claude-bun-git-module/aYd6IH1DX0gD-k_I/icons/typescript.svg?fit=max&auto=format&n=aYd6IH1DX0gD-k_I&q=85&s=49fc2d2e9587ce2222ea6cc2b60db513index.ts
import { z } from "my-custom-name";

z.string();

See Docs > Package manager for complete documentation of Bun’s package manager.