playbit / docs

Developer Tools

Playbit.app is the primary developer tool. It allows you to build & run programs, and browse documentation. pb run <source-dir-or-file-or-wasm> is a command-line interface for quickly running a playbit app.

pb

pb is the name of the Playbit command-line interface. It's bundled with Playbit.app and installed as part of the general toolchain, at ~/Library/Application Support/Playbit/toolchain and made available primarly through a portable alias at Playbit.app/Contents/SharedSupport/bin/pb:

$ /Applications/Playbit.app/Contents/SharedSupport/bin/pb --help
Usage: pb <command>
Commands:
  run   <file>...  Build and run a Playbit program
  build <file>...  Build a Playbit program
  ...

See pb <command> --help for more information about a command.

You can add /Applications/Playbit.app/Contents/SharedSupport/bin to your PATH to make pb available in your terminal. Exactly how to do this depends on your shell. In zsh (the default shell on macOS), add PATH=/Applications/Playbit.app/Contents/SharedSupport/bin:$PATH to ~/.zshenv

Virtual machine

Playbit.app is also a virtual machine and runtime: It can run Playbit apps, which are WebAssembly (wasm) modules, from the command line:

/Applications/Playbit.app/Contents/MacOS/Playbit program.wasm

Automation

Playbit.app can run your app fully automated, which can be very useful for integration testing and LLM workflows. To run a program automatically, you pass --remote-control to the Playbit VM executable:

/Applications/Playbit.app/Contents/MacOS/Playbit \
    --remote-control program.wasm

In the "remote control" mode of operation, stdin is a stream of JSON (JSONL) messages telling Playbit what to do. For example "move the mouse here", "press this keyboard key", "take a screenshot", "wait 5 seconds", etc. Information about changes are communicated as JSON (JSONL) messages on stdout.

See "Automation" for more information

Playbit agent skill

Playbit ships with an agent skill for coding assistants and other shell-capable agents.

The skill helps an agent:

If you have installed Playbit, the skill is available at:

~/Library/Application Support/Playbit/toolchain/skill

Install the skill like this (may vary by agent):

mkdir -p ~/.agents/skills
ln -s "$HOME/Library/Application Support/Playbit/toolchain/skill" ~/.agents/skills/playbit