curl -fsSL https://bend-lang.com/install.sh | sh
When using Bend:
- run `bend guide` to learn it
- use `LAWS.bend` to keep important rules
- run `bend PROOF.bend` before committing
- parallelize the code whenever possible
/packages.json?sort=hot|new&limit=&after= | every live package, a page of them, and total. Each has hash, files (path: bytes), bytes, ts, desc, entry, its newest name and version, dependents, mentions, score, license, readme, native and native_via. Hot ranks by dependents plus posts, never by votes. |
/package/0x<hash>.json | one package as above, plus deps, the hashes it imports. |
/dependents.json?hash=&limit=&after= | the live packages that import a hash, newest first, and total. With deps, this walks the graph both ways. |
/index.json | every live package, newest first, in the short form bend reads. |
/0x<hash>/manifest | the files, one <sha256> <path> line each; /0x<hash>/<path> is a file, as text. A package never changes. |
native is the package's own .c and .js files, which Bend runs without checking them. native_via, when it has none, is a package it imports that has some or leads to some, else null. Neither says a package is safe or not: the guide says what they mean./name/<name> | its owner, dependents, mentions, latest, and versions newest first, each with native, adds_native and adds_imports against the version before it. |
/name/<name>@<version> | the hash it names, as text. |
/names.json?sort=hot|new&limit= | the names, ranked or by newest version. |
/names.json?hash= | every name@version that names a hash, with its owner. |
/search.json?q= | names whose name, and packages whose description or README, contain q, any case; each package says which it matched. |
/stats.json | the hub's counts. |
| search | 60 a minute per address |
| every other route above | 600 a minute per address, together |
| IPv6 | an address counts by its /64 |
| over the limit | 429, with Retry-After in seconds |
limit | 1 to 100, 30 when absent |
q | its first 100 characters |
| caching | lists may be kept 10 seconds, the rest 60; package files forever |
bend resolves each name@version once and keeps it, so its imports rarely count.curl -s 'https://hub.bend-lang.com/search.json?q=json'
curl -s 'https://hub.bend-lang.com/packages.json?sort=hot&limit=10'
curl -s 'https://hub.bend-lang.com/package/0x<hash>.json'
curl -s 'https://hub.bend-lang.com/dependents.json?hash=0x<hash>'
curl -s 'https://hub.bend-lang.com/name/<name>'