diff --git a/README.md b/README.md index 8ada94e..2392115 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ References for Pear Runtime. * [Application-Programming-Interface (API)](./reference/pear/api.md) * [Application Configuration](./reference/pear/configuration.md) * [Troubleshooting Applications](./reference/pear/troubleshooting.md) +* [Frequently Asked Questions](./reference/pear/faq.md) > The Pear Runtime uses [Bare](https://github.com/holepunchto/bare) JavaScript runtime, which is a small and modular JavaScript runtime for desktop and mobile. To learn more, see [Bare Reference](./reference/bare/overview.md). diff --git a/SUMMARY.md b/SUMMARY.md index 11d1c61..7b4de07 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -8,6 +8,7 @@ * [Application-Programming-Interface (API)](./reference/pear/api.md) * [Application Configuration](./reference/pear/configuration.md) * [Troubleshooting Applications](./reference/pear/troubleshooting.md) +* [Frequently Asked Questions](./reference/pear/faq.md) ### Bare reference * [Overview](./reference/bare/overview.md) diff --git a/reference/pear/faq.md b/reference/pear/faq.md new file mode 100644 index 0000000..e5fea8b --- /dev/null +++ b/reference/pear/faq.md @@ -0,0 +1,76 @@ +# Frequently Asked Questions + +## How Do I Get a List of Pear Applications I've Installed? + +Running the following command in the terminal will list installed applications; + +```console +pear data apps +``` + +It will return a list like the following: + +``` +- pear://keet + storage: ./pear/app-storage/by-dkey/197ea022b663edbedcf0b2a0fe44ebc99c21448cb46d375ec77d95de6e0a4c1a + +- pear://runtime + storage: ./pear/app-storage/by-dkey/50f2c1326de970da319534164017f23101c6badd5497a99045f8d9ef13978995 + +- pear://38cna455dbguiatg46z98cs7b6p4t4sh6hskozuhmipmpkxmmeuy + storage: ./pear/app-storage/by-dkey/be6ff2fc20eb691af1ff7b90d5848ee1e22d2fe4fab031900e1014e224f659ab +``` + +For more information about the `pear data apps` command, see the [cli docs](./cli.md#pear-data-apps-flags-link). + +## How Do I Uninstall a Pear Application? + +Uninstalling Pear Applications is currently not supported. You can reset the storage for an application via the `pear reset ` command. This is a **destructive** command that will permanently delete the storage for the application loosing all data it contains. Use with caution. + +For more information about the `pear reset` command, see the [cli docs](./cli.md#pear-reset-flags-less-than-link-greater-than). + +## Where is the Pear Application stored? + +The Pear framework, applications and their storage are all within the `pear` directory. The directory's path depends on the operating system: + +| OS | Pear Path | +| ------- | ------------------------------------ | +| MacOs | `~/Library/Application Support/pear` | +| Linux | `~/.config/pear` | +| Windows | `%userprofile%\AppData\Roaming\pear` | + +This path can be accessed in a Pear application via [`Pear.config.pearDir`](./api.md#pear.config.peardir-less-than-string-greater-than). + +Within the `pear` directory the Pear framework itself is stored where the `current` symlink points, Pear applications are stored in the `corestores` directory, and Pear application storage (aka [`Pear.config.storage`](./api.md#pear.config.storage-less-than-string-greater-than) for applications) are stored in `app-storage`. + +Note that Pear applications and the Pear platform are stored in a [`corestore`](../../helpers/corestore.md) as [`hyperdrive`](../../building-blocks/hyperdrive.md)s so are not easily inspectable via a file explorer. To see the files distributed with an application use [`pear dump`](./cli.md#pear-dump-flags-less-than-link-greater-than-less-than-dir-greater-than) to dump its contents as files. + +## Can Pear use with X language? + +Pear applications currently can only be written in JavaScript, but other languages and libraries can be integrated by adding bindings as a native addon. See the [`bare-addon`](https://github.com/holepunchto/bare-addon) for a template to get started creating a native addon for Bare runtime. + +For languages like TypeScript that compile to JavaScript, it is recommended to compile into JavaScript and then load it as the Javascript entrypoint either as the `main` property for a terminal application or as a `