Pub Package and Asset Manager

Send feedback

You can use the pub tool to manage Dart packages and assets. Pub also includes commands for creating, developing, and deploying Dart applications. When you install the Dart SDK, one of the tools that you get is pub.

You can access the pub commands either through an IDE, such as WebStorm, or at the command line. Use whatever approach is most convenient.

Managing packages

Dart applications rely on packages. If your Dart app uses one or more library packages, then your app itself must be an application package.

How to



Pub commands

The pub tool provides commands for a variety of purposes. One command installs packages, another starts up an HTTP server for testing, another prepares your app for deployment, and another publishes your package to

For an overview of these commands, see Pub Commands.

The following reference pages cover each command in detail:

Two additional commands (pub build and pub serve) are specific to web development. For more information, see Dart Tools for the Web.

Writing transformers

When pub serves or builds an app, it can run one or more transformers—for example, one transformer converts Dart files into a single JavaScript file.

Transformers operate on assets, where an asset is a resource, such as a Dart file, a CSS file, or an image, that is intended to be part of a deployed package.

The following pages cover how to write a custom transformer:


Troubleshooting Pub gives solutions to problems that you might encounter when using pub.