Publishing a package

A package on the registry is a GitHub repository. Releases of the repository are the versions of the package.

  1. Sign in

    Sign in with GitHub. The registry only asks for your public profile.

  2. Describe your dependencies

    Add a spice.json file to the root of your repository. It is optional, but needed for the dependency tree:

    {
      "name": "my-package",
      "dependencies": {
        "json-parser": "^1.2.0",
        "http-client": ">=2.0.0, <3.0.0"
      },
      "devDependencies": {
        "test-kit": "*"
      }
    }
  3. Tag a release

    Create a GitHub release whose tag is a semantic version, for example v1.0.0. The release notes become the changelog. Tags that are not semantic versions are ignored.

  4. Create the package

    Open the dashboard, pick your repository and choose a name and a few tags. You need push access to the repository.

  5. Keep it in sync

    The registry re-reads README, releases and dependencies regularly. After a release you can also hit Sync now on the package management page.

Version constraints

ConstraintMatches
1.2.3exactly 1.2.3
^1.2.31.2.3 up to, but excluding 2.0.0
~1.2.31.2.3 up to, but excluding 1.3.0
1.2.xany 1.2 release
>=1.0.0, <2.0.0a range
*any version

Using the registry API

Everything on this site is available as JSON, for tools that want to resolve and fetch packages: