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, that name's about and url, dependents, mentions, score, license, readme, native, native_via and laws. 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. |
desc is the comment the package's entry file opens with. about is the line its name's owner wrote about it and url where its source lives, both "" when nothing is said: show about when there is one, else desc. laws counts the law declarations in the package's own files, what its code is held to; the hub reads them and does not check them.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, what the owner says of it, about and url, 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 or about, 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>'