Getting started on Gemfury with JavaScript

Install packages with Bun

You can configure your Bun project to use Gemfury as the primary source of npm packages. To start, commit a bunfig.toml configuration to the root directory of your project:

[install]
registry = "https://npm.fury.io/USERNAME/"

This will access the public repository for USERNAME account repository.

It is important to include a trailing slash in the registry URL, otherwise bun may have trouble connecting to your Gemfury registry.

Blended-index registry

The npm.fury.io endpoint only enables access to packages in your Gemfury account, however, you can similarly configure to use the blended index registry URL to combine your account index with the public index:

[install]
registry = "https://npm-proxy.fury.io/USERNAME/"
Accessing private packages

To authenticate into your private repository, you can use environment variable expansion in the registry configuraion to specify the deploy token as follows:

[install]
registry = {
  url = "https://npm-proxy.fury.io/USERNAME/",
  username = "TOKEN-OWNER-USERNAME",
  password = "$FURY_AUTH",
}

And then populate FURY_AUTH environment variable with a deploy token:

$ FURY_AUTH=your-token bun install

Next