VS Code extension
Push, pull and compare your scripts without leaving VS Code. It's the pbx CLI with buttons, and it shares the same pasteblox.json, so you can switch between the two any time.
pasteblox: my scripts
- ⌄doorunlisted · 1.2k runs · ★ 4
- v4fade the door a bit more · 2m ago
- v3save: 17:12:44 · 1h ago
- v2close the door too · 2d ago
- ›speed hubpublic · 18k runs · ★ 31
- ›admin toolsprivate · 3 runs · ★ 0
- ›remote spyunlisted · 0 runs · ★ 0 · flagged
-- door.luau
local door = workspace.Door
local open = false
door.ClickDetector.MouseClick:Connect(function()
open = not open
door.Transparency = open and 0.8 or 0
door.CanCollide = not open
end)Install it
- 1
Open the Extensions view
Click the four-squares icon on the left, or press Ctrl Shift X (⌘ Shift X on a Mac).
- 2
Install from VSIX
Click the ··· menu at the top of that view, choose Install from VSIX… and pick the
pasteblox.vsixfile. A pasteblox icon (a little stack of blocks) shows up in the bar on the left.
You don't need the CLI installed. The extension carries its own copy of everything it needs.
Sign in
- 1
Start it
Click the pasteblox icon on the left, then Sign in. Or open the command palette (Ctrl Shift P, ⌘ Shift P on a Mac) and run pasteblox: Sign in.
- 2
Check the code
Your browser opens the approval page, and VS Code shows the code in a notification at the bottom right:
pasteblox: confirm WDJB-MJHT in your browser · waiting for approval…
CancelIllustrationThe sign-in notification. The code is different every time. Check that the code in the browser matches, then approve. VS Code picks it up on its own within a few seconds.
- This is the same browser approval as
pbx login. Step by step, with a picture of the page: signing in with the CLI. - VS Code gets its own key, called "pbx on your computer (VS Code)". It lives in VS Code's secret storage, never in your settings or your project.
- The CLI and VS Code sign in separately. Signing in to one doesn't sign in the other.
- Revoke it with pasteblox: Sign out, or under Dashboard → CLI devices.
Push a file
Open any .luau or .lua file, then do one of these:
- Click its status in the status bar at the bottom (it says
not on pastebloxthe first time) and pick Push. - Right-click in the editor, or on the file in the Explorer, and choose Push current file.
- Command palette → pasteblox: Push current file.
VS Code saves the file first. The very first time, it asks where the file should go: a new script, or the next version of one you already have.
pasteblox: src/door.luau isn't on pasteblox yet
- + New unlisted scriptanyone with the link
- + New public scriptlisted on Explore once the risk scan passes
- + New private scriptonly you
- ⇡ Push into one of my scripts…
A new script asks for a title next (the file name, minus things like .server). Then, every push asks What changed?: one line for the version list.
pasteblox: push door.luau → k3m9x2p7qa v5
- Press Enter to push. The summary can be empty.
- Want a changelog too? Click the note button in that box. An editor opens: write lines like
- added: …or- fixed: …(**bold**,`code`and links work), then press Ctrl Enter (⌘ Enter) or the ✓ at the top to push. - When it's done, a notification offers Copy loadstring and Open on web.
- Don't want the question? Turn off the askForSummary setting.
Either way, the file is now listed in pasteblox.json in your workspace, so the next push goes straight to the same script.
The status bar
The item at the bottom left tells you where the open file stands. Click it for everything you can do with that file: push, pull latest, compare with latest, copy loadstring, open on the web, push on save, sign in or out.
It updates when the CLI changes things too: run pbx push in the terminal and the item flips to live.
Push on save
The editor version of pbx watch: every time you save a file that's already linked to a script, it's pushed about 400ms later. No questions; the summary is save: hh:mm:ss.
- Turn it on from the status bar menu (Turn push on save on) or with pasteblox: Toggle push on save. It's saved for the current workspace.
- Only files listed in
pasteblox.jsonwith a slug get pushed. New files still need one manual push first. - Hit the rate limit? It waits and retries, with a note in the status bar.
When someone else pushed first
If a newer version went up since your last push or pull (from the website, another computer or a teammate), VS Code won't quietly replace it. You get a choice:
pasteblox: door.luau: remote moved on: k3m9x2p7qa is at v6, you're based on v5.
Pulling a file with unpushed changes asks first too, with Overwrite or Show diff.
The pasteblox view
The pasteblox icon on the left opens My scripts: every script on your account with its visibility, runs and stars. Expand one to see its versions with their summaries; hover a version to read its changelog. A note icon means that version has one.
Right-click a script
- Open on pasteblox.com, or copy loadstring (also as buttons on hover)
- Pull into workspace…
- Change visibility…
- Delete… (you can restore it from the website for 30 days)
Right-click a version
- Open it read-only (or just click it)
- Compare with previous version, or with your local file
- Edit summary…, edit changelog… (the code never changes)
- Copy pinned loadstring: always runs exactly this version
Settings
File → Preferences → Settings, then search for pasteblox.
Rojo and Luau LSP
The extension only touches pasteblox.json and the .pasteblox/ folder. Put pasteblox.json next to default.project.json: Rojo never sees it, and Luau LSP keeps doing completions and errors as usual.
Titles for new scripts skip Rojo's suffixes: Main.server.luau becomes "Main", and Gun/init.client.luau becomes "Gun".
{
"$schema": "https://pasteblox.com/schema/pasteblox.json",
"scripts": [
{ "file": "src/server/Main.server.luau", "slug": "k3m9x2p7qa", "visibility": "unlisted", "title": "Main" }
]
}Using it with the CLI
VS Code and pbx read and write the same two files, so they always agree on which file is which script, and which version you last had:
pasteblox.json: which file is which script. Commit it..pasteblox/state.json: the version each file was last pushed or pulled at, on this computer. Never commit it.
The one difference: titles. When the CLI creates a script from Main.server.luau it's called "Main.server"; VS Code calls it "Main". More in pasteblox.json.
All commands
Everything in the command palette, under pasteblox:. Some only show up when they make sense, like pull when the file is linked.