Command-line tools for the @_linked/* packages and apps.
npm install --save-dev @_linked/cli
# or
yarn add -D @_linked/cliThree executables ship in this package:
linked— primary commandlnk— short alias forlinkedlincd— deprecated alias; prints a warning and forwards tolinked. Will be removed in a future major release.
Run linked --help for the full list. The commonly used ones:
linked create-app <name> # scaffold a new app (interactive)
linked create-package <name> # scaffold a new linkedPackage
linked create-shape <name> # add a shape file to the current package
linked create-component <name> # add a React component filelinked build # build the current package (tsc + checks)
linked build-app # build frontend + backend for the current app
linked build-workspace # build all linked packages in the workspace in dependency order
linked build-updated # incremental: only packages that changed since last build
linked build-package <file> # walk up from a file path to find its package and rebuildlinked setup-publish # install a changesets-based publish workflow in the current repo
linked setup-publish --dual-branch # use main + dev with @next prereleases
linked setup-publish --configure-github # also set branch protection via gh CLI
linked setup-publish --scope community # use NPM_AUTH_TOKEN_CM instead of NPM_AUTH_TOKENsetup-publish writes:
.github/workflows/ci.yml,publish.yml,changeset-check.yml.changeset/config.json+README.md.gitignoreentriespublishConfig: {access: public}+@changesets/clidevDeps inpackage.jsonpackage-lock.json(via isolated tmpdir)
linked start # run the dev server (app)
linked dev # file-watch rebuild (package)
linked yarn <args> # safe-yarn: run yarn at root while preserving nested yarn.lock fileslinked publish # publish the current package (for non-CI flows)
linked register # register the package to the linked registry
linked status # show which packages need build/publish
linked depcheck # check for missing/unused depsThe CLI recognizes two flags in package.json:
{
"linkedPackage": true, // marks a reusable library; build-workspace builds it
"linkedApp": true // marks a deployable app; build-workspace skips it
}The legacy lincd: true and lincdApp: true flags are still read for the transition period.
cd packages/cli
yarn buildDual ESM + CJS build via tsconfig-to-dual-package. Sources in src/, output in lib/esm/ and lib/cjs/.
Templates live in defaults/:
defaults/app-with-backend/— used bylinked create-appdefaults/app-static/— minimal static appdefaults/package/— used bylinked create-packagedefaults/setup-publish/— workflow + changeset files written bylinked setup-publish(single-branch default;dual-branch/subdirectory for the--dual-branchvariant)
linked-cm/cli on GitHub. License: MPL-2.0.