Command Line Interface (CLI)
Pear CLI: stage, seed, build, install, and day-to-day development commands.
The Command Line Interface is the primary interface for Pear Development.
This page tracks Pear v3. Several commands were removed in v3—most notably pear run, which is replaced by embedding the Pear OTA (pear-runtime) library. Removed commands are kept below with a badge and migration guidance.
pear build [flags]
Create a project deployment folder.
Assembles per-OS electron-forge makes—one per target architecture—into the multi-architecture deployment directory that pear stage reads from disk: a package.json plus a by-arch/<platform-arch>/app/ tree.
Each make runs on its own OS, so transfer the per-platform outputs to one machine first, then pass each via its --<platform-arch>-app flag. Run pear build from outside the application source tree (or point --target at a sibling folder) so the deployment output is never re-staged into itself—see stage size increases. If you omit --target, the directory is auto-named <name>-<version> from package.json.
As of Pear v3, pear build is provided by the standalone pear-build module and integrated into the CLI.
--package [path] Path to project package.json
--target [path] Target build dir
--darwin-arm64-app [path] Path to Mac ARM64 app
--darwin-x64-app [path] Path to Mac x64 app
--linux-arm64-app [path] Path to Linux ARM64 app
--linux-x64-app [path] Path to Linux x64 app
--win32-x64-app [path] Path to Windows x64 app
--win32-arm64-app [path] Path to Windows ARM64 app
--ios-arm64 [path] Path to iOS ARM64 folder (ota bundle and assets)
--ios-arm64-simulator [path] Path to iOS ARM64-Simulator folder (ota bundle and assets)
--ios-x64-simulator [path] Path to iOS x64-Simulator folder (ota bundle and assets)
--android-arm64 [path] Path to Android ARM64 folder (ota bundle and assets)
--json Newline delimited JSON output
--help|-h Show helpFor the full release walkthrough, see Deploy a Pear desktop app and Build desktop distributables.
pear stage <link> [dir]
Synchronize local changes to pear hypercores.
To generate a link, see pear touch.
Pear links hold a key, this is the basis for application discovery.
Outputs diff information and project link.
Each time new changes are staged, the length will increase. This change can be replicated to any peer who know the link and is connected. If they run pear info <link>, they will see the length update even if the application is not being seeded. Connections can potentially linger after seeding an application but will eventually close.
--dry-run|-d Execute a stage without writing
--ignore <paths> Comma-separated path ignore list
--purge Remove ignored files if present in previous stage
--only <paths> Filter by paths. Comma-separated
--truncate <n> Advanced. Truncate to version length n
--json Newline delimited JSON output
--help|-h Show helppear provision <source-verlink> <target-link> <production-verlink>
Pre-production block sync
Synchronize blocks to a pre-production target link
The target can then be multi-signed against a production link
Use pear touch to generate target link
Arguments:
<source-verlink> Versioned source link
<target-link> Target link to sync to
<production-verlink> Versioned link to sync against
Flags:
--dry-run|-d Execute provision without writing
--json Newline delimited JSON output
--help|-h Show helppear multisig [command]
Production signing coordination. Gate production releases behind a quorum of signing keys instead of a single machine's key. Since Pear v3 removed the single-key pear release command, quorum multisig (together with pear provision) is the path to production. See Set up multisig and Sign with multisig for the end-to-end flow.
| Command | Description |
|---|---|
keys get [name=default] | Get a signing key, initializing it if needed (--secret also prints the private key) |
keys paths [name=default] | Print paths to the public & private key files |
keys list | List signing keys |
keys add <name> <public-key> [private-key] | Import a signing keypair or add a known public key |
keys remove <name> | Remove a signing key |
link | Print the project multisig link (derived from the multisig field in pear.json) |
request <verlink> | Create a multisig request from a versioned source link |
sign <request> [name=default] | Sign a multisig request with a local signing key |
verify <source-link> <request> [...responses] | Verify the request and responses (commit dry-run) |
commit <source-link> <request> [...responses] | Apply signatures to sync the source drive to the multisig drive (go live) |
--config [./pear.json] Config file path
--peer-update-timeout <ms> Peer update timeout in ms (request, verify, commit)
--json Newline delimited JSON output
--help|-h Show helppear seed <link>
Seed project or reseed key.
Specify link to seed a project or a remote link to reseed.
Seeding will sparsely replicate the application. This means the entire history of the link is available, but most likely only the most recent version will be replicated.
--no-tty Disable tty features
--stats-interval <ms> Stats refresh interval in milliseconds
--json Newline delimited JSON output
--help|-h Show helppear release <link> [dir]
removed
Deprecated in Pear v2.6.5, removed as of Pear v3.
The single-key release pointer has been replaced by quorum-based production releases. Use pear provision to block-sync a pre-production target and pear multisig to cosign it onto a production link.
pear changelog [link]
View project changelog
Supply a link to view application changelog
Shows Pear changelog by default
--max|-m <n=10> Maximum entries to show
--of <semver=^*> SemVer filter - default: latest major
--full Show entire changelog
--json Newline delimited JSON output
--help|-h Show helppear info [link] [dir]
Read project information. [dir] is the project directory path (defaults to the current directory).
Supply a link to view application information.
Supply no argument to view platform information.
--metadata View metadata only
--manifest View app manifest only
--multisig View multisig info only
--key View key only
--json Newline delimited JSON output
--help|-h Show helppear dump [flags] <link> <dir>
Synchronize files from link to dir.
To dump to stdout, use - in place of <dir>.
<link> can contain a path portion to dump a subset of the files for the Pear application. For example, to dump only the CHANGELOG.md from Keet into a dump-dir directory run:
pear dump pear://keet/CHANGELOG.md dump-dir/ --dry-run|-d Execute a dump without writing
--checkout <n> Dump from specified checkout, n is version length
--only <paths> Filter by paths. Implies --no-prune. Comma-seperated
--force|-f Force overwrite existing files
--list List paths at link. Sets <dir> to -
--no-prune Prevent removal of existing paths
--json Newline delimited JSON output
--help|-h Show helppear touch [flags]
Creates a Pear link. Pear links hold a key, this is the basis for application discovery.
--json Newline delimited JSON output
--help|-h Show helppear sidecar [command]
The Pear Sidecar is a local-running IPC server for corestore access.
This command instructs any existing sidecar process to shutdown and then becomes the sidecar.
| Command | Description |
|---|---|
shutdown | Shut down the running sidecar |
inspect | Enable the running sidecar inspector |
--log-level <level> Level to log at. 0,1,2,3 (OFF,ERR,INF,TRC)
--log-labels <list> Labels to log (internal, always logged)
--log-fields <list> Show/hide: date,time,h:level,h:label,h:delta
--log-stacks Add a stack trace to each log message
--help|-h Show helppear versions
Output version information.
--modules|-m Include module versions
--json Newline delimited JSON output
--help|-h Show helppear presets [flags] [command]
removed
Deprecated in Pear v2.6.5, removed as of Pear v3.
Per-command default flags are no longer configurable through the CLI.
pear shift [flags] <source> <destination>
removed
Deprecated in Pear v2.6.5, removed as of Pear v3.
Moving user application storage between applications is no longer supported from the CLI.
pear drop [flags] [command]
removed
Deprecated in Pear v2.6.5, removed as of Pear v3.
pear drop was tied to the removed pear run model. See Manage installed applications for resetting application storage.
pear gc [flags] [command]
Perform garbage collection and remove unused resources.
| Commands | Description |
|---|---|
| sidecars | Clear running sidecars |
cores [link] | Clear corestore cores (optionally by link) |
--json Newline delimited JSON output
--help|-h Show helppear data [flags] [command]
Explore the platform database.
The database contains metadata stored on this device used by the Pear runtime.
| Commands | Description |
|---|---|
| dht | DHT known-nodes cache |
| multisig | Multisig records |
--json Newline delimited JSON output
--help|-h Show helppear init
removed
pear init has been removed from the Pear CLI—it exits with ERR_LEGACY: pear init has been removed.
To scaffold a project, clone the official template instead—holepunchto/hello-pear-electron—and follow Start from the hello-pear-electron template.
pear install <link>
Install a Pear application—or the Pear platform itself—from a pear:// link.
pear install pear://<key> installs any application built with pear build, pulling it from the swarm and wiring it up locally so it can be launched and kept up to date over the air. It works for both applications and binaries. Installs go directly into the OS application folder.
--only <paths> Advanced. Filter by app filenames
--timeout <seconds> Advanced. Override network timeout (30s)
--to <dir> Advanced. Override install target directory
--dht-bootstrap <nodes> Advanced. Custom DHT bootstrap
--json Newline delimited JSON output
--help|-h Show helpAs of Pear v3, pear install is part of the Pear CLI, provided by the standalone pear-install module. For example, install Keet peer-to-peer with:
pear install pear://keetSee Storage and distribution for the install model and the direction described in Pear Evolution.
pear run [flags] <link|dir> [...app-args]
removed
Deprecated in Pear v2.6.5, removed as of Pear v3. Running pear run now exits with:
pear run has been removed.
Use the pear-runtime module instead: https://www.npmjs.com/package/pear-runtimeApplications are now launched by embedding the Pear OTA (pear-runtime) library, which provides over-the-air peer-to-peer updates, application storage, and Bare workers. See Migrate from pear run to Pear OTA for the move.
See also
- Manage installed applications—resetting and inspecting installed apps.
- Distribute as a binary—packaging a release built from these commands.
- Pear OTA reference—the
pear-runtimelibrary that replacespear run.