addLine

tcmts.hub.addLine · #ljci5k3j · term · runs anywhere

The tcm lib add line for a library's version, by its author's handle (or DID), called after its package: quoted as a shell needs it, so a line copied from a page runs tcm and nothing else.

import { shellWord } from "#codebase/tcmts/cli/ui";

export const addLine = (
  who: { did: string; handle?: string },
  pkg: string,
  version: string,
): string => `tcm lib add ${shellWord(`@${who.handle ?? who.did}/${pkg}@${version}`)}`

uses

used by