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

hacccli

v1.1.0

Published

A Command Line Interface for managing home assistant custom components.

Downloads

12

Readme

hacccli - Home Assistant Custom Components Command Line Interface

A Command Line Interface for managing home assistant custom components.

Installation

npm install -g hacccli

or

yarn global add hacccli

Why should you use hacccli?

With hacccli, you can easily add and automatically update custom components for your home assistant instance.

Wait. Isn't there already a community store with which I can manage custom components via the web frontend? Yes! If you are already using the Home Assistant Community Store, then this tool is probably pretty useless for you.

For all other people, which does not have the Home Assistant Community Store installed (and maybe dont want to), this cli tool will help you managing your custom components.

Adding a custom component

To add a custom component, you can simply call the cli tool and paste the GitHub URL of the custom component. hacccli will download the custom component after asking you a few questions and keeps track of new versions (if you like to):

add-component.gif

What happened?
hacccli has downloaded the custom component alexa_meda_player to the directory config/custom_components/alexa_media_player. Additionaly, hacccli stores all added components inside a json-db to keep track on new versions of the added components (see Update components).

Track updates

To track updates of a custom component, hacccli ask you if you want to track version updates by releases or by branches.

releases
If you choose releases, hacccli uses semantic versioning to track new versions. You can select which versions hacccli should automatically update without asking you:

  • major No restriction
  • minor Only minor version updates (1.1.2 -> 1.x.x, but not 2.x.x or greater)
  • patch Only patch version updates (1.1.2 -> 1.1.x but not 1.2.x or greater)

branches
If you choose branches, hacccli ask you which branch it should track. It will also remember the commit hash of the installed version and updates the component on every new commit on that branch.

Update components

hacccli can also automatically update all custom components which were installed with hacccli. You can either update components manually, by selecting the command fetch registered components, or by calling hacccli with the argument --fetch to let hacccli fetch new version in a non-interactive mode.

Manually update custom components

To update all added components, just select the command fetch registered components:

update-component.gif

Thats all!

If hacccli finds a version which does not meet your selected semver-constraint, e. g. you have installed version 1.2.3 and version 2.0.0 is avaiable but you choosed minor when you added the component, hacccli will not update to version 2.0.0. If you start hacccli in an interactive mode, it ask you if you like to upgrade to a newer version. In a non interactive mode hacccli will just skip the custom component.

update-component-conflict-interactive.gif

Automatically update custom components

For automating custom component updates you can start hacccli in a non-interactive mode by executing the following command:

hacccli --fetch

hacccli will the update all added components with regarding your selected semantic versioning constraint. If you selected a branch instead of releases, then hacccli will redownload the hole component on every new commit.

update-component-non-interactive.gif

Setup e. g. a cron job to run hacccli in the non-interactive mode every day.