# Home Assistant CLI
> Command-line tool for Home Assistant

## Summary
Command-line interface for managing Home Assistant instances, including entity state management, service calls, event monitoring, and device/area registry operations.

## Capabilities
- List, get, edit, and track history of entity states
- Discover and call Home Assistant services
- Subscribe to and monitor events
- Manage device and area registries
- Render Jinja2 templates (server-side and client-side)
- Interact with Home Assistant Supervisor
- Configurable output formats (JSON, YAML, table, NDJSON)

## When to Use
- You want to manage Home Assistant from the terminal
- You need to script Home Assistant automation tasks
- You want to quickly check entity states or trigger services
- You need to integrate Home Assistant into shell pipelines

## When NOT to Use
- You need the full Home Assistant dashboard experience
- You don't have a Home Assistant instance running

## Usage Patterns
### List all entities
```
hass-cli state list
```
Lists all entity states from your Home Assistant instance

### Get a specific entity state
```
hass-cli state get light.living_room
```
Retrieves the current state of a specific entity

### Call a service
```
hass-cli service call light.turn_on --arguments entity_id=light.living_room
```
Calls a Home Assistant service with arguments

## Installation
- **pip**: `pip install homeassistant-cli`
- **homebrew**: `brew install homeassistant-cli`
- **dnf**: `sudo dnf -y install home-assistant-cli`
- **nix**: `nix-env -iA nixos.home-assistant-cli`

---
Source: https://littlescripts.sh/tools/hass-cli
