Reference
Authoritative descriptions of Pear's CLI, runtime APIs, configuration, building blocks, and helper modules. Use this when you need a fact, not a tutorial.
Reference is the technical description of how Pear works. It's information-oriented: comprehensive, accurate, and dry. Use it to look up a flag, an API signature, or a configuration field.
If you're trying to accomplish a specific task, see How To. For the design rationale, see About Pear.
Bare is the runtime underneath. A small, zero-core JavaScript runtime with its own docs: the module system, native addons, embedding in native and mobile apps, and compiling to a standalone binary all live on the Bare tab. How the stack fits together maps the layers.
P2P is the peer-to-peer building blocks. Hypercore, Hyperswarm, Autobase, Hyperbee, Hyperdrive, HyperDHT, and Corestore—independent JavaScript modules for storage, discovery, and replication, with their own docs on the P2P tab. How the stack fits together maps the layers.
In this section
Pear
- Pear CLI—covers
pear stage,pear seed,pear build,pear install, and every flag. - Pear OTA—the
pear-runtimelibrary and JavaScript API for over-the-air updates inside a running Pear app. - Configuration—every key in
package.json'spearblock. - Pear API (removed)—the older direct-access
global.PearAPI, removed in v3. Use the Pear OTA (pear-runtime) module instead.
For a curated record of breaking changes and removals across these modules, see the Release Overview.
Bare
The runtime Pear is built on, and the kit for embedding it in native apps:
- Bare runtime API—the
Bareglobal: process properties, lifecycle, addons, threads, IPC. - Bare CLI—run a script or REPL with the
barecommand. - Bare Kit—the Worklet and IPC API for iOS, Android, and React Native.
Per-module API references (also linked from the Bare modules catalog): bare-fs, bare-os, bare-stream, bare-tcp, bare-fetch, bare-crypto, bare-subprocess, bare-rpc, bare-sqlite, bare-broadcast-channel, bare-sdl, bare-module-resolve, bare-module-traverse, bare-addon-resolve, bare-bluetooth-android, bare-bluetooth-apple, bare-module, bare-url, bare-atomics, bare-timers, bare-pipe, bare-semver, bare-form-data, bare-channel, bare-tls, bare-console, bare-structured-clone, bare-ipc, bare-inspector, bare-make, bare-prom-client, bare-posix, bare-mdns-discovery, bare-sidecar, bare-union-bundle, bare-mime, bare-apk.
CI & release
- Desktop release npm scripts—the common
package.jsonscripts in Pear Electron desktop repos. - Holepunch GitHub Actions—the reusable composite actions in
holepunchto/actionsfor building, signing, publishing, and recovering Pear apps and modules. - pear-ci GitHub Action—staging a Pear app from CI into a
pear://link with thepear-ciaction.
Module catalog
- Modules—the
pear-*libraries: application, UI, common, developer, integration. - Bare modules—the
bare-*runtime modules underpinning Pear.
For the peer-to-peer building blocks, helpers, and tools Pear apps are built on—Hypercore, Hyperswarm, Autobase, and the rest—see P2P's Reference.
Stability legend
Module pages call out a stability indicator. The four levels:
| Stability | Description |
|---|---|
| stable | Unlikely to change or be removed in the foreseeable future. |
| experimental | New, untested, or has known issues. |
| deprecated | Being removed or replaced in the future. |
| unstable | May change or be removed without warning. |