Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI reference

rebind is the command-line companion to the Rebind app: scaffold a package, validate and lint it offline, run it against your local Rebind app with live logs and hot-reload, then package and publish it to the marketplace. It installs with Rebind and lands on your PATH — no separate download.

check, lint, new, and package work fully offline. run, exec, repl, whoami, and publish talk to the Rebind app, so it must be running (and signed in, for whoami/publish).

Commands

rebind new <name>      scaffold a package                 (alias: n)
rebind check [path]    validate a package or script       (alias: c)
rebind lint [path]     lint the require graph             (alias: l)
rebind run [path]      run via the Rebind app             (alias: r)
rebind exec <code>     one-off chunk in Rebind            (alias: x)
rebind repl            interactive session
rebind package [path]  build the .rbp archive             (alias: p)
rebind publish [path]  upload for marketplace review
rebind whoami          session, device, transport         (alias: w)

Every [path] defaults to the current directory and accepts either a package directory or a single .lua/.luau file.

new

$ rebind new hello
created hello/
  rebind.toml  main.luau  .gitignore

next: cd hello && rebind run

The package name is the final path component (rebind new tools/hello creates a package named hello), lowercased to the marketplace slug charset.

check

Offline validation of the package contract: manifest schema and pricing rules, identity declarations, the full require graph, Luau compilation of every reachable module, and a permission audit (undeclared Net.* / System.Exec use fails here instead of at runtime).

$ rebind check
checking hello v0.0.1
ok  manifest · modeline · require graph (1 module) · compile · permissions

Checking a script that lives inside a package shows its container:

$ rebind check scripts/wiggle.luau
checking wiggle (in hello v0.0.1)
ok  modeline · require graph (1 module) · compile · permissions

lint

Advisory linting over the same require graph, with the Rebind standard library preloaded so HID, Log, hooks, and friends resolve. Warnings never block anything; error-severity findings (definite bugs) exit non-zero and block publish.

$ rebind lint
linting hello
warning: dx is assigned a value, but never used
  --> main.luau:2
lint: 1 warning, 0 errors

run

The dev loop: validates, loads the entry into the running Rebind app, streams the script’s log channel, and hot-reloads when a source file changes.

$ rebind run
checking hello v0.0.1
ok  manifest · modeline · require graph (1 module) · compile · permissions

running hello — ⌃C to stop
01:30:03  info   Script started
01:30:03  info   hello started
01:30:08  ⟳ reloaded (main.luau changed)

Only this script’s lines appear — its own Log.* output plus Rebind’s lifecycle notices and errors for it. --all-logs streams every Rebind log line (prefixed with its source) for app-wide debugging. Edits to .lua/.luau/ .toml files and anything under assets/ trigger a reload; a failing re-check keeps the previous run alive.

rebind run scripts/wiggle.luau runs a single script from a package’s scripts/ directory — it inherits the package’s min_sdk, and its requires resolve from the package root.

exec and repl

Both run chunks in a persistent scratch runtime inside the Rebind app — the full SDK with real input output, state surviving between calls.

$ rebind exec 'HID.MoveTo(500, 500) print(Screen.Size())'
2560	1440
$ rebind x 'foo = 19'
$ rebind x 'return foo + 23'
42

rebind exec - reads the chunk from stdin. A Lua error exits non-zero.

rebind repl is the interactive version: same runtime, TAB completion queried live from the VM (your own variables complete, not just SDK names), and unfinished chunks continue on the next line. ⌃D exits.

package

Builds the .rbp registry artifact — a gzipped tarball of the package (plaintext source and assets; VCS and build junk excluded). DRM is applied automatically when a package is distributed through the marketplace: package never encrypts.

$ rebind package
…check output…
packaged hello.rbp (3 files, 1.2 KB)

publish

Check → lint → package → upload for review. Requires a Developer account, a [marketplace] section in rebind.toml, a short_description, and an icon. The Rebind app’s authenticated session does the uploading; the CLI holds no credentials.

$ rebind publish
…check + lint output…
packaged hello.rbp (3 files, 1.2 KB)
uploaded @you/hello v0.0.1 — submitted for review

whoami

$ rebind whoami
@you  you@example.com
tier       developer
device     RBD_E90400001E341DE5DA83E393AA1B4035 (not attached)
transport  software

device is your registered Rebind Link with its live attachment state; transport is the session mode (hardware when your device drives output, software otherwise).