bun Verified current stable Not installed? Package Management

Bun / Install From Local File Or Directory

Install From Local File Or Directory

Easily install packages from local files or directories using the Bun CLI with this command.

$
Terminal
bun add file:<path/to/file_or_directory>

When To Use

Use this command to install a package from a local file or directory.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
bun add file:<path/to/file_or_directory>

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
Installing package from file:path/to/file_or_directory...
Package installed successfully!

Command Breakdown

What each part is doing

bun
Base Command
The executable that performs this operation. Here it runs Bun before the shell applies any redirect operators.
<path/to/file_or_directory>
Input Files
The file path or paths supplied to this command.

How To Run

Execution path

  1. Step 1

    Run the command: `bun add file:path/to/file_or_directory`

  2. Step 2

    Check the installed packages with: `bun list`

Alternative Approaches

Comparable commands in other tools

Alternative package management tools for the same job.