npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

homey-app-upload-cli

v1.1.4

Published

Homey App Upload command line interface

Downloads

9

Readme

Homey App Upload

CLI tool and library to make developing apps for the Homey home automation platform a bit easier.

The purpose is to allow for incremental app updates to be pushed to Homey during app development.

Installation

This tool consists of two parts: a library that you need to include in your Homey app, and a CLI (command line interface) tool that you should install on the computer you are developing on.

Library

Installation

$ cd path-to-your-homey-app
$ npm install homey-app-upload-lib

Usage

The library needs to be initialized from the onInit method of your app, and should be passed your app's manifest as an argument:

const HomeyAppUpload = require('homey-app-upload-lib');

...

class YourHomeyApp extends Homey.App {
  onInit() {
    HomeyAppUpload(this.manifest);
    ...
  }
  ...
}

Remarks:

  • The library requires the homey:manager:api permission, and will refuse to run when it isn't set.
  • The library should not be used in published apps.
  • At the moment, only one app can have an uploader active.

CLI

Installation

$ npm install homey-app-upload-cli -g

Usage

homey-app-upload – Homey App Upload

Usage:
  homey-app-upload [options] upload

Options:
  -h --help                     Show this screen
  --version                     Show version
  -i --incremental              Perform incremental updates
  -I --incremental-file=<file>  File to use for incremental update metadata
  -u --url=<url>                Homey Uploader Server URL
  -n --no-restart               Don't restart app after changes have been uploaded
  --dry-run                     Just show which files would have been uploaded
  -v --verbose                  More verbose output

Instead of passing -u, you can set an environment variable HOMEY_APP_UPLOAD_URL
that contains the URL for the upload server:

    export HOMEY_APP_UPLOAD_URL=http://192.168.1.100:5481/

First, run athom project --run to upload the app to Homey initially. Keep it running, and open another window/terminal from which to run (incremental) updates using this CLI tool.

By default, the CLI tool uploads the entire app. It will take into account .gitignore and .homeyignore files to determine which files to ignore.

Incremental updates

If you want incremental updates, use the -i option:

$ homey-app-upload -i upload

Incremental updates work by checking the timestamp of a metadata file (--incremental-file) against the files and directories in the app directory. Only the changed files will be uploaded, typically reducing the upload time significantly when compared to uploading the entire app.

App restarts

After uploading, the default action is to restart the app. This can be prevented using the -n/--no-restart option.