Framework is a monorepo of @tryghost/* packages used across Ghost services,
apps, and tooling. Each package lives under packages/* and has its own README
with package-specific usage examples.
Use the repo-pinned package manager from the root of the checkout:
corepack pnpm installFor consumers, install the package you need from npm:
pnpm add @tryghost/<package-name>Read the package README for the package you are using. Common examples:
@tryghost/api-frameworkfor API request pipeline helpers.@tryghost/errorsfor shared Ghost error types.@tryghost/securityfor token, password, and identifier helpers.@tryghost/express-testfor HTTP test helpers.
This is a monorepo, managed with Nx.
git clonethis repo &cdinto it as usual- run
pnpm setupfrom the top-level:- installs all external dependencies
- links all internal dependencies
To add a new package to the repo:
- install slimer
- run
slimer new <package name>
pnpm devis a placeholder at the workspace root. Run package-specific scripts from the package directory when a package has a development workflow.
pnpm lintrunsoxlintacross all packagespnpm formatformatsjs/ts/json/mdfiles withoxfmtpnpm format:checkchecks formatting without writingpnpm testruns package tests through Nxpnpm test:ciruns the full CI test target for every package
- run one of the release commands in the top-level
frameworkdirectory:pnpm ship:patchpnpm ship:minorpnpm ship:major- for initial Nx bootstrap in long-unreleased repos:
pnpm ship:first-release - by default these bump every package in
packages/*to the same level. To scope a release to specific packages, append--projects=with comma-separated npm package names (not directory names), e.g.pnpm ship:minor --projects=@tryghost/api-framework,@tryghost/domain-events - append
--dry-runto preview which packages would be bumped without committing
- this runs tests, versions packages, and creates/pushes release commit + tags
- creates the version commit and pushes tags to
main
- creates the version commit and pushes tags to
- CI automatically publishes packages via
.github/workflows/publish.yml:- authenticates to npm via Trusted Publishing (OIDC, no long-lived tokens)
- checks each
packages/*package version against npm - runs
pnpm publish(vianx release publish) only for versions that are not already published, with provenance attestations enabled
Copyright (c) 2013-2026 Ghost Foundation - Released under the MIT license.