Documentation
Package registry
A hostable package index for Walnut libraries. Point your app at a registry once, then walnut install vendors packages into vendor/walnut/ — see packages.md.
For app developers
Configure a source
In walnut.toml:
[[source]]
name = "walnut"
url = "https://packages.walnutlang.com"
[dependencies]
Greeter = "0.1.0"
Or set WALNUT_REGISTRY for CLI defaults.
Login and install
export WALNUT_REGISTRY=https://packages.walnutlang.com
walnut login --email [email protected] --password '…'
walnut install
walnut check
Commit walnut.lock and vendor/walnut/ so CI stays offline.
Publish a package
From a directory with walnut-package.toml:
walnut login --email [email protected] --password '…'
walnut publish .
Commercial licenses
If your org has a Commercial seat:
walnut license login --org acme
walnut license status
walnut license refresh
Details: licensing.md.
CLI
| Command | Role |
|---|---|
walnut login --email … --password … [--registry URL] | Save token to ~/.walnut/credentials |
walnut login --token wn_… [--registry URL] | Paste an existing token |
walnut license login --org <slug> | Download Commercial license → ~/.walnut/license |
walnut license refresh | Re-issue before expiry |
walnut license status | Show edition / expiry |
walnut publish [dir] | Pack + upload |
walnut add [email protected] | Pin from configured source |
walnut install | Resolve / use vendor |
HTTP API (v1)
| Method | Path | Auth | Notes |
|---|---|---|---|
POST | /api/v1/users | no | Register |
POST | /api/v1/tokens | no | Mint token |
GET | /api/v1/packages/:name | no | Versions |
GET | /api/v1/packages/:name/:version/download | no* | Tarball |
POST | /api/v1/packages/:name/versions | Bearer | Publish |
POST | /api/v1/orgs/:slug/licenses/issue | Bearer | Issue Commercial license |
* v1 is public-read / auth-write for downloads.
Self-hosting
The registry is a normal deployable service (Postgres + app). Run it behind TLS, set secrets and storage, migrate on deploy, then point apps at your host with [[source]].
Admin UI (/admin) grants Commercial seats and manages orgs. Signing keys are configured on the registry server; the CLI verifies licenses with keys pinned in the binary. If status asks you to upgrade walnut, install a newer CLI.
Never commit private signing keys.
Related
- packages.md — manifests, vendoring, lockfile
- licensing.md — Community vs Commercial
- toolchain.md — CLI overview