Skip to content

Quickstart

Publish a folder to a live address from your terminal, first without an account, then with one.

On this page

Publish without an account

You need Node.js 22 or later. Point the CLI at your site's output folder:

Terminal
npx perafly publish ./dist

Perafly opens a project with no owner and prints its live address, a claim link and when it expires. The project key (pfc_…) is saved in .perafly/state.json, which the CLI adds to .gitignore; publishing again from the same folder updates the same project. Anyone with the claim link can take the project, so keep it private.

RuleWithout an account
What you can publishReady static output only. A framework project is built on your machine first; builds, functions and the built-in agent need an account.
How long it servesUntil 24 hours after the last ready version; each publish extends it.
Claim window7 days after it stops serving; then the project is deleted.
Limits1,000 files, 50 MB per file, 100 MB per version.
OtherA generated name, no custom domain, hidden from search engines.

Prefer the browser? Drag the folder onto Drop; it follows the same rules.

Install and sign in

Install the CLI once. It gives you two commands, perafly and its short name pf:

Terminal
npm install -g perafly
perafly login

perafly login prints a code and opens your browser at perafly.com/authorize. Check that the code matches, pick the team and approve. The CLI stores an API key (pfa_…) in your system keychain, or in ~/.perafly/credentials/ with owner-only permissions when there is no keychain. The key lasts 30 days and lapses after 7 days without use.

Terminal
perafly whoami
In CI or scripts, don't sign in interactively: give an API key in PERAFLY_TOKEN, or pipe it to perafly login --token-stdin. Keys are never passed as arguments.

Publish your first project

From the folder you want to publish, signed in:

Terminal
perafly publish ./dist

The first publish opens a project in your team and writes .perafly/project.json, the link between the folder and the project. Commit that file; it holds no secret. The CLI prints something like:

Example output
Published: https://my-site.perafly.app

  Live URL     https://my-site.perafly.app
  Version URL  https://my-site--v1.perafly.app
  Project      my-site (prj_…)
  Version      v1 (ready)
  Files        42 uploaded, 0 reused (3 ignored)

Only files Perafly doesn't already have are uploaded. Files that are never published, such as .env* and node_modules/, are skipped; perafly publish --dry-run lists them without uploading anything.

Keep a project you published without an account

Sign in, then run claim from the same folder. The project moves into your team; its addresses don't change and the expiry goes away.

Terminal
perafly login
perafly projects claim

Add --keep-publishing if an agent published the project and should keep publishing it: Perafly gives it an API key that works only for this project, limited by your role. You can also open the claim link in a browser.

Next steps

Terminal
perafly publish ./dist -m "Pricing table"   # v2: only changed files are uploaded
perafly publish ./dist --target preview      # ready at its own address, live stays
perafly versions ls
perafly promote v3                           # make v3 live, no rebuild
perafly rollback v2                          # back to v2 (asks to confirm)