pasteblox

pasteblox.json

A small file in your project that says which local file is which script on pasteblox. The CLI and the VS Code extension both read it and keep it up to date.

What it looks like

pasteblox.jsonjson
{
  "$schema": "https://pasteblox.com/schema/pasteblox.json",
  "scripts": [
    { "file": "src/door.luau", "slug": "k3m9x2p7qa", "visibility": "unlisted", "title": "door" },
    { "file": "src/hub.lua", "name": "hub.lua", "visibility": "public", "title": "speed hub" }
  ]
}

The first script is already on pasteblox (it has a slug). The second one isn't yet: the next pbx push creates it as a public script called "speed hub", with its own raw URL /raw/<your handle>/hub.lua, and writes its new slug into the file.

You rarely write it by hand. pbx init creates it, and pbx push, pbx pull and VS Code's push add to it as you go. Commit it to Git, so everyone on the project pushes to the same scripts.

Every field

FieldRequiredWhat it is
$schemaNoAlways https://pasteblox.com/schema/pasteblox.json. It gives your editor autocomplete and red squiggles. pbx adds it when it writes the file.
scriptsYesThe list of files. One entry per file.
scripts[].fileYesThe file's path, relative to pasteblox.json, with forward slashes even on Windows: src/door.luau. This is how a file is matched to its entry, so each file appears once.
scripts[].slugNoThe script's 10-character ID, like k3m9x2p7qa (letters and digits, no lookalikes such as 0, o, 1, i or l). Leave it out and the next push creates a new script and fills it in. Put one in yourself to push a file into a script you already have (or use pbx push file --slug k3m9x2p7qa).
scripts[].nameNoA custom raw URL under your handle: hub.lua serves at pasteblox.com/raw/<handle>/hub.lua, next to the slug URL. Lowercase, up to 4 parts split by / (like bedwars/esp.lua), each a-z, 0-9, . _ or -, starting and ending with a letter or digit; not a bare version like v2. Needs you to be signed in.
scripts[].visibilityNounlisted (default: anyone with the link), public (listed on Explore) or private (only you). Public and private need you to be signed in.
scripts[].titleNoUp to 100 characters. Defaults to the file name.

Name is applied on every push

name works the other way: pbx checks it each time it pushes that file, and if the script's URL on pasteblox is different, the push sets it. So you can add or change a name right in the file, or use the flag, which also writes it into the file:

Terminal
❯ pbx push src/hub.lua --name hub.lua
❯ pbx push src/hub.lua --name "" # Remove it

An entry without name leaves the script's URL alone, so a name you picked on the website stays. Renaming or removing a name keeps the old URL working, so loaders you already shared don't break. If another of your scripts already uses the name, pbx says which one: a new script isn't created, and an existing one still gets its new version, just not the name.

Anything else at the top level (next to scripts) is kept as is. Extra fields inside a script entry are not: the schema doesn't allow them, and pbx drops them the next time it saves the file.

Where it lives

Usually at the top of your project. pbx looks for it in the folder you're in, then in each folder above, and uses the first one it finds. So you can run pbx push from src/ and it still finds ../pasteblox.json. Every file path is relative to wherever that pasteblox.json is.

  • pbx init is the exception: it always writes pasteblox.json in the folder you're in. Run it from the top of your project.
  • No pasteblox.json anywhere above? pbx push file.luau creates one in the current folder. VS Code creates it at the top of your workspace folder, not next to the file.
  • VS Code looks for every pasteblox.json in the workspace, so a folder with several projects works too. Each file belongs to the nearest one above it.

The .pasteblox folder

Next to pasteblox.json, pbx and VS Code keep a .pasteblox/ folder with one file in it. It remembers, for this computer only, which version each file was last pushed or pulled at, and a fingerprint (SHA-256) of its content:

.pasteblox/state.jsonjson
{
  "version": 1,
  "files": {
    "src/door.luau": {
      "slug": "k3m9x2p7qa",
      "sha256": "b54997c45c69d822e800e8f550a321d7c88e51142095e60b565a33eaf078f820",
      "version": 4,
      "at": "2026-10-20T15:12:44.745Z"
    }
  }
}

That's how they know:

  • Which files changed since the last push (so pbx push skips the rest, and VS Code shows live or edited).
  • If someone else pushed in the meantime. pbx sends the version you started from, and pasteblox refuses the push if it's not the newest any more (what to do then).
  • If pbx pull would overwrite work you haven't pushed.

The folder contains its own .gitignore, so Git never picks it up. Deleting it is safe: you just lose those three checks until your next push or pull. That's also exactly the state of a fresh clone or a CI checkout, where the files in the repo always win.

How the CLI and VS Code share it

Both tools read and write the same two files with the same code, so you can push from the terminal and pull from VS Code, or the other way around. VS Code even watches them: push with pbx and its status bar updates by itself.

CLI (pbx)VS Code
Creates pasteblox.jsonpbx init, or the first pbx pushThe first push of a file
Adds an entryPushing or pulling a file that isn't listedPushing a file that isn't listed, or pull into workspace…
New script titleFile name: Main.server.luau → "Main.server"File name without Rojo suffixes: "Main"
Sign-inIts own key (config.json)Its own key (VS Code's secret storage)
Push on savepbx watchThe push on save setting

Sign-in is the one thing they don't share. Each one has its own key, and you sign in to each once.

With Rojo

pasteblox.json goes right next to default.project.json. Rojo ignores it, and you only list the scripts you want on pasteblox, not every module.

my-gametree
my-game/
├── default.project.json   ← rojo's
├── pasteblox.json         ← pbx's and vs code's
├── .pasteblox/            ← local cache, ignores itself
└── src/
    ├── server/Main.server.luau
    └── client/Gun/init.client.luau
pasteblox.jsonjson
{
  "$schema": "https://pasteblox.com/schema/pasteblox.json",
  "scripts": [
    { "file": "src/server/Main.server.luau", "slug": "k3m9x2p7qa", "visibility": "private", "title": "Main" },
    { "file": "src/client/Gun/init.client.luau", "visibility": "unlisted", "title": "Gun" }
  ]
}

Recipes

Push a file into a script you already have

Terminal
❯ pbx push src/door.luau --slug k3m9x2p7qa # Maps it and pushes the next version

Set up a new computer

Clone your repo (or copy the folder) and you have pasteblox.json. Pull each script once so this computer knows which versions it has:

Terminal
❯ pbx pull src/door.luau
❯ pbx pull src/hub.lua

Stop tracking a file

Delete its entry from pasteblox.json. The script stays on pasteblox and the file stays on disk; they're just not linked any more. (pbx rm deletes the script and removes the entry.)

"pasteblox.json.scripts[0].slug: invalid slug"

pbx checks the file every time it reads it and points at the broken field. Fix that field (or delete the line), then run the command again. "Isn't valid JSON" usually means a missing comma or quote.

Where next