These instructions apply to the entire repository.
- Ghost-CLI is the command-line tool for installing, configuring, and updating Ghost.
- Primary source lives in
lib/andbin/ghost. - Built-in platform extensions live in
extensions/(mysql,nginx,systemd). - Tests live in
test/unitandextensions/**/test.
- Use Node.js
^20.11.1 || ^22.11.0 || ^24.0.0. - Use
pnpm; this repo is configured aroundpnpm-lock.yamlandpackage.jsonscripts. - Common validation commands:
pnpm testpnpm lint(oxlint +oxfmt --check);pnpm lint:fixto autofix and formatpnpm linkfollowed byghost <command>for manual CLI checks
- Follow the existing CommonJS module style and current file structure.
- Keep changes targeted; prefer updating existing commands, tasks, utils, or extensions over introducing new abstractions.
- Match the existing test style with Vitest, Sinon, Proxyquire, and Nock where applicable. Vitest's
expectis chai-based, so the existingexpect(...).to.be.truestyle still applies; globals are enabled, so specs don't import the runner. - Add or update tests for behavior changes, especially command flows, task execution, and extension behavior.
- Keep work aligned with the documented Ghost-CLI goals in
README.md. - Prioritize the recommended Ghost production stack and supported local workflows.
- Avoid expanding support for unrelated platforms or broad new configuration surfaces unless explicitly requested.
- Ensure
pnpm testpasses before finishing substantial code changes. Note thatpnpm testalso triggers linting viaposttest. - Prefer small, reviewable changes with clear commit scope.
- Keep commit messages compatible with the repository's conventional commit expectations when preparing commits.
- When changing behavior, cross-check the relevant repository docs first (
README.md,.github/CONTRIBUTING.md, and command-specific docs if provided). - If a task explicitly asks for external docs or current behavior verification, look them up before making assumptions.