Configure access to @prusa3d-platform private packages.
One command to set up your local development environment.
Run this command to configure your local environment:
curl -fsSL https://npm-token.prusa3d.dev/setup | bash
irm https://npm-token.prusa3d.dev/setup.ps1 | iex
Creates a new token, or validates existing one. If token is expired or invalid, prompts to create a new one.
Not on VPN? See setup without VPN.
To revoke your token and remove local configuration:
curl -fsSL https://npm-token.prusa3d.dev/revoke | bash
irm https://npm-token.prusa3d.dev/revoke.ps1 | iex
Revokes the token via GitLab API and removes the local token file.
~/.config/prusa/npm-token (chmod 600)%LOCALAPPDATA%\Prusa\npm-token (restricted ACL)
.zshrc / .bashrcIf you prefer to set things up manually:
api scope
Add to ~/.zshrc or ~/.bashrc:
export NPM_PRUSA_PLATFORM_TOKEN="glpat-your-token-here"
Run in PowerShell:
[Environment]::SetEnvironmentVariable("NPM_PRUSA_PLATFORM_TOKEN", "glpat-your-token-here", "User")
Or: Settings → System → About → Advanced system settings → Environment Variables
.npmrc in your project:
@prusa3d-platform:registry=https://gitlab.com/api/v4/packages/npm/
//gitlab.com/api/v4/packages/npm/:_authToken="${NPM_PRUSA_PLATFORM_TOKEN}"
@prusa3d-platform:registry=https://gitlab.com/api/v4/packages/npm/
//gitlab.com/api/v4/packages/npm/:_authToken=${NPM_PRUSA_PLATFORM_TOKEN}
Note: On Windows, use ${VAR} without quotes.
Off VPN, the scripts are behind Cloudflare Access and plain curl / irm gets a login page instead of the script. Use cloudflared to log in first, then download the script through it:
# 1. Install cloudflared (once) brew install cloudflared # 2. Log in (opens browser) cloudflared access login https://npm-token.prusa3d.dev # 3. Run setup cloudflared access curl https://npm-token.prusa3d.dev/setup | bash
# 1. Install cloudflared (once) winget install --id Cloudflare.cloudflared # 2. Log in (opens browser) cloudflared access login https://npm-token.prusa3d.dev # 3. Run setup cloudflared access curl https://npm-token.prusa3d.dev/setup.ps1 | Out-String | iex
The same works for revoke: replace /setup with /revoke. On Linux, install cloudflared from Cloudflare downloads.
Your token is invalid or expired. Run the setup command again:
curl -fsSL https://npm-token.prusa3d.dev/setup | bash
irm https://npm-token.prusa3d.dev/setup.ps1 | iex
The token is loaded when you start a new shell. Either:
source ~/.zshrcEnvironment variables require a new terminal session. Either:
Fix permissions:
chmod 600 ~/.config/prusa/npm-token chmod 700 ~/.config/prusa
Reset file permissions (PowerShell as Administrator):
$path = "$env:LOCALAPPDATA\Prusa\npm-token" icacls $path /reset icacls $path /inheritance:r /grant:r "$($env:USERNAME):(R,W)"
If you see "running scripts is disabled on this system", run PowerShell as Administrator:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Then try the setup command again.
If you're having issues with the remote execution, you can download the scripts and run them locally:
setup.ps1 from https://npm-token.prusa3d.dev/setup.ps1revoke.ps1 from https://npm-token.prusa3d.dev/revoke.ps1Unblock-File .\setup.ps1 Unblock-File .\revoke.ps1
.\setup.ps1
Or for revoke:
.\revoke.ps1