Skip to main content

Publishing a module

You can publish your module through our CLI or programmatically, in a typescript file.

To configure your module when publishing, you can use:

  • an egg.json or egg.yaml file
  • a .eggignore file
  • the options of the publish command.

If there is a conflict between a field in your config, the options of the publish command will take precedence, then the eggignore file and finally the eggs config file.

There are a number of required fields that must appear somewhere in your configuration:

  • name;
  • version and/or bump
  • files and/or ignore

To publish a module, just navigate to the root of your module (where your egg file is located) and use the following command:

eggs publish

After this, you'll be returned a link to your module on the Module Gallery. You should also update your with this url so that other users can find your module on Nest!


Use the same command to publish a new version to an existing module!


You can use several options as well, instead of stating these fields in your egg file:

eggs publish --release-type minor
eggs publish --version 1.4.2
eggs publish myModule --description "A deno module" --checkFormat

For more details, please refer to configuration.

Additional options:

-Y, --yes         Disable confirmation prompts.
-d, --dry-run No changes will actually be made, reports the details of what would have been published.


You just need to import the publish function from the latest version of eggs.

import { publish } from '';

const config = {
description: 'Your brief module description',
version: '0.0.1',
/* ... */

publish(config, 'my-module');

This functions identically to the CLI, and features such as logging are still available.

This avoids the need to install eggs. Moreover, every contributor to the project has the same version of eggs.

Automatic publishing

You can set up a GitHub Actions workflow for automatically publishing your modules!

name: Publish

ref_type: 'tag'

runs-on: ubuntu-latest
- name: Setup repo
uses: actions/checkout@v2

- name: Setup Deno
uses: maximousblk/setup-deno@v1
deno-version: 1.13

- name: Publish
run: |
deno install -Af --unstable
eggs link ${{ secrets.NESTAPIKEY }}
eggs publish --yes --no-check --version $(git describe --tags $(git rev-list --tags --max-count=1))

To see how to use this, visit our eggs-ci repository.


You can add our badge to your project docs. This is a great way to support our platform and help us grow. We'd really appreciate seeing it on your project!





or if you want to support us even louder, you can use the large badge: