> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Reuse packages from the Postman VS Code extension

With the Postman VS Code extension, you can import packages from your team's [Postman Package Library](#reuse-scripts-with-the-package-library) into scripts in your internal workspaces. You can also import packages from [external packages registries](#import-packages-from-external-registries), such and npm or JSR, into your scripts.

## Reuse scripts with the package library

You can use the package library to store commonly used scripts and tests as packages in your Postman team. You can maintain scripts and tests in one location and reuse them in your internal workspaces. Your Postman teammates can also access and import packages from the package library. The package library supports JavaScript code.

To create a new package, do the following:

1. Click **Library** in the footer, then choose <img alt="Package icon" src="https://assets.postman.com/postman-docs/aether-icons/entity-package-stroke.svg#icon" width="16px" /> **Packages**.

2. Click <img alt="Add icon" src="https://assets.postman.com/postman-docs/aether-icons/action-add-stroke.svg#icon" width="16px" /> **New Package**.

3. Enter the following:

   * **Name** - The name of the package. This is used in the import statement that adds the package to your scripts.

     You can't use the name of a package that already exists or a package that was deleted. Also, you can't change the name of a package later.

   * **Summary** - A short summary about the package and what it does.

   * **Code** - Enter code in the package. Learn how to write code in a package.

4. Click **Create**.

Once you've created a package, you can write code in it and import the package into your pre-request and post-response scripts.

To learn more about using your team's package library, see [Add internal scripts to the Package Library in Postman](/docs/tests-and-scripts/write-scripts/packages/package-library/).

## Import packages from external registries

You can import public packages from external package registries into your scripts. Postman supports importing packages from [npm](https://www.npmjs.com/) and [JSR](https://jsr.io/) registries in scripts. External packages are supported in HTTP requests in the VS Code extension. Private packages aren't supported in the VS Code extension.

To search and import an external package, do the following:

1. Open an HTTP collection, folder, or request. You can also open a gRPC or GraphQL request.
2. Select the **Scripts** tab.
3. Select <img alt="Package icon" src="https://assets.postman.com/postman-docs/aether-icons/entity-package-stroke.svg#icon" width="16px" /> **Packages** at the lower right of the code editor, and select **Open package library**.
4. Search for a package in npm or JSR. To filter your search results by package registry, select **NPM**, **JSR**, or both. Search returns the top five results for each package registry.
5. Select a package to import it into the code editor.

To learn more about importing packages from external registries, see [Import packages from external registries in Postman](/docs/tests-and-scripts/write-scripts/packages/external-package-registries/).