# Packages

There are a lot of developers building Substreams and creating very useful transformations that can be reused by other people. Once a Substreams is developed, you can pack it into a Substreams package and share it with other people!

Essentially, a Substreams package is a ready-to-consume binary file, which contains all the necessary dependencies (manifest, modules, protobufs...). The standard file extension for a Substreams package is `.spkg`.

### The Substreams Registry

In order to facilitate how developers share Substreams packages, the Substreams Registry (<https://substreams.dev>) was created. In the Registry, developers can discover and push Substreams.

For example, the [ERC20 Balance Changes](https://github.com/streamingfast/substreams-erc20-balance-changes) package is stored at the registry (<https://substreams.dev/streamingfast/erc20-balance-changes/v1.1.0>).

### Using a Package

You can easily run a Substreams package by inputting the `.spkg` file in the CLI:

```bash
substreams gui \
 erc20-balance-changes@latest \
 map_balance_changes \
 -e mainnet.eth.streamingfast.io:443 \
 --start-block 1397553 \
```

### Creating a Package

You can create a Substreams package by executing the `substreams pack` command in the CLI. Given a Substreams project, you can create a new package from a manifest (`substreams.yaml`):

```bash
substreams pack ./substreams.yaml
```

#### Package Dependencies

Developers can use modules and protobuf definitions from other Substreams packages when `imports` is defined in the manifest.

{% hint style="warning" %}
**Important**: To avoid potential naming collisions, select unique `.proto` filenames and namespaces specifying fully qualified paths.
{% endhint %}

Local Protobuf filenames take precedence over the imported package's proto files.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.substreams.dev/reference-material/manifest-and-components/packages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
