Pear loads applications remotely from peers and allows anyone to create and share applications with peers.

Pear is an installable Peer-to-Peer (P2P) Runtime, Development & Deployment platform.

Build, share & extend unstoppable, zero-infrastructure P2P applications for Mobile, Desktop & Terminal.

Welcome to the Internet of Peers

  – Holepunch, the P2P Company

Peer-to-Peer applications built on, deployed with, running on Pear.

Encrypted peer-to-peer message, audio & video chatSecure peer-to-peer password & secrets manager   
KeetPearPass   

Throughout the documentation, indications of stability are provided. Some modules are well-established and used widely, making them highly unlikely to ever change. Other modules may be new, experimental, or known to have risks associated with their use.

The following stability indices have been used:

StabilityDescription
stableUnlikely to change or be removed in the foreseeable future
experimentalNew, untested, or has known issues
deprecatedBeing removed or replaced in the future
unstableMay change or be removed without warning

Pear is a native point-to-point peer-to-peer capable platform that consists of a runtime binary, an API, userland modules, a command-line interface, an on-demand daemon and an application shell to provide the capabilities to develop & deploy production P2P applications. With JavaScript and beyond.

Pear's runtime binary is built on Bare, a small and modular JavaScript runtime for desktop and mobile. Like Node.js, it provides an asynchronous, event-driven architecture for writing applications in the lingua franca of modern software. Unlike Node.js, embedding and cross-device are supported as core use cases, aiming to run just as well on mobile as desktop.

Guides on using Pear Runtime to build and share peer-to-peer applications.

Collection of How-tos using the essential peer-to-peer building-blocks in Pear applications.

The Pear global API is minimal and not intended as a standard library. Application & Integration libraries are supplied via installable modules prefixed with pear-.

Pear modules related directly to application environment.

ModuleDescriptionSystems    Stability
pear-crasherUncaught exceptions & uncaught rejections crash logger
stable
pear-messageSend inter-app pattern-matched object messages
stable
pear-messagesReceive object messages that match a given object pattern
stable
pear-pipeParent-app-connected pipe, the other end of pear-run pipe
stable
pear-runRun Pear child app by link. Returns a pipe to the child pipe
stable
pear-updatesReceive platform and application update notifications
stable
pear-user-dirsGet the path of user-specific directories
stable
pear-wakeupsReceive wakeup events, including link clicks external to app
stable

Pear modules that supply User Interface runtime capabilities.

ModuleDescriptionSystems    Stability
pear-electronPear User-Interface Library for Electron
stable
pear-bridgeLocal HTTP bridge for pear-electron applications
stable

Pear modules for general usage, including applications per case.

ModuleDescriptionSystems    Stability
pear-dropDrop data, including application reset
stable
pear-dumpSynchronize files from link to dir peer-to-peer or from-disk
stable
pear-gracedownPear graceful closer. For use with pipe.autoexit = false
stable
pear-infoRead Pear project information by link
stable
pear-linkParser-Serializer for pear:// links. Includes alias resolution
stable
pear-opwaitPear operation stream promise wrapper
stable
pear-releaseSet application production release version length
stable
pear-seedSeed or reseed a Pear app drive by link
stable
pear-stageSynchronize from-disk to app drive peer-to-peer
stable
pear-stampInterleave locals into a template, sync and stream
stable

Pear modules to assist with developing & debugging

ModuleDescriptionSystems    Stability
pear-inspectSecurely enable remote debugging protocol over Hyperswarm
stable
pear-hotmodsFor pear-electron UI apps. Frontend framework-agnostic live-reload
stable

Pear modules for runtime integrations. Such as pear-electron.

ModuleDescriptionSystems    Stability
pear-appdriveRead-only Hyperdrive API subset interface for application drives
stable
pear-aliasesList of aliases for pear://<alias> links
stable
pear-apiglobal.Pear API class
stable
pear-changelogChangelog parsing and diffing
stable
pear-constantsShared Pear constants
stable
pear-cmdCommand parser & definitions
stable
pear-errorsShared Pear error types
stable
pear-gunkShared builtins, overrides & linker mappings
unstable
pear-ipcInterprocess Communication library
stable
pear-refIO handle reference counter & tracker
stable
pear-rtiRuntime Information state bootstrap for API building
stable
pear-stateShared state structure & capabilities
stable
pear-terminalTerminal User Interface library
stable
pear-trybootUsed with pear-ipc, tries to boot sidecar on connect failure
stable

Modules that supply point-to-point peer-to-peer connection and storage capabilities.

The essential building-blocks for building powerful P2P applications using Pear.

NameDescriptionSystems    Stability
hypercoreA distributed, secure append-only log for creating fast, scalable P2P applications
stable
hyperbeeAn append-only B-tree running on a Hypercore. Allows sorted iteration and more
stable
hyperdriveA secure, real-time, efficient distributed P2P file-system
stable
autobaseA "virtual Hypercore" layer over many Hypercores owned by many different peers
stable
hyperdhtThe Distributed Hash Table (DHT) powering Hyperswarm
stable
hyperswarmA high-level API for finding and connecting to peers by topic
stable

Helper modules can be used together with the building-blocks to create cutting-edge P2P tools and application-modules.

NameDescriptionSystems    Stability
corestoreA Hypercore factory that simplifies managing Hypercore collections
stable
localdriveA file system interoperable with Hyperdrive
stable
mirror-driveMirror between a Hyperdrive and/or Localdrive
stable
@hyperswarm/secret-streamSecurely create connections between peers in a Hyperswarm
stable
compact-encodingBinary encoding schemes for efficient parser-serializers.
stable
protomuxMultiplex multiple message oriented protocols over a stream
stable

Pear's native runtime is Bare. The Bare global API is minimal and not intended as a standard library. Standard runtime functionality is provided via installable modules. prefixed with bare-.

ModuleDescriptionSystems    Stability
bare-abortCause abnormal program termination and generate a crash report
stable
bare-ansi-escapesParse and produce ANSI escape sequences
stable
bare-assertAssertion library for JavaScript
stable
bare-atomicsNative synchronization primitives for JavaScript
stable
bare-bufferNative buffers for JavaScript
stable
bare-bundleApplication bundle format for JavaScript
stable
bare-channelInter-thread messaging for JavaScript
stable
bare-consoleWHATWG debugging console for JavaScript
stable
bare-cryptoCryptographic primitives for JavaScript
stable
bare-daemonCreate and manage daemon processes in JavaScript
stable
bare-dgramNative UDP for JavaScript
stable
bare-dnsDomain name resolution for JavaScript
stable
bare-encodingWHATWG text encoding interfaces for JavaScript
stable
bare-envEnvironment variable support for JavaScript
stable
bare-eventsEvent emitters for JavaScript
stable
bare-fetchWHATWG Fetch implementation for Bare
stable
bare-form-dataForm data support for Bare
stable
bare-formatString formatting for JavaScript
stable
bare-fsNative file system for JavaScript
stable
bare-hrtimeHigh-resolution timers for JavaScript
stable
bare-http1HTTP/1 library for JavaScript
stable
bare-httpsHTTPS library for JavaScript
stable
bare-inspectInspect objects as strings for debugging
stable
bare-inspectorV8 inspector support for Bare
stable
bare-ipcLightweight pipe-based IPC for Bare
stable
bare-loggerLow-level logger for Bare with system log integration
stable
bare-moduleModule support for JavaScript
stable
bare-osOperating system utilities for JavaScript
stable
bare-packBundle packing for Bare
stable
bare-pathPath manipulation library for JavaScript
stable
bare-performancePerformance monitoring for Bare
stable
bare-pipeNative I/O pipes for JavaScript
stable
bare-queue-microtaskMicrotask queuing for Bare
stable
bare-readlineLine editing for interactive CLIs with command history
stable
bare-realmRealm support for Bare
stable
bare-replRead-Evaluate-Print-Loop environment for JavaScript
stable
bare-rpchttps://github.com/holepunchto/librpc ABI compatible RPC for Bare
stable
bare-semverMinimal semantic versioning library for Bare
stable
bare-signalsNative signal handling for JavaScript
stable
bare-streamStreaming data for JavaScript
stable
bare-structured-cloneStructured cloning algorithm for JavaScript
stable
bare-subprocessNative process spawning for JavaScript
stable
bare-tcpNative TCP sockets for JavaScript
stable
bare-timersNative timers for JavaScript
stable
bare-tlsTransport Layer Security (TLS) streams for JavaScript
stable
bare-ttyNative TTY streams for JavaScript
stable
bare-typeCross-realm type predicates for Bare
stable
bare-unpackBundle unpacking for Bare
stable
bare-urlWHATWG URL implementation for JavaScript
stable
bare-workerHigher-level worker threads for JavaScript
stable
bare-wsWebSocket library for JavaScript
stable
bare-zlibStream-based zlib bindings for JavaScript
stable
bare-zmqLow-level ZeroMQ bindings for JavaScript
stable

Compatibility modules for Node.js builtins in Bare can be found in bare-node.

Beyond the Pear CLI these ecosystem P2P CLI tools are additionally useful for day-to-day development and operations.

NameDescriptionSystems    Stability
HypershellA CLI to create and connect to P2P E2E encrypted shells
stable
HyperteleA swiss-knife proxy powered by hyperdht
stable
HyperbeamA one-to-one and end-to-end encrypted internet pipe
stable
HypersshA CLI to run SSH over the DHT.
stable
DrivesCLI that interacts with hyperdrive & localdrive
stable