Command-Line-Interface (CLI)
experimental
The Command Line Interface is the primary interface for Pear Development.
pear init [flags] <link|type=desktop> [dir]
pear init [flags] <link|type=desktop> [dir]
Create initial project files.
Template Types: desktop, terminal, terminal-node
Default Project directory path is
.
Template can also be initialized from a pear:// link, the template should contain a _template.json
file. This file defines the prompts which are converted to locals that are injected into the template.
pear dev [flags] [dir] [...app-args]
pear dev [flags] [dir] [...app-args]
Run a project in development mode from disk.
pear dev
has been deprecated, usepear run --dev
instead.
Alias for: pear run --dev <dir>
pear stage <channel|link> [dir]
pear stage <channel|link> [dir]
Synchronize local changes to channel or key.
Channel name must be specified on first stage, in order to generate the initial key. This key is unique to the combination of the application name, the channel name and the device's unique corestore key. This means the key does not change after the first time the channel is staged.
Outputs diff information and project link.
Each time new changes are staged, the length for the channel / link will update, hence updating the version. 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.
pear seed <channel|link> [dir]
pear seed <channel|link> [dir]
Seed project or reseed key.
Specify channel or link to seed a project or a remote link to reseed.
pear run [flags] <link|dir> [...app-args]
pear run [flags] <link|dir> [...app-args]
Run an application from a link or dir.
link
pear://<key>
| pear://<alias>
dir
file://<absolute-path>
| <absolute-path>
| <relative-path>
Examples
pear release <channel|link> [dir]
pear release <channel|link> [dir]
Set production release version.
Set the release pointer against a version (default latest).
Use this to indicate production release points. Once a channel or link has been released (setting a pointer for a given version) running the application (via pear run <link>
) will load the application at the released version even if more changes were staged.
Release rollbacks
Releases can generally be rolled back in one of two ways. First by updating the release pointer to a previous length using the --checkout
flag. For example:
Release "A" for channel
production
was at length500
Release "B" for channel
production
was at length505
The release can be rolled back to "A" (aka length 500
) via the following command:
This method doesn't add any file changes so will not show update diffs from the previous release version.
pear info [link|channel]
pear info [link|channel]
Read project information.
Supply a link or channel to view application information.
Supply no argument to view platform information.
pear dump [flags] <link> <dir>
pear 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 touch [flags] [channel]
pear touch [flags] [channel]
Create Pear link
Creates a Pear Link using channel name if provided or else a randomly generated channel name.
This command is useful for creating links for automations that use pear stage <link>
, pear release <link>
or pear seed <link>
.
pear sidecar
pear sidecar
The Pear Sidecar is a local-running HTTP and IPC server which provides access to corestores.
This command instructs any existing sidecar process to shutdown and then becomes the sidecar.
pear versions
pear versions
Output version information.
pear shift [flags] <source> <destination>
pear shift [flags] <source> <destination>
Move user application storage between applications.
<source>
and <destination>
are links.
pear reset [flags] <link>
pear reset [flags] <link>
Advanced. Reset an application to initial state
Clears application storage for a given application link.
WARNING: Confirmation will be requested as the storage will be deleted permanently and cannot be recovered. Use with caution.
pear gc [flags] [command]
pear gc [flags] [command]
Perform garbage collection and remove unused resources.
releases
Clear inactive releases
sidecars
Clear running sidecars
pear data [flags] [command]
pear data [flags] [command]
View database contents.
The database contains metadata stored on this device used by the Pear runtime.
apps
Installed apps
dht
DHT known-nodes cache
gc
Garbage collection records
pear data apps [flags] [link]
pear data apps [flags] [link]
List installed apps, filtered by [link]
if provided.
Last updated