CLI commands
Every pbx command and flag.
Every pbx command, flag and example, straight from the CLI itself. New to pbx? Start with the CLI guide. In a terminal, pbx help <command> prints the same thing.
How to read this
Wherever a command takes <slug>, you can give it any of these. If the folder's pasteblox.json maps exactly one script, you can leave it out entirely.
A few commands have a second name: list = ls, deleteremove = rm, history = log. A typo gets a suggestion:
❯ pbx pussh✗ unknown command "pussh" (did you mean push?) — run pbx --help for the listGlobal flags
These work with every command.
--json output and exit codes are explained in JSON output and exit codes.
Signing in
Once per computer. In CI, set PASTEBLOX_TOKEN instead.
pbx login
Sign in from the browserOpens pasteblox.com/device, you approve the code, pbx stores an API key for this machine. Anonymous scripts you pushed earlier get claimed to your account.
Usage pbx login [flags]
❯ pbx login # Open the browser and wait for approval❯ pbx login --no-browser # Print the link instead (SSH, containers)What it prints
❯ pbx login ┌───────────────────────┐ │ W D J B - M J H T │ └───────────────────────┘ confirm this code at https://pasteblox.com/device?user_code=WDJBMJHT opened your browser✓ logged in as @you· key "pbx on my-laptop" saved to ~/.config/pasteblox/config.jsonpbx logout
Revoke this device's key and forget itUsage pbx logout
❯ pbx logout # Revoke the key server-side and delete it locallyWhat it prints
❯ pbx logout✓ logged out @you· key revoked on the serverpbx whoami
Who you're pushing asUsage pbx whoami
❯ pbx whoami # Show the account behind the current keyWhat it prints
❯ pbx whoami@you (You) via api key "pbx on my-laptop" api https://pasteblox.comSetting up a folder
Writes pasteblox.json, the list of files pbx tracks.
pbx init
Map local .luau/.lua files to scriptsWrites pasteblox.json in the current directory. Interactive in a terminal; pass --file or --yes in scripts and CI.
Usage pbx init [flags]
❯ pbx init # Pick files from a list❯ pbx init --yes # Map every .luau/.lua file found❯ pbx init -f src/door.luau -f src/hub.lua --private # Map specific filesWhat it prints
❯ pbx init --yes✓ wrote pasteblox.json · 2 new, 2 total file visibility title src/door.luau unlisted door src/hub.lua unlisted hub· next: pbx push creates them and prints the loadstringsWorking with scripts
Push, pull, compare and manage.
pbx push
Upload a new version (or create the script)Mapped files get a new version; unmapped files become new scripts and are added to pasteblox.json. With no file, pushes every mapped file that changed since the last push, each with the same message and notes.
Usage pbx push [file] [flags]
❯ pbx push # Push every mapped file that changed❯ pbx push src/door.luau -m "fix debounce" # Push one file with a message❯ pbx push hub.lua --public --title "speed hub" # Create a public script❯ pbx push door.luau --slug k3m9x2p7qa # Push into an existing script❯ pbx push main.lua --name main.lua # Serve it at /raw/<handle>/main.lua too❯ pbx push -m "v2" --notes "- added: auto farm" --notes "- fixed: lag" # Summary plus a changelog❯ git log -1 --format=%b | pbx push --notes-file - # Changelog from stdinWhat it prints
❯ pbx push src/door.luau -m "fade the door a bit more" --notes "- fixed: double clicks"✓ src/door.luau → v2 · 199b · 241ms slug k3m9x2p7qa page https://pasteblox.com/s/k3m9x2p7qa raw https://pasteblox.com/raw/k3m9x2p7qa loadstring loadstring(game:HttpGet("https://pasteblox.com/raw/k3m9x2p7qa"))()pbx pull
Download a scriptWrites the latest (or a pinned) version to disk. Refuses to overwrite local changes you haven't pushed unless you pass --force.
Usage pbx pull <slug> [flags]
❯ pbx pull k3m9x2p7qa # Latest version → its mapped file or <slug>.luau❯ pbx pull k3m9x2p7qa --version 3 -o old.luau # Grab v3 into old.luauWhat it prints
❯ pbx pull k3m9x2p7qa --version 1 -o old-door.luau✓ k3m9x2p7qa v1 → old-door.luau · 199b· pinned v1; latest is v3pbx watch
Push mapped files on saveWatches every file in pasteblox.json and pushes ~400ms after the last save. Errors don't stop the loop, rate limits retry on their own. Ctrl-C to stop.
Usage pbx watch [flags]
❯ pbx watch # Push on every save❯ pbx watch --json # One JSON line per push, for toolingWhat it prints
❯ pbx watch● watching 2 files (door.luau, hub.lua) pushes 400ms after you save · ctrl-c to stop✓ door.luau → v4 · 214b · 180ms · 17:12:44✓ hub.lua → v2 · 41b · 150ms · 17:13:02^Cstopped watchingpbx diff
Local file vs remote, Git-styleUsage pbx diff <slug> [file] [flags]
❯ pbx diff k3m9x2p7qa # Mapped file vs latest❯ pbx diff src/door.luau # Same, by file❯ pbx diff k3m9x2p7qa --from 3 --to 5 # Between two versionsWhat it prints
❯ pbx diff src/door.luau--- a/k3m9x2p7qa@1+++ b/src/door.luau@@ -4,6 +4,6 @@ door.ClickDetector.MouseClick:Connect(function() open = not open- door.Transparency = open and 0.6 or 0+ door.Transparency = open and 0.8 or 0 door.CanCollide = not open end)Newest first, each version's changelog indented under its summary.
Usage pbx log <slug> [flags]
❯ pbx log k3m9x2p7qa # Recent versions, newest first❯ pbx log src/door.luau -n 50 --short # By file, more history, summaries onlyWhat it prints
❯ pbx log src/door.luauv2 just now 199b fade the door a bit more @you • changed door fades to 0.8 • fixed double clicksv1 just now 199b first push @youpbx note
Rewrite a version's summary or changelogFixes the message and notes of a version you already pushed; the code never changes. Without a version number it edits the latest. --notes "" clears the changelog.
Usage pbx note <slug> [n] [flags]
❯ pbx note k3m9x2p7qa 3 -m "fix door debounce" # Reword v3's summary❯ pbx note src/door.luau --notes-file CHANGELOG.md # Changelog for the latest version❯ pbx note k3m9x2p7qa@2 --notes "" # Clear v2's changelogWhat it prints
❯ pbx note k3m9x2p7qa 2 -m "door fades further"✓ k3m9x2p7qa v2 → door fades further • changed door fades to 0.8 • fixed double clicksUsage pbx ls [flags]
❯ pbx ls # Everything you own, recently updated first❯ pbx ls --visibility public --sort views # Your public hitsWhat it prints
❯ pbx lstitle slug visibility ver views updateddoor k3m9x2p7qa unlisted v2 0 just nowhub p8w2n6r4tv unlisted v1 0 just nowpbx open
Open a script page in the browserUsage pbx open <slug> [flags]
❯ pbx open k3m9x2p7qa # Open the page❯ pbx open src/door.luau --raw # Open the raw URL of a mapped filepbx loadstring
Print + copy the loader one-linerUsage pbx loadstring <slug> [flags]
❯ pbx loadstring k3m9x2p7qa # Always the latest version❯ pbx loadstring k3m9x2p7qa --version 4 # Pinned to v4, never changesWhat it prints
❯ pbx loadstring k3m9x2p7qaloadstring(game:HttpGet("https://pasteblox.com/raw/k3m9x2p7qa"))()· copied to clipboardSoft-deletes the script: the raw URL stops working immediately, and the script is purged for good after 30 days (pbx restore undoes it until then). It also unmaps the file in pasteblox.json; the file itself stays. Asks first in a terminal; pass --yes in scripts.
Usage pbx rm <slug> [flags]
❯ pbx rm k3m9x2p7qa # Delete after confirming❯ pbx rm k3m9x2p7qa --yes # No questionsWhat it prints
❯ pbx rm p8w2n6r4tv --yes✓ deleted p8w2n6r4tv (hub)· soft-deleted until 2026-11-19, then gone for good. changed your mind? pbx restore p8w2n6r4tv· unmapped src/hub.lua (the file itself is untouched)pbx restore
Bring back a deleted scriptUndoes pbx rm while the script is still soft-deleted (30 days). Same slug, same raw URL. Needs login. It doesn't re-add the file to pasteblox.json: pbx pull it, or pbx push the file with --slug.
Usage pbx restore <slug>
❯ pbx restore k3m9x2p7qa # Undo a deleteWhat it prints
❯ pbx restore p8w2n6r4tv✓ restored p8w2n6r4tv, raw url works again