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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@truyman/hass

v1.0.1

Published

A Bun-built CLI for Home Assistant

Readme

@truyman/hass

A Bun-built CLI for Home Assistant, bundled for Node.js and published to npm as @truyman/hass.

Install

npm install -g @truyman/hass

Quick Start

Create a long-lived access token in Home Assistant, then store it locally:

hass auth login

The default profile is stored at ${XDG_DATA_HOME:-~/.local/share}/home-assistant/auth.json.

You can always override the stored profile with flags or environment variables:

export HASS_SERVER=http://homeassistant.local:8123
export HASS_TOKEN=your-token

hass server info

Commands

hass auth

  • login - Prompt for server URL and long-lived access token, validate, and store them.
  • status - Show the active connection source and whether the credentials validate.
  • logout - Remove the stored default profile.

hass server

  • info
  • config
  • components
  • directories
  • health
  • logs

info reads the authenticated /api/config endpoint and reports the instance URL, location, and version. Its URL uses the configured external URL, then internal URL, then the CLI connection URL. auth login and auth status use the same metadata.

hass states

  • list [filter]
  • get <entity>
  • set <entity> [state]
  • delete <entity>
  • history [entities...]
  • toggle <entities...>
  • on <entities...>
  • off <entities...>

Examples:

hass states list sensor\\.
hass states get light.kitchen
hass states set input_boolean.night_mode on
hass states history light.kitchen --since -2h --end 0m

hass services

  • list [filter]
  • call <domain.service>

Examples:

hass services list light\\.
hass services call light.turn_on --data entity_id=light.kitchen,brightness=180
hass services call weather.get_forecasts --json '{"entity_id":"weather.home"}' --return-response

hass events

  • list
  • fire <event>
  • watch [event]

hass templates

  • render [template]

Examples:

hass templates render '{{ states("sun.sun") }}'
hass templates render --file ./template.j2 --data entity_id=light.kitchen

hass areas

  • list [filter]
  • create <names...>
  • delete <areas...>
  • rename <area> <name>

hass devices

  • list [filter]
  • rename <device> <name>
  • assign-area <area> [devices...]

hass entities

  • list [filter]
  • rename <entity> [newId] --name <name>
  • assign-area <area> [entities...]

hass api

  • get <path>
  • post <path>
  • ws <type>

Examples:

hass api get /api/states
hass api post /api/events/custom_event --data value=1
hass api ws config/area_registry/list

Global Options

  • --server
  • --token
  • --timeout
  • --insecure
  • --output table|json|yaml|ndjson
  • --columns NAME=path,...
  • --sort-by path
  • --no-headers
  • --table-format plain|github|tsv
  • --verbose

Connection precedence is:

  1. CLI flags
  2. Environment variables
  3. Stored auth profile
  4. Built-in defaults

Development

bun install
bun run check
bun test
bun run build

Tooling includes: Bun, @truyman/cli, oxfmt, oxlint, husky, lint-staged, and release-it.