CLI to a Gecko desktop app runtime
JavaScript Shell HTML Batchfile
Clone or download
mykmelez Merge pull request #163 from mozilla/greenkeeper/tap-12.0.1
chore(package): update tap to version 12.0.1
Latest commit ea50a90 Jul 1, 2018
Permalink
Failed to load latest commit information.
bin remove todo note for PR Jun 6, 2018
chrome/en-US/locale/branding revert to Apache 2.0 license; add LICENSE file; apply license headers Mar 2, 2017
components set space-before-function-paren to 'never' for anonymous functions Jun 28, 2017
defaults/preferences single quotes; no undefined 'sticky' argument Mar 16, 2018
examples convert empty tag to self-closing syntax Jun 13, 2017
modules Revert "disable devtools to work around #132" Mar 16, 2018
shell update nits, per latest review feedback Jun 23, 2017
test remove obsolete content-primary type of browser Apr 11, 2018
.eslintignore lint w/eslint (#11) Mar 3, 2017
.eslintrc.js set space-before-function-paren to 'never' for anonymous functions Jun 28, 2017
.gitattributes test in TaskCluster (#15) Mar 4, 2017
.gitignore Improve demonstration with hello-world-html and hello-world-xul Jun 9, 2017
.taskcluster.yml Revert "use local copy of latest Git" Mar 9, 2018
.travis.yml test on Node.js version 8 Jul 31, 2017
LICENSE revert to Apache 2.0 license; add LICENSE file; apply license headers Mar 2, 2017
README.md Update taskcluster badge with new api May 12, 2017
application.ini implement basic support for packaging an app (#16) Mar 15, 2017
chrome.manifest implement basic support for packaging an app (#16) Mar 15, 2017
devtools.manifest register new devtools components Apr 11, 2018
launcher.bat Quote runtime and application.ini paths in case they contain spaces. May 11, 2017
launcher.sh implement basic support for packaging an app (#16) Mar 15, 2017
npm-shrinkwrap.json 0.2.5 Apr 11, 2018
package.json Merge pull request #163 from mozilla/greenkeeper/tap-12.0.1 Jun 30, 2018

README.md

Activity Level Stability Travis Status Taskcluster Status Greenkeeper Status

qbrt: CLI to a Gecko desktop app runtime

qbrt is a command-line interface to a Gecko desktop app runtime. It's designed to simplify the process of building and testing desktop apps using Gecko.

Usage

Install it via npm:

npm install -g qbrt

Installing it also installs a Gecko runtime (currently a nightly build of Firefox, but in the future it could be a stable build of Firefox or a custom Gecko runtime). Its simplest use is then to invoke the run command with a URL:

qbrt run https://eggtimer.org/

Which will start a process and load the URL into a native window:

screen shot 2017-03-15 at 01 16 28

URLs loaded in this way don't have privileged access to the system. They're treated as web content, not application chrome.

To load a desktop app with system privileges, point qbrt at a local directory containing a package.json file and main script:

qbrt run path/to/my/app/

For an example, clone qbrt's repo and try its example/ app, which will start a process and load the app into a privileged context, giving it access to Gecko's APIs for opening windows and loading web content along with system integration APIs for file manipulation, networking, process management, etc.:

git clone https://github.com/mozilla/qbrt.git
qbrt run qbrt/example/

(Another good example is the shell app that qbrt uses to load URLs.)

To package an app for distribution, invoke the package command, which creates a platform-specific package containing both your app's resources and the Gecko runtime:

qbrt package path/to/my/app/

Caveats

While qbrt itself is written in Node.js, it doesn't provide Node.js APIs to apps. Unprivileged URLs have access to Web APIs, and privileged apps also have access to Gecko's APIs.

qbrt doesn't yet support runtime version management (i.e. being able to specify which version of Gecko to use, and to switch between them). At the time you install it, it downloads the latest nightly build of Firefox. (You can update that nightly build by reinstalling qbrt.)

The packaging support is primitive. qbrt creates a shell script (batch script on Windows) to launch your app, and it packages your app using a platform-specific format (ZIP on Windows, DMG on Mac, and tar/gzip on Linux). But it doesn't set icons nor most other package meta-data, and it doesn't create auto-installers nor support signing the package.

In general, qbrt is immature and unstable! It's appropriate for testing, but it isn't yet mature and stable enough for you to ship apps with it.

Contributing

Contributions of all kinds are welcome! As are all contributors. We only ask that you treat other contributors with care and respect and observe Mozilla's Community Participation Guidelines.