Publishing & API

1. Point ez at this registry

ez config registry https://packages.ez-lang.site

2. Create an account

ez login

Prompts for a username, email and password, then stores the API token in ~/.ez/credentials.json. The first account created on a fresh registry becomes its administrator.

3. Describe your package

A package.ez in the project root:

{
  "name": "http-client",
  "version": "1.2.0",
  "description": "A small HTTP client",
  "main": "main.ez",
  "license": "MIT",
  "keywords": ["http", "network"],
  "dependencies": {
    "json": "^1.0.0",
    "log":  ">=2.1.0 <3.0.0"
  }
}

4. Publish

ez publish

A published version is immutable. To correct a mistake, publish a new version; to stop new installs picking a bad one, ez yank <pkg>@<version> — that hides it from resolution without breaking anyone who already depends on it.

Version ranges

RangeMatches
1.2.3exactly that version
^1.2.3≥1.2.3 and <2.0.0
~1.2.3≥1.2.3 and <1.3.0
>=1.2.0 <2.0.0an explicit range
1.2.xany patch of 1.2
*the newest stable version

Prereleases (2.0.0-beta.1) are never selected by a range; ask for one exactly to get it.

HTTP API

EndpointPurpose
GET /api/v1/packages?q=search
GET /api/v1/packages/:namemetadata and every version
GET /api/v1/packages/:name/:rangeresolve one range
GET /api/v1/packages/:name/:version/downloadtarball
POST /api/v1/resolvefull install plan for a dependency set
POST /api/v1/publishpublish (multipart, bearer token)
POST /api/v1/packages/:n/:v/yankyank / unyank

Resolution happens server-side: send what you want, receive a flat, ordered plan with tarball URLs and SHA-256 checksums.

curl -X POST https://packages.ez-lang.site/api/v1/resolve \
  -H 'Content-Type: application/json' \
  -d '{"dependencies":{"http-client":"^1.0.0"}}'