hass-cli

Inspect, automate, and administer Home Assistant through the hass-cli command-line tool.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/roman-pinchuk/agent-skills --skill hass-cli-roman-pinchuk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hass-cli
Source: https://github.com/roman-pinchuk/agent-skills/tree/main/skills/hass-cli
Command: npx skills add https://github.com/roman-pinchuk/agent-skills --skill hass-cli-roman-pinchuk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Controlling Home Assistant from a terminal requires knowing the exact hass-cli command syntax, safe authentication handling, and which commands change state versus only read data. This Skill guides an AI agent to discover live command syntax, protect tokens, and verify changes safely. ## Core Features & Use Cases - Live Command Discovery: Runs hass-cli --help at every level before composing commands, so the installed CLI version is always the source of truth. - Safe State and Service Operations: Distinguishes read-only discovery (state list, service list, device list) from state-changing actions (service call, state edit, area changes) that require user confirmation. - Secret Protection: Enforces strict rules against printing HASS_TOKEN, HASS_SUPERVISOR_TOKEN, or environment variables. - Use Case: Ask the agent to turn off a specific light. It discovers the entity ID with state list, confirms the service via service list, shows the exact service call command for confirmation, then verifies the result with state get. ## Quick Start Use hass-cli to list all my Home Assistant lights and turn off the office light after confirming the command with me.

Frequently Asked Questions about hass-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I control Home Assistant devices from the command line?

Use hass-cli service call with the target service and entity, for example `hass-cli service call homeassistant.toggle --arguments entity_id=light.office_light`. Discover exact entity IDs first with `hass-cli state list` and confirm service names with `hass-cli service list`.

How to install and configure hass-cli for Home Assistant?

Install via `pip install homeassistant-cli`, Homebrew, dnf, NixOS, or Docker. Configure access by setting the HASS_SERVER and HASS_TOKEN environment variables, or pass `--server` and `--token` per command, then verify with `hass-cli system info`.

What is the difference between hass-cli service call and state edit?

service call invokes actual Home Assistant behavior and is the correct way to control physical devices like lights and switches. state edit only writes an entity's state representation and should not be used to turn devices on or off.

Can hass-cli manage Home Assistant OS supervisor and core?

Yes, the `hass-cli ha` command group handles supervisor and core operations such as `ha core info` and `ha supervisor info`. These commands require supervisor access through HASS_SUPERVISOR_TOKEN or the `--supervisor-token` option.

Why does hass-cli report an unknown command or option?

Command syntax varies between installed versions, so guessing options or copying them between commands fails. Run `hass-cli --version` and `hass-cli GROUP COMMAND --help` to confirm the exact supported syntax for your installation.