Get your first npm package published and consumed through DepAegis in under 5 minutes. This guide walks you through creating an access token, configuring npm, publishing a package, and installing it on another machine.
Before you begin, make sure you have the following:
node --version to checknpm --version to checkapp.depaegis.comapp.depaegis.com and you can publish your first package in minutes. No servers, nothing to install.DepAegis uses personal access tokens to authenticate npm CLI operations. You'll need a token with publish permissions to push packages and read permissions to install them.
npm-ci-publish).Configure your npm client to point to your DepAegis registry. You can set this up per-project (recommended) or globally.
Use the access token from Step 1 as YOUR_TOKEN.
Create or edit an .npmrc file in your project root:
@myorg:registry=https://app.depaegis.com/api/v1/npm/
//app.depaegis.com/:_authToken=YOUR_TOKENThis routes only @myorg-scoped packages through DepAegis while leaving public npm packages unaffected. Replace @myorg with your DepAegis organization scope.
To route all npm packages through DepAegis (including public packages via the upstream proxy), configure your global ~/.npmrc:
registry=https://app.depaegis.com/api/v1/npm/
//app.depaegis.com/:_authToken=YOUR_TOKEN.npmrc file with a placeholder and substitute at runtime://app.depaegis.com/:_authToken=${DEPAEGIS_TOKEN}@myorg:registry=https://app.depaegis.com/api/v1/npm/
//app.depaegis.com/:_authToken=YOUR_TOKENregistry=https://app.depaegis.com/api/v1/npm/
//app.depaegis.com/:_authToken=YOUR_TOKEN@myorg:registry=https://app.depaegis.com/api/v1/npm/
//app.depaegis.com/:_authToken=${DEPAEGIS_TOKEN}DepAegis uses token-based auth only — no interactive npm login needed. Confirm your registry and token are picked up:
npm config get registryThis should output https://app.depaegis.com/api/v1/npm/. npm sends the _authToken from your .npmrc automatically on every request to that host.
npm config get registry shows a different value, check that your .npmrc is in the right location (project root for per-project config, home directory for global config).Create a simple package or use an existing one. Make sure your package.json includes the correct scope and publishConfig to target DepAegis:
{
"name": "@myorg/example-package",
"version": "1.0.0",
"description": "An example package published to DepAegis",
"main": "index.js",
"publishConfig": {
"registry": "https://app.depaegis.com/api/v1/npm/",
"access": "restricted"
}
}The publishConfig.registry field ensures that npm publish always targets DepAegis, even if your global npm registry is set to the public npmjs.org. The access field controls visibility — restricted means only members of your organization can see and install the package.
Now publish the package:
npm publishOn success, you'll see output similar to:
+ @myorg/example-package@1.0.0When you need to release an update, bump the version and publish again:
# Patch bump (1.0.0 -> 1.0.1)
npm version patch
npm publish
# Minor bump (1.0.0 -> 1.1.0)
npm version minor
npm publish
# Major bump (1.0.0 -> 2.0.0)
npm version major
npm publishOn any machine with the DepAegis registry configured, install your package the same way you would install any npm package:
npm install @myorg/example-packagenpm fetches the package from DepAegis, verifies the integrity hash, and adds it to your package.json and package-lock.json.
npm install @myorg/example-package@1.2.0npm install @myorg/example-package@betanpm install. Check the Dependency Firewall docs for details.After publishing, open your DepAegis dashboard to review the package details:
Now that you've published and consumed your first npm package through DepAegis, here are some recommended next steps: