Skip to Content
CommandsDeploy and publish

Deploy and publish

pf deploy (pf d)

pf deploy # staging if configured, else production, else the repo's own deploy pf d # same thing pf d "fix login" # with a commit message, when the repo's deploy commits pf d --dry-run # show the steps only

With no environment, pf picks the first target the repo has:

  1. Staging, when pf finds one (see below).
  2. Production, when that is the only target.
  3. A bare deploy: a deploy entry in pulpfixer.json, a deploy script in package.json or composer.json, or the repo’s own ./a deploy. A bare deploy does not name an environment, so pf treats it like production: it always asks first and needs --yes without a terminal. pf never guesses it from platform configs.
  4. The publish, in a repo that only publishes (see Deploy means publish).

pf says which one it picked. pf deploy staging and pf deploy production (or pf ds, pf dp) pick one yourself. The coding agent and the MCP tools never run a bare deploy.

A commit message

pf d "fix login", pf ds fix login and pf dp "release 3.4" pass the text to a deploy command that makes a commit. -m "text" is the explicit form. Words after staging or production are the message, and a mistyped flag such as --dryrun is an error, not a message.

pf cannot tell whether an arbitrary command commits, so only a target that says it takes a message gets one:

  • a pulpfixer.json command with "message": true, for example { "run": "./tl d", "message": true };
  • a repo CLI command (./a deploy) whose # usage: header mentions message.

The message goes on as one quoted argument (./tl d 'fix login'), on the last step of the plan. A target that takes none prints a warning and runs without it.

Repos with their own helper script

Older repos deploy with a hand-written helper such as ./tl d or ./al d. Run pf rp (or pf rp --deploy) once: the coding agent reads the repo’s docs and helper, asks which environment it is, and writes the pulpfixer.json entry. See Tools and repo setup.

Staging

pf deploy staging # detect the target and run it pf deploy staging --dry-run # show the steps only pf ds # same as pf deploy staging

pf finds the staging target by itself, in this order:

  1. A deploy:staging entry in pulpfixer.json
  2. A deploy:staging script in a package.json or composer.json, or the repo’s own ./a deploy:staging tool
  3. A GitHub workflow with stag in its file name and a workflow_dispatch trigger, run with gh workflow run
  4. Platform configs: Firebase, Cloudflare Workers (wrangler, with a staging env), Fly.io (fly.staging.toml), Serverless, SST, Netlify and Vercel (a preview)

Steps print before they run. Anything pf skips is listed with the reason.

Production

pf deploy production pf dp

Production is never guessed from platform configs. pf runs it only when the repo defines it:

  • a deploy:production script (package.json or composer.json),
  • a deploy:production entry in pulpfixer.json, or
  • the repo’s own ./a deploy:production tool.

It always asks for confirmation. Without a terminal it refuses unless you pass --yes. --dry-run previews it.

The coding agent and the MCP tools deploy to staging only. Production is never targeted by an agent.

Publish to the registry

pf publish staging # same as pf ps

Runs the repo’s publish:cellars script (or publish:staging), or the matching pulpfixer.json entry, and always confirms (--yes without a terminal, --dry-run to preview). A repo with neither (and no staging deploy, see below) fails with exit code 1.

Deploy means publish, and back

Some repos ship by publishing packages (a publish:cellars script) and have no deploy at all. In such a repo pf d, pf ds and pf dp run the publish instead, and say so: Staging publish (cellars registry) (the repo has no deploy target, so pf deploy publishes). pf only does this when the repo shows no sign of deploying: no staging, production or bare deploy target, and no platform config it skipped (a firebase.json without a staging alias, for example). A repo with only a production deploy still fails pf ds instead of publishing.

The other way round, pf ps in a repo with no publish target runs the staging deploy. It never falls back to a production or bare deploy.

Either way the plan prints first and pf asks before it runs (--yes without a terminal). The coding agent and the MCP tools never publish.

Last updated on