Skip to Content
CommandsRun, build and docs

Run, build and docs

pf dev # run the app locally pf build # build it pf test # run the tests pf lint # lint pf install # install the repo (install:local), else its dependencies pf docs # run the docs site

Each one is resolved for the repo you are in. See Command resolution for the order pf uses.

Options

OptionEffect
--dry-run (-n)Print the command instead of running it
--pick (-p)Choose when several candidates exist (needs a terminal)
-- <args>Pass the rest on to the underlying command
pf test --dry-run pf test -- --watch pf dev --pick

When several candidates exist and you do not pass --pick, pf uses the first and tells you how many others there were.

pf install

pf install is the repo’s install action, next to deploy and publish. It can mean installing the repo’s own build on this machine (a Cursor extension, a CLI), not only its dependencies.

pf install local # run install:local (pf il, pf install-local) pf install cursor # run install:cursor (install:<to>) pf install # pick the target (below) (pf i) pf install --deps # always install dependencies

A target is a script named install:<to> or install-<to> (local:install also counts as install:local). pf looks in this order and uses the first one it finds:

  1. An install:<to> entry in pulpfixer.json
  2. A package.json script, in the repo root and then its workspace packages
  3. A composer script
  4. A command of the repo’s local ./a CLI (pf never adds -y, because it did not ask)

With no target, pf install runs:

  1. A plain install entry in pulpfixer.json, if there is one
  2. install:local
  3. The only install:* target, when the repo has exactly one
  4. Several targets and no local: a picker in a terminal. Without a terminal it lists the names and exits with 2.
  5. No target at all: the dependency install of the stack (pnpm install, pip install, …), as before

pf install local and pf install <to> never fall back to dependencies. If the repo has no such target they say so and show how to add one. The plain package.json install script is not a target, because the package manager runs it as a lifecycle hook.

It does not ask for confirmation. --dry-run previews, --pick chooses between dependency candidates, and -- <args> passes the rest on.

{ "commands": { "install:local": { "run": "pnpm build && code --install-extension out/ext.vsix" } } }

pf docs

pf docs is the same command as pf doc. It starts the repo’s local docs site and finds it in this order:

  1. A doc (or docs) entry in pulpfixer.json
  2. A root script named docs:dev, docs:start, doc:dev or docs
  3. A docs package in the repo: docs, documentation, website, or any package under apps/ or packages/ that uses a docs framework and has a dev or start script
  4. The root package itself, when it is a docs site
  5. Static generators: VitePress, MkDocs, Sphinx, mdBook, Hugo

Recognized frameworks are Nextra, Docusaurus, VitePress, Starlight, Fumadocs and Vocs.

pf docs --dry-run # show what would run pf docs --pick # choose between several docs sites pf docs -- --port 4000

In this repo, pf docs runs the root docs:dev script, which starts the Nextra site in packages/docs on port 4400.

To use another command, set it in pulpfixer.json:

{ "commands": { "doc": { "run": "mkdocs serve", "cwd": "." } } }

First run in a repo

When you run pf dev (or pf r) in a terminal in a repo that pf repo has not been run in (no versions.json and no pnpm helper copy), pf asks whether to run pf repo first. After it finishes, pf asks whether to start pf dev now. Answer no to the first question and pf dev just runs. Nothing is asked without a terminal or with --dry-run; set PF_NO_REPO_PROMPT=1 to turn the question off.

Last updated on