readme.ts
This file
Path
scripts/lib/release/readme.ts
56 lines · 2.2 KiB · TypeScript
Last changed by
Merge build/comments-ops into mainoscabrielbefore adoptione4c407e
History of this fileTake it
Merge branch 'build/715-release'oscabrielbefore adoption918a2c1
lines 1–56why, one step back1import type { Brand } from "@repo/brand";23const fence = (lines: readonly string[]) => ["```sh", ...lines, "```"];45export const packageReadme = (input: {6 readonly brand: typeof Brand;7 readonly version: string;8}): string => {9 const { brand } = input;1011 return [12 `# ${brand.cliPackage}`,13 "",14 `The ${brand.name} command line, ${input.version}. ${brand.name} is a git platform where a change lands only by passing a typed gate: a project states each change it wants as an ask, and you answer one with a commit pushed to your claim's fork.`,15 "",16 "## Install",17 "",18 "With Node or Bun:",19 "",20 ...fence([`npm install --global ${brand.cliPackage}`]),21 "",22 `Or as one file that needs neither, from the platform you use (Linux x64 and macOS on Apple silicon; the script checks the download against the release's SHA256SUMS):`,23 "",24 ...fence(["curl -fsSL <platform>/install.sh | sh"]),25 "",26 `Either way you get \`${brand.cli}\`, and \`${brand.gitCredentialHelper}\`, the credential helper git calls for the platform.`,27 "",28 "## Start",29 "",30 ...fence([31 `${brand.cli} login --url <platform>`,32 `${brand.cli} asks # list the open asks you could take`,33 `${brand.cli} claim <ask> # take one; you get a fork to push your answer to`,34 `${brand.cli} check # run the gate's checks locally before you push`,35 ]),36 "",37 `\`${brand.cli} --help\` lists every command; \`${brand.cli} mcp\` serves them as MCP tools over stdio.`,38 "",39 "## pi",40 "",41 `The package is a pi package: \`pi install npm:${brand.cliPackage}\` gives every pi session the brief of the claim it works on, a guard on the files the gate judges with, and the verdict before it stops. The platform's skill ships in \`skills/${brand.slug}/\`.`,42 "",43 "## A project's config folder",44 "",45 `A maintainer's \`${brand.configDir}/\` imports the sdk from \`${brand.cliPackage}/rules\`, and the types of its data from \`${brand.cliPackage}/protocol\`:`,46 "",47 "```ts",48 `import { project } from "${brand.cliPackage}/rules";`,49 "```",50 "",51 "## Licence",52 "",53 "MIT",54 "",55 ].join("\n");56};