Skip to content


Subversion checkout URL

You can clone with
Download ZIP
javascript package registry
Branch: master
Pull request Compare This branch is 1 commit ahead, 30 commits behind isaacs:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


You'll need CouchDB version 1.0.0 or higher. We're using some newish features. I recommend getting one from

Add a vhost config:

packages:5984 = /jsregistry/_design/app/_rewrite

Where packages is the hostname where you'll be running the thing, and 5984 is the port that CouchDB is running on. If you're running on port 80, then omit the port altogether.

Now install couchapp:

npm install couchapp

Now run the sync app.js from this repository.

couchapp --design app.js --sync --couch http://localhost:5984/jsregistry

You may need to put a username and password in the URL:

couchapp --design app.js --sync --couch http://user:pass@localhost:5984/jsregistry


GET /packagename

Returns the JSON document for this package. Includes all known dists and metadata. Example:

  "name": "foo",
  "dist-tags": { "stable": "0.1" },
  "_id": "foo",
  "versions": {
    "0.1": {
      "name": "foo",
      "_id": "foo",
      "version": "0.1",
      "dist": { "tarball": "http:\/\/\/0.1.tgz" },
      "description": "A fake package"
  "description": "A fake package."

GET /packagename/0.1.2

Returns the JSON object for a specified release. Example:

  "name": "foo",
  "_id": "foo",
  "version": "0.1.2",
  "dist": { "tarball": "http:\/\/\/0.1.tgz" },
  "description": "A fake package"

GET /packagename/stable

Returns the JSON object for the specified tag.

  "name": "foo",
  "_id": "foo",
  "version": "0.1",
  "dist": { "tarball": "http:\/\/\/0.1.tgz" },
  "description": "A fake package"

PUT /packagename

Create or update the entire package info.

MUST include the JSON body of the entire document. Must have content-type:application/json.

If updating this must include the latest _rev.

This method can also remove previous versions and distributions if necessary.

PUT /packagename/0.1.2

Create a new release version.

MUST include all the metadata from package.json along with dist information as the JSON body of the request. MUST have content-type:application/json

PUT /pacakgename/stable

Link a distribution tag (ie. "stable") to a specific version string.

MUST but a JSON string as the body. Example:


Must have content-type:application/json.

Something went wrong with that request. Please try again.