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 siteEach one is resolved for the repo you are in. See Command resolution for the order pf uses.
Options
| Option | Effect |
|---|---|
--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 --pickWhen 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 dependenciesA 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:
- An
install:<to>entry inpulpfixer.json - A package.json script, in the repo root and then its workspace packages
- A composer script
- A command of the repo’s local
./aCLI (pf never adds-y, because it did not ask)
With no target, pf install runs:
- A plain
installentry inpulpfixer.json, if there is one install:local- The only
install:*target, when the repo has exactly one - Several targets and no
local: a picker in a terminal. Without a terminal it lists the names and exits with 2. - 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:
- A
doc(ordocs) entry inpulpfixer.json - A root script named
docs:dev,docs:start,doc:devordocs - A docs package in the repo:
docs,documentation,website, or any package underapps/orpackages/that uses a docs framework and has adevorstartscript - The root package itself, when it is a docs site
- 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 4000In 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.