# Documentation - [Pear by Holepunch](/): Pear loads applications remotely from peers and lets anyone create and share applications with peers. - [Availability and blind peering](/explanation/availability-and-blind-peering): Keeping Pear application data and bundles reachable when authors go offline—seeding, its limits, and blind peering as a cache layer. - [One core, many platforms](/explanation/bare-on-native): The pattern behind cross-platform Pear apps: a portable JavaScript core running in a Bare worklet, a thin native UI shell, and a typed RPC seam between them. - [Inside Bare](/explanation/bare-runtime): Bare is a small, embeddable JavaScript runtime built on libjs and libuv. Here's what it adds on top, why it stays deliberately minimal, and how its lifecycle keeps mobile apps well-behaved. - [Dependencies and network](/explanation/dependencies-and-network): Why Pear ships with npm as the install path, what your dependencies actually do at runtime, and what your IP discloses on the swarm. - [From append-only logs to files](/explanation/from-logs-to-files): How Hypercore, Hyperblobs, and Hyperdrive stack—and which layer to use for blocks, large objects, and path-addressed files. - [About Pear](/explanation): Why Pear is shaped the way it is—peer-to-peer, append-only logs, the runtime split, and the trade-offs behind each choice. - [Pear desktop application architecture](/explanation/pear-desktop-architecture): How a typical Pear + Electron desktop app splits OTA updates, on-disk storage, and Bare workers—main process, renderer, and data plane. - [Peer-to-peer, demystified](/explanation/peer-to-peer-demystified): What changes when Pear applications connect without a central server—hole punching, public-key identity, and the roles of HyperDHT and Hyperswarm. - [Release pipeline](/explanation/release-pipeline): Why Pear desktop releases use stage, provision, and multisig pear links—the trust ladder, release lines, deployment directory, and recurring cycle. - [Runtime and languages](/explanation/runtime-and-languages): Pear runs JavaScript on the Bare runtime; here's why, what other languages can plug in via native addons, and how to structure code so one app runs everywhere. - [Storage and distribution](/explanation/storage-and-distribution): Where Pear keeps applications and their data on disk, why it's structured that way, and how the swarm gets new versions to your peers. - [The Pear stack](/explanation/the-pear-stack): How Pear and Bare fit together—from the native C foundations up through the Bare runtime, the peer-to-peer building blocks, and the Pear platform to the apps people run. - [Using Bare on its own](/explanation/use-bare-standalone): Bare is a general-purpose JavaScript runtime you can adopt without Pear—embeddable, cross-platform, and modular. Here's when that makes sense and where the runtime-only path goes. - [Workers](/explanation/workers): Why a Pear app's peer-to-peer logic lives in a Bare worker behind a single IPC stream—what the pattern buys you, where to put the boundary, and how the host and worker halves talk. - [Getting started](/getting-started): A four-part onboarding path that takes you from a 5-file local Pear chat to the full hello-pear-electron production scaffold to a live OTA cycle and a multisig release. - [How To](/how-to): Goal-oriented recipes for getting things done with Pear. Each guide solves one specific problem from start to finish. - [Manage installed applications](/how-to/manage-installed-applications): Find the Pear applications installed on your machine and reset an app's local storage when you need a clean slate. - [Troubleshoot common issues](/how-to/troubleshooting): Fixes for Pear and Bare development issues. - [Reference](/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. - [Release Overview](/release-overview): Curated overview of releases across Pear, Bare, and their modules—breaking changes, removals, and additions, with migration guidance for each. - [Start from a template](/getting-started/from-a-template): Two official Pear boilerplates to start from—hello-pear-electron for desktop GUI apps and hello-pear-bare for standalone terminal binaries, both with peer-to-peer over-the-air updates. Pick the one that matches what you're shipping. - [Start from the hello-pear-bare template](/getting-started/from-a-template/start-from-hello-pear-bare): An alternative getting started path for terminal apps: clone the hello-pear-bare boilerplate and learn how a standalone Bare process wires pear-runtime over-the-air updates, Corestore, and Hyperswarm—then build it into a cross-platform binary. - [Start from the hello-pear-electron template](/getting-started/from-a-template/start-from-hello-pear-electron): An alternative getting started path: clone the hello-pear-electron boilerplate and learn where the frontend lives, where the app logic lives, and how the preload bridge and worker IPC connect them—then add a feature end to end. - [Build a peer-to-peer chat](/getting-started/build-a-peer-to-peer-chat/build-a-peer-to-peer-chat): First of four onboarding steps: type along five files to get a working Electron chat that finds peers on the public DHT and streams messages directly. - [Reshape into a production app](/getting-started/build-a-peer-to-peer-chat/reshape-into-a-production-app): Second of four onboarding steps: take part 1's from-scratch chat and reshape it into the production hello-pear-electron scaffold—a Bare chat worker, an Autobase room with blind-pairing invites, on-disk persistence, a separate OTA updater worker, and a polished Tailwind UI with a copy-invite button. - [Ship your app](/getting-started/build-a-peer-to-peer-chat/ship): Third of four onboarding steps: pear touch, an upgrade link, electron-forge make, pear build, pear stage, and pear provision to publish your first version. - [Deploy over-the-air updates](/getting-started/build-a-peer-to-peer-chat/update): Fourth of four onboarding steps: run the installed app, ship a second version, watch the OTA cycle, and preview multisig. - [Add blind peering to a chat app](/how-to/blind-peering/add-blind-peering-to-a-chat-app): Keep a chat room reachable when none of its writers are online by attaching a blind-peering relay on top of the pear-chat scaffold. - [Keep data available with blind peering](/how-to/blind-peering/keep-data-available-with-blind-peering): Use a blind-peering client to ask blind peers to keep your Hypercores and Autobases available even when no writer is online—the Pear/Bare logic, no UI required. - [Connect to many peers by topic with Hyperswarm](/how-to/connect-to-peers/connect-to-many-peers-by-topic-with-hyperswarm): Discover peers on a topic and keep connections alive with Hyperswarm. - [Connect two peers by key with HyperDHT](/how-to/connect-to-peers/connect-two-peers-by-key-with-hyperdht): Connect client and server peers by public key using HyperDHT hole punching. - [Host multiple rooms in one chat app](/how-to/connect-to-peers/host-multiple-rooms-in-one-chat-app): Extend the pear-chat scaffold from a single room to an account that owns and joins many rooms, each with its own Autobase. - [Add Keet identity to a chat app](/how-to/manage-identity/add-keet-identity-to-a-chat-app): Anchor a chat user to a portable identity key derived from a mnemonic, using keet-identity-key on top of the pear-chat scaffold. - [Create a portable identity with Keet identity keys](/how-to/manage-identity/create-a-portable-identity-with-keet-identity-key): Derive a portable identity from a mnemonic, attest a per-device key, then sign and verify data with it—the Pear/Bare logic, no UI required. - [Migrate from pear run to Pear OTA](/how-to/operate-an-app/migration): Move off the removed pear run runtime and the global Pear API onto Pear OTA (the pear-runtime library). - [Bundle a Bare app](/how-to/run-on-native/bundle-a-bare-app): Package a Bare program two ways: an embeddable bundle for worklets with bare-pack, and a standalone executable for desktop and terminal with bare-build. - [Embed Bare in a React Native app](/how-to/run-on-native/embed-bare-in-react-native): Run a Bare worklet from a React Native or Expo app and exchange messages with it over the bare-kit IPC channel. - [Handle app suspension](/how-to/run-on-native/handle-app-suspension): When a Bare process enters suspend state every active I/O handle must be stopped or unreffed—otherwise the OS will force-terminate the app without warning. - [Type a native RPC bridge](/how-to/run-on-native/type-a-native-rpc-bridge): Replace raw IPC bytes between a native shell and a Bare worklet with a typed, schema-generated RPC seam using hyperschema and bare-rpc. - [Replicate and persist with Hypercore](/how-to/store-and-replicate/replicate-and-persist-with-hypercore): Persist messages and streams with append-only Hypercore replication. - [Share append-only databases with Hyperbee](/how-to/store-and-replicate/share-append-only-databases-with-hyperbee): Writer and reader peers with Hyperbee, Corestore, and Hyperswarm. - [Work with many Hypercores using Corestore](/how-to/store-and-replicate/work-with-many-hypercores-using-corestore): Manage and co-replicate many named cores from one Corestore. - [Back up photos in a peer-to-peer app](/how-to/stream-and-share-media/back-up-photos-in-a-peer-to-peer-app): Decode local photos with bare-ffmpeg/bare-media and push them into a Hyperblobs store on top of the hello-pear-electron scaffold. - [Create a full peer-to-peer filesystem with Hyperdrive](/how-to/stream-and-share-media/create-a-full-peer-to-peer-filesystem-with-hyperdrive): Mirror local folders into Hyperdrive and replicate with reader peers. - [Share files in a peer-to-peer app](/how-to/stream-and-share-media/share-files-in-a-peer-to-peer-app): Swap the hello-pear-electron room for a Hyperdrive so peers can publish files into a shared folder and replicate them through the same scaffold. - [Store and serve large media with Hyperblobs](/how-to/stream-and-share-media/store-and-serve-large-media-with-hyperblobs): Store large files and media as blobs on a Hypercore, replicate them over Hyperswarm, and serve them to a UI over local HTTP with range requests—the Pear/Bare logic, no UI required. - [Stream a live camera in a peer-to-peer app](/how-to/stream-and-share-media/stream-a-live-camera-in-a-peer-to-peer-app): Chunk live camera frames into Hyperblobs and serve them with hypercore-blob-server on top of the hello-pear-electron scaffold. - [Stream stored video in a peer-to-peer app](/how-to/stream-and-share-media/stream-stored-video-in-a-peer-to-peer-app): Serve stored video files over hypercore-blob-server so peers can stream them with range requests on top of the hello-pear-electron scaffold. - [Bare Kit](/reference/bare/bare-kit): Reference for bare-kit and react-native-bare-kit: the Worklet API for running an isolated Bare thread inside a native app, and the IPC channel between host and worklet. - [Bare CLI](/reference/bare/cli): Reference for the bare command: evaluate a script, start a REPL, and the flags for inspecting, evaluating, and printing. - [Bare runtime API](/reference/bare/runtime): Reference for the Bare global namespace: process properties, lifecycle methods and events, native addons, lightweight threads, and the embedder IPC channel. - [Desktop release npm scripts](/reference/ci-and-release/desktop-release-npm-scripts): Reference for common npm scripts in Pear Electron desktop repos—dev start, lint, package, and make targets before pear build. - [Holepunch GitHub Actions](/reference/ci-and-release/github-actions): Reference for the shared composite GitHub Actions in holepunchto/actions—Pear app CI, release publishing, recovery, and the Bare native-addon prebuild pipeline. - [pear-ci GitHub Action](/reference/ci-and-release/pear-ci-action): Reference for the holepunchto/actions/pear-ci GitHub Action—inputs, outputs, validation, and the underlying pear-ci CLI for staging a Pear app from CI. - [compact-encoding](/reference/helpers/compact-encoding): Small binary encoding toolkit for protocol messages and storage formats. - [Corestore](/reference/helpers/corestore): Factory and replication manager for groups of named Hypercores. - [Localdrive](/reference/helpers/localdrive): Local filesystem adapter with a Hyperdrive-like API. - [MirrorDrive](/reference/helpers/mirrordrive): Diff and sync engine for copying between drive-like APIs. - [Protomux](/reference/helpers/protomux): Multiplex multiple framed protocols over one transport stream. - [NoiseSecretStream](/reference/helpers/secretstream): Noise-encrypted duplex stream used for Holepunch peer transports. - [Autobase](/reference/building-blocks/autobase): Multi-writer linearization layer for building deterministic views from many Hypercores. - [Hyperbee](/reference/building-blocks/hyperbee): Append-only B-tree on Hypercore for sorted key/value data. - [Hypercore](/reference/building-blocks/hypercore): Secure distributed append-only log for large datasets and realtime streams. - [HyperDHT](/reference/building-blocks/hyperdht): P2P DHT for keyed peer lookup, hole punching, and encrypted direct connections. - [Hyperdrive](/reference/building-blocks/hyperdrive): Secure real-time distributed filesystem built on Hypercore-based storage. - [Hyperswarm](/reference/building-blocks/hyperswarm): Topic-based peer discovery and encrypted connections on top of HyperDHT. - [Bare modules](/reference/modules/bare-modules): Catalog of `bare-*` runtime modules that supply Bare's standard-library functionality (process, fs, net, crypto, streams, …), grouped by area. - [Modules](/reference/modules/pear-modules): Catalog of installable Pear modules—application, UI, common, developer, and integration libraries shipped as `pear-*` packages. - [Application Programming Interface (API)](/reference/pear/api): Reference for global Pear and Bare APIs in Pear applications. - [Command Line Interface (CLI)](/reference/pear/cli): Pear CLI: stage, seed, build, install, and day-to-day development commands. - [Configuration](/reference/pear/configuration): Pear package.json fields and pear application configuration. - [Pear OTA](/reference/pear/runtime): Pear OTA (the pear-runtime module) for peer-to-peer application deployment and over-the-air updates. - [Drives](/reference/tools/drives): Reference for the Drives CLI: create drives, mirror directories, and seed Hyperdrives. - [Hyperbeam](/reference/tools/hyperbeam): Reference for the Hyperbeam CLI: create an end-to-end encrypted one-to-one pipe over HyperDHT. - [Hypershell](/reference/tools/hypershell): Reference for the Hypershell CLI tools: key generation, remote shell access, file copy, and tunneling. - [Hyperssh](/reference/tools/hyperssh): Reference for the Hyperssh CLI: SSH, SSHFS, and RDP access over HyperDHT. - [Hypertele](/reference/tools/hypertele): Reference for the Hypertele CLI: expose a local TCP or Unix service over HyperDHT and consume it from a local listener. - [Build desktop distributables](/how-to/operate-an-app/build-and-package/build-desktop-distributables): Produce signed macOS, Windows, and Linux artifacts for a Pear Electron app, then assemble a multi-architecture deployment directory for pear stage. - [Distribute as a binary](/how-to/operate-an-app/build-and-package/distribute-as-binary): Ship a Pear application as a small bootstrap binary that pulls the latest version from the swarm. One binary serves every future release. - [Submit to app stores](/how-to/operate-an-app/build-and-package/submit-to-app-stores): Package a Pear Electron desktop app for Flathub and the Snap Store—prepare the manifests, test the packages locally, and publish releases for review. - [Build and sign desktop apps with GitHub Actions](/how-to/operate-an-app/github-actions/build-and-sign-in-ci): Build, code-sign, and notarize a Pear Electron app on macOS, Windows, and Linux from GitHub Actions with the make-pear-app action, then hand the artifacts to pear build or pear-ci. - [Publish with GitHub Actions](/how-to/operate-an-app/github-actions/publish-with-github-actions): Auto-publish and update a Pear app from CI with the pear-ci GitHub Action—push to your repo and a stable pear:// link is staged for you. - [Deploy your application](/how-to/operate-an-app/manual-deployment/deployment): Operator how-to for the eight Foundational Steps of the desktop release flow: touch, upgrade link, version, make, pear build, stage, provision, and multisig. - [Troubleshoot desktop releases](/how-to/operate-an-app/manual-deployment/troubleshoot-desktop-releases): Fix common Pear desktop OTA and staging problems—version bumps, upgrade links, seeding, lost keys, and pear build folder layout. - [Set up multisig](/how-to/operate-an-app/multisig/set-up-multisig): One-time setup for a multisig production drive: generate signing keys, configure pear.json, compute the multisig link, and point upgrade at it. - [Sign with multisig](/how-to/operate-an-app/multisig/sign-with-multisig): The repeatable multisig release flow: prepare a signing request, collect a quorum of signatures, verify, and commit the production drive. - [Troubleshoot multisig](/how-to/operate-an-app/multisig/troubleshoot-multisig): Fix multisig release problems: requests refused for unhealthy seeding, interrupted commits, INCOMPATIBLE_SOURCE_AND_TARGET, and recovering lost write access. - [bare-addon-resolve](/reference/bare/modules/bare-addon-resolve): Reference for bare-addon-resolve: the low-level native-addon resolution algorithm for Bare, exposed as a generator. - [bare-apk](/reference/bare/modules/bare-apk): Reference for bare-apk: Android APK and app-bundle packaging tools for Bare. - [bare-atomics](/reference/bare/modules/bare-atomics): Reference for bare-atomics: native cross-thread synchronization primitives for Bare—mutex, semaphore, condition variable, and barrier. - [bare-bluetooth-android](/reference/bare/modules/bare-bluetooth-android): Reference overview for bare-bluetooth-android: Android Bluetooth Low Energy bindings for Bare, covering both the central (scanner/client) and peripheral (GATT server) roles. - [bare-bluetooth-apple](/reference/bare/modules/bare-bluetooth-apple): Reference overview for bare-bluetooth-apple: Apple CoreBluetooth bindings for Bare, covering both the peripheral and central roles. - [bare-broadcast-channel](/reference/bare/modules/bare-broadcast-channel): Reference for bare-broadcast-channel: multi-producer, multi-consumer inter-thread broadcast messaging for Bare. - [bare-channel](/reference/bare/modules/bare-channel): Reference for bare-channel: point-to-point inter-thread messaging for Bare, with transferable handles and stream interfaces. - [bare-console](/reference/bare/modules/bare-console): Reference for bare-console: a WHATWG console implementation for Bare—logging, timers, counters, assertions, and tables. - [bare-crypto](/reference/bare/modules/bare-crypto): Reference for bare-crypto: cryptographic primitives for Bare—hashing, HMAC, ciphers, key derivation, signing, random bytes, and WebCrypto. - [bare-fetch](/reference/bare/modules/bare-fetch): Reference for bare-fetch: a WHATWG Fetch implementation for Bare, with Request, Response, and Headers. - [bare-form-data](/reference/bare/modules/bare-form-data): Reference for bare-form-data: WHATWG FormData, Blob, and File support for Bare, with a toBlob helper for multipart bodies. - [bare-fs](/reference/bare/modules/bare-fs): Reference for bare-fs: native file system operations for Bare, with an API that closely follows the Node.js fs module across promise, callback, and synchronous forms. - [bare-inspector](/reference/bare/modules/bare-inspector): Reference for bare-inspector: V8 inspector support for Bare—drive the inspector protocol from a session and capture heap snapshots. - [bare-ipc](/reference/bare/modules/bare-ipc): Reference for bare-ipc: lightweight pipe-based inter-process communication for Bare—a duplex stream over bare-pipe file handles. - [bare-make](/reference/bare/modules/bare-make): Reference for bare-make: an opinionated CMake-based build-system generator for Bare native addons, with a JS API and a CLI. - [bare-mdns-discovery](/reference/bare/modules/bare-mdns-discovery): Reference for bare-mdns-discovery: multicast DNS (mDNS) queries and service discovery for Bare. - [bare-mime](/reference/bare/modules/bare-mime): Reference for bare-mime: MIME-type parsing for Bare—type, subtype, and parameters. - [bare-module-resolve](/reference/bare/modules/bare-module-resolve): Reference for bare-module-resolve: the low-level module resolution algorithm for Bare, exposed as a synchronous or asynchronous generator. - [bare-module-traverse](/reference/bare/modules/bare-module-traverse): Reference for bare-module-traverse: low-level module graph traversal for Bare, yielding every dependency, addon, and asset of an entry module. - [bare-module](/reference/bare/modules/bare-module): Reference for bare-module: Bare's module system—CommonJS and ESM resolution, loading, and the require / import.meta surfaces. - [bare-os](/reference/bare/modules/bare-os): Reference for bare-os: operating-system utilities for Bare—platform and CPU info, directories, memory and load, process priority, and environment access. - [bare-pipe](/reference/bare/modules/bare-pipe): Reference for bare-pipe: native I/O pipes for Bare—duplex pipe streams over file descriptors and named pipes, with a server for accepting connections. - [bare-posix](/reference/bare/modules/bare-posix): Reference for bare-posix: POSIX-specific bindings for Bare—user, group, and identity calls. - [bare-prom-client](/reference/bare/modules/bare-prom-client): Reference overview for bare-prom-client: a Prometheus metrics client for Bare, API-compatible with the prom-client package. - [bare-rpc](/reference/bare/modules/bare-rpc): Reference for bare-rpc: a librpc ABI-compatible RPC layer for Bare that frames typed requests and replies over a duplex stream. - [bare-sdl](/reference/bare/modules/bare-sdl): Reference overview for bare-sdl: SDL bindings for Bare—windows, GPU-accelerated rendering, textures, input events, and audio devices. - [bare-semver](/reference/bare/modules/bare-semver): Reference for bare-semver: a minimal semantic-versioning library for Bare—parse versions, build comparators and ranges, and test satisfaction. - [bare-sidecar](/reference/bare/modules/bare-sidecar): Reference for bare-sidecar: start and manage a Bare sidecar process from a Node.js or Electron host. - [bare-sqlite](/reference/bare/modules/bare-sqlite): Reference for bare-sqlite: synchronous SQLite bindings for Bare, with a DatabaseSync/StatementSync API close to Node.js node:sqlite. - [bare-stream](/reference/bare/modules/bare-stream): Reference for bare-stream: streaming data for Bare—Node-style Readable/Writable/Duplex/Transform streams, stream utilities, and the WHATWG streams API. - [bare-structured-clone](/reference/bare/modules/bare-structured-clone): Reference for bare-structured-clone: the HTML structured-clone algorithm for Bare—structuredClone plus low-level serialize/deserialize with transfer. - [bare-subprocess](/reference/bare/modules/bare-subprocess): Reference for bare-subprocess: native process spawning for Bare, with an API close to the Node.js child_process module. - [bare-tcp](/reference/bare/modules/bare-tcp): Reference for bare-tcp: native TCP sockets and servers for Bare, with an API close to the Node.js net module. - [bare-timers](/reference/bare/modules/bare-timers): Reference for bare-timers: native setTimeout, setInterval, setImmediate, and their clear functions for Bare, plus ref/unref control over event-loop references. - [bare-tls](/reference/bare/modules/bare-tls): Reference for bare-tls: Transport Layer Security (TLS) streams for Bare, layered over a duplex socket, with a server and connect helper. - [bare-union-bundle](/reference/bare/modules/bare-union-bundle): Reference for bare-union-bundle: layer multiple Bare bundles into a single union bundle and load modules across the layers. - [bare-url](/reference/bare/modules/bare-url): Reference for bare-url: a WHATWG URL and URLSearchParams implementation for Bare, with file-URL helpers.