npx skillsauth add jarle/bun-skills Bun .npmrc supportInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Bun supports loading configuration options from .npmrc files, allowing you to reuse existing registry/scope configurations.
The default registry is used to resolve packages, its default value is npm's official registry (https://registry.npmjs.org/).
To change it, you can set the registry option in .npmrc:
registry=http://localhost:4873/
The equivalent bunfig.toml option is install.registry:
install.registry = "http://localhost:4873/"
@<scope>:registry allows you to set the registry for a specific scope:
@myorg:registry=http://localhost:4873/
The equivalent bunfig.toml option is to add a key in install.scopes:
[install.scopes]
myorg = "http://localhost:4873/"
//<registry_url>/:<key>=<value> allows you to set options for a specific registry:
# set an auth token for the registry
# ${...} is a placeholder for environment variables
//http://localhost:4873/:_authToken=${NPM_TOKEN}
# or you could set a username and password
# note that the password is base64 encoded
//http://localhost:4873/:username=myusername
//http://localhost:4873/:_password=${NPM_PASSWORD}
# or use _auth, which is your username and password
# combined into a single string, which is then base 64 encoded
//http://localhost:4873/:_auth=${NPM_AUTH}
The following options are supported:
_authTokenusername_password (base64 encoded password)_auth (base64 encoded username:password, e.g. btoa(username + ":" + password))emailThe equivalent bunfig.toml option is to add a key in install.scopes:
[install.scopes]
myorg = { url = "http://localhost:4873/", username = "myusername", password = "$NPM_PASSWORD" }
link-workspace-packages: Control workspace package installationControls how workspace packages are installed when available locally:
link-workspace-packages=true
The equivalent bunfig.toml option is install.linkWorkspacePackages:
[install]
linkWorkspacePackages = true
save-exact: Save exact versionsAlways saves exact versions without the ^ prefix:
save-exact=true
The equivalent bunfig.toml option is install.exact:
[install]
exact = true
ignore-scripts: Skip lifecycle scriptsPrevents running lifecycle scripts during installation:
ignore-scripts=true
This is equivalent to using the --ignore-scripts flag with bun install.
dry-run: Preview changes without installingShows what would be installed without actually installing:
dry-run=true
The equivalent bunfig.toml option is install.dryRun:
[install]
dryRun = true
cache: Configure cache directorySet the cache directory path, or disable caching:
# set a custom cache directory
cache=/path/to/cache
# or disable caching
cache=false
The equivalent bunfig.toml option is install.cache:
[install.cache]
# set a custom cache directory
dir = "/path/to/cache"
# or disable caching
disable = true
ca and cafile: Configure CA certificatesConfigure custom CA certificates for registry connections:
# single CA certificate
ca="-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"
# multiple CA certificates
ca[]="-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"
ca[]="-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"
# or specify a path to a CA file
cafile=/path/to/ca-bundle.crt
omit and include: Control dependency typesControl which dependency types are installed:
# omit dev dependencies
omit=dev
# omit multiple types
omit[]=dev
omit[]=optional
# include specific types (overrides omit)
include=dev
Valid values: dev, peer, optional
install-strategy and node-linker: Installation strategyControl how packages are installed in node_modules. Bun supports two different configuration options for compatibility with different package managers.
npm's install-strategy:
# flat node_modules structure (default)
install-strategy=hoisted
# symlinked structure
install-strategy=linked
pnpm/yarn's node-linker:
The node-linker option controls the installation mode. Bun supports values from both pnpm and yarn:
| Value | Description | Accepted by |
| -------------- | ------------------------------------------------ | ----------- |
| isolated | Symlinked structure with isolated dependencies | pnpm |
| hoisted | Flat node_modules structure | pnpm |
| pnpm | Symlinked structure (same as isolated) | yarn |
| node-modules | Flat node_modules structure (same as hoisted) | yarn |
# symlinked/isolated mode
node-linker=isolated
node-linker=pnpm
# flat/hoisted mode
node-linker=hoisted
node-linker=node-modules
public-hoist-pattern and hoist-pattern: Control hoistingControl which packages are hoisted to the root node_modules:
# packages matching this pattern will be hoisted to the root
public-hoist-pattern=*eslint*
# multiple patterns
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*prettier*
# control general hoisting behavior
hoist-pattern=*
development
Using TypeScript with Bun, including type definitions and compiler options
development
Learn how to write tests using Bun's Jest-compatible API with support for async tests, timeouts, and various test modifiers
testing
Learn how to use snapshot testing in Bun to save and compare output between test runs
testing
Learn about Bun test's runtime integration, environment variables, timeouts, and error handling