helpLib
tcmts.cli.commands.helpLib · #rmuu5oar · term · runs anywhere
import type { Help } from "#codebase/tcmts/cli/commands";
export const helpLib: Help = {
description:
"libraries from other codebases: list them, find one on a registry, add one (read-only, by release or namespace hash), upgrade one, say where to fetch one, rm one",
routes: {
add: {
description:
"add a library: fetch a release's namespace (or a namespace by hash) from a source, with what it uses, and mount it read-only",
params: {
source:
"where to fetch it: @<handle>/<package>[@<version>], a release its author announced (from the servers its announcement names); or a remote's name, a tcm serve URL, another codebase's directory, or tcm (the libraries this tcm ships: react)",
what: "from a remote, URL or directory: <package>@<version>, <package> for its newest release, or #<namespace hash>",
as: "what to call it (default: its package's name, as a name can be: @alice/geo-tools is geo_tools): it's mounted at <root>.lib.<name>",
at: "mount it here instead",
},
},
upgrade: {
description:
"move a library to another version as one update: what changed in its API first, then code using it follows (what doesn't typecheck goes to todo)",
params: {
library: "its mount (tcmts.lib.geo), or its name (geo)",
what: "<package>@<version>, or #<namespace hash> (default: its package's newest release; for an announced one, the highest its author announced)",
source: "try this source first (kept first among its sources)",
check: "only say what would change",
},
},
sources: {
description:
"where a library is fetched from, tried in order (what any sends is checked by hash): list them, add a mirror, rm one",
params: {
library: "its mount (tcmts.lib.geo), or its name (geo)",
add: "a remote's name, a tcm serve URL or another codebase's directory, tried after the others",
rm: "stop fetching from this one (not its last)",
},
},
attest: {
description:
"say something about a release, signed in your AT Protocol repository: a review, an advisory (it's vulnerable), or, its author's, a yank",
params: {
what: "a library here (its name or mount), @<handle>/<package>@<version>, a release of this codebase (<package>@<version>), or #<namespace hash>",
kind: "review, advisory or yank",
message: "what you say (an advisory's or a yank's is needed)",
severity: "an advisory's: low, moderate, high or critical",
"fixed-in": "an advisory's: the version that fixes it",
as: "the AT Protocol account to write it as (signed in in the browser once, then kept; default the last)",
},
},
search: {
description:
"find libraries on a registry: what its libraries' newest versions hold that matches, by name, words in docs or :a type, each with its tcm lib add line",
params: {
query: "a name, words from docs, or :a type (`:(s: Shape) => number`)",
registry:
"the registry to ask (its address; kept for next time, the one asked without it); with none kept, tcm's: https://tcm.codes/registry",
},
},
trust: {
description:
"whose reviews and advisories `tcm lib` shows, besides each library's author's: list them, add someone, or take them off (kept in the codebase's history)",
params: {
add: "a handle or DID to trust",
rm: "stop trusting them",
},
},
rm: {
description: "remove a library: its names, and its entry in the record beside it",
params: {
library: "its mount (tcmts.lib.geo), or its name (geo)",
},
},
},
}
uses
used by