Quickstart¶
In a few minutes, you'll install one package through Provenix from your own machine. You'll need:
- the Provenix registry URL for your organisation (in these docs,
https://npm.example.com/), - access to the Provenix console with the admin role in your workspace, or someone who has it,
- Node.js with npm 9 or later.
1. Get a client token¶
- In the console, open Clients.
- Under Register a client, enter a name for your machine, for example
laptop-jsmith, and select Create. - Copy the token (it starts with
df_live_). It's shown only once.
If you don't have the admin role, ask your Provenix admin to do this and send you the token.
2. Point npm at Provenix¶
In an empty folder, put the token in your environment and create an
.npmrc:
export PROVENIX_NPM_TOKEN='df_live_…'
mkdir provenix-try && cd provenix-try
cat > .npmrc <<'EOF'
registry=https://npm.example.com/
//npm.example.com/:_authToken=${PROVENIX_NPM_TOKEN}
always-auth=true
replace-registry-host=never
EOF
Check that Provenix knows who you are:
npm whoami
It prints your client's name, laptop-jsmith.
3. Install a package¶
npm init -y
npm install lodash
If your workspace has already approved lodash, it installs as usual from
Provenix. Look at the lockfile, and every resolved URL points at
https://npm.example.com/.
If nobody in your workspace has used lodash before, you get a 451
instead. That's Provenix working: see
When an install is blocked.
Next¶
Move a real project over: Add a new app to Provenix.