KBAISE/ for lovable
Library
Docs

Managed registry

about 15 minBuildingchecked 3d agoOfficial page
The short version

You can set up a private place within Lovable to store your own special software packages, like shared code or design elements. This keeps them private and secure while making them easy for all your Lovable projects to use.

Workspace owners and admins need this when they want to share their own private software packages securely across different projects in Lovable.

Do this, in order

  1. 1

    Go to the 'Managed registry' section in your Lovable Workspace settings.

    This is where you'll find the option to set up your private package storage.

  2. 2

    Click the button to 'Provision registry'.

    This tells Lovable to create your private package storage for your workspace.

  3. 3

    Give a name to your service account key and click 'Create key'.

    This key is like a password that allows your projects to access your private package storage.

  4. 4

    Immediately save the service account key file that downloads to your computer.

    This is crucial because you won't be able to get this key again if you lose it.

  5. 5

    In your code project's main folder, add the details of your private package storage to a file named '.npmrc'.

    This file tells your project where to find your private packages.

  6. 6

    Place the service account key file you saved earlier into your project, naming it 'npm-key.json'.

    This file contains the 'password' your project needs to prove it's allowed to use your private packages.

  7. 7

    Run the special command to authenticate your project using the 'npm-key.json' file.

    This step officially connects your project to your private package storage, allowing it to publish or install packages.

  8. 8

    To use a private package, simply ask Lovable to install it by its name, just like you would with any public package.

    Lovable will automatically find and install your private package from your managed registry.

Paste this into your project

Install @my-org/ui-components and use it to replace the current button component.

Words decoded

npm registry
A central online storage place where software packages (collections of reusable code) are kept. Think of it like an app store for code.
npm packages
These are pre-written pieces of code or software components that developers can easily add to their projects to save time and reuse functionality.
service account key
A special digital key or password that allows a computer program or service (like your Lovable project) to securely access resources, in this case, your private package storage, without needing a human user's login.
.npmrc file
A configuration file that tells your project's package manager (npm) how to behave, including where to find packages and how to authenticate.
scoped packages
Packages that belong to a specific organization or user, usually identified by a name starting with '@' (e.g., '@my-org/ui-components'). This helps prevent naming conflicts and organizes packages.

Where people get stuck

  • You must have a Lovable Enterprise plan to use this feature.
  • Only workspace owners or admins can set up the managed registry.
  • You will only see the service account key file once when you create it; save it immediately because you cannot retrieve it again.
  • If your packages are already in an external registry like GitHub Packages, you don't need this managed registry; use a build secret instead.

The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.