NervesHub CLI, did you know?
January 17, 2025 • Issue 86
.. No images? Click here Project UpdatesDid you know that NervesHub has a CLI tool? It hasn't been heavily promoted. Probably because it was kind of rough. But it is very useful. I've seen that people using NervesHub don't initially hear about the CLI so I figure it deserves a moment. I have used it heavily for demos of NervesHub in my talks. It allows most of the functionality of the Web UI and some that might not even have UI. The most important bits:
This is all based on the API that the NervesHub web service provides and the CLI makes it more convenient to auth and then automate against the API. The recent work below makes it a lot smoother to use because it no longer needs to be a development dependency of your project. Instead you can have an escript installed and alias it to something short. More details below. Project updates This updates NervesHubCLI to be installable as an escript which can be installed with mix escript.install hex nerves_hub_cli. See the README for more information on installation and usage. A lot of credit to Gus Workman for his labor on this. Mix tasks are still available for use, but will soon be deprecated. To support escript, mix nerves_hub.firmware removed the ability to infer a firmware location for sign and publish commands. Instead, firmware path must be included as an argument: mix nerves_hub.firmware publish /path/to/firmware mix nerves_hub.firmware sign /path/to/firmware The changelog for this one hasn't been fully cooked into a release but the tag is available. If you deployed v2.1.0 and was adding new devices or trying to move devices between deployments you may have hit an awkward state with trying to change deployments. There was no UI for moving a device or removing a device from the deployment. This version addresses that situation and includes many other improvements. I've sounded the bell to get us a proper changelog and release notes and if everyone else is busy I suppose I can do it myself. Deployments have been changing to now only use the tagging rules for devices that do not have a release. Essentially determining initial sorting. This prevents a lot of potential weirdness with which rules hit which device at what time and makes Deployments act more like Deployment Groups. A way to group devices together that should update together. These are underpinnings for much more featureful and capable deployments with better insights about what happens during the actual roll-out of a new firmware version. This is mostly a security/bug fix update for 1.29.2.
This release supports warning-free builds with Elixir 1.18. It should be a low risk update for most users. While not related to this package, if you are using Elixir 1.18, please ensure that :nerves_ssh is at least v1.0.1.
This release adds support for Elixir 1.18.
While this release introduces a breaking change, most of the API has been pretty stable for a long time. Consider this a 1.0.0 release candidate.
Nerves Meetup (remote)The next event hits your remote location at the end of January. There is likely still time to get a topic in if you have something to share :) Got questions?Trouble-shooting is best done on the Nerves Forum over at Elixir's Forum. But if you have big-picture questions you would like to ask around Nerves, feel free to send them in and we might just have ourselves a column here. Got any toys over the holidays?Share your hardware plans with us here over email or on Bluesky. Love to feature projects, cool hardware that people are interested in putting Nerves on or whatever comes up as relevant. NervesConf EU10-12 September Read more at goatmire.com. Get on the waiting list to be notified about tickets and updates. I made a silly teaser. It is focused on the wider Goatmire Elixir. Maybe I need to do one focused on Nerves. Let me know. -Lars Nerves shirts can be bought from my new little venture Participating in the communityThe Nerves community is found wherever Elixirists gather. Try any of the following: Questions are best asked on the Elixir Forum. Social conversation and banter:
How you can help NervesContribute in the way that works for you:
Finally, if you have questions about the newsletter or want to suggest something you can simply respond to this email. - Lars |