JonesChi

Home Assistant CLI

运维安全v1.0.0
作者:JonesChi更新于 2026-05-11homeassistant-cli@clawhub_joneschi/homeassistant-cli
监控告警服务器运维故障排查#Home

据 AlphaMoat 统计,截至 2026-10,Home Assistant CLI 累计下载 7,850 次、获 13 个星标,按累计下载量在本次参与排名的 10,914 个 AI 技能中排名第 3,541 位,在「运维安全」分类(502 个)中排名第 103 位。

列表默认按累计下载量排序,也可按星标排序;详情页排名按累计下载量计算。

累计下载
7,850
星标
13
全站下载量排名
#3,541
全站前 33% · 「运维安全」前 21%
平台累计下载星标评论
ClawHub ↗6,43313-
SkillHub ↗7,85013—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

涵盖实体与服务发现、状态查询、场景启用、事件监控、历史和表格、YAML、JSON 输出。需要 hass-cli、服务器配置和长期令牌。应使用验证证书的 HTTPS 并保护令牌;修改设备前核实准确实体和服务,仅以非关键实体测试。

资料发布于 2026-10-27

可以用来做什么

  • 查看家居状态并准备已核实的服务调用

什么时候用

  • 已授权的 Home Assistant 环境需要 CLI 发现或控制指导时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

列出相关实体和服务选项,不暴露令牌地检查认证,并在修改设备前确认具体动作。

月度数据趋势

累计下载7,850
3,4925,8338,1732026-03 · 累计下载 3,8152026-05 · 累计下载 4,5532026-06 · 累计下载 4,7982026-07 · 累计下载 5,1922026-08 · 累计下载 5,6602026-09 · 累计下载 5,9942026-10 · 累计下载 7,85026-0326-0926-10
星标13
1112132026-03 · 星标 112026-05 · 星标 122026-06 · 星标 132026-07 · 星标 132026-08 · 星标 132026-09 · 星标 132026-10 · 星标 1326-0326-0926-10

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-107,850—13
2026-095,994—13
2026-085,660+9.0%13
2026-075,192+8.2%13
2026-064,798+5.4%13
2026-054,553—12
2026-033,815—11

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

4.8 KB · ClawHub v1.0.0
---
name: homeassistant-cli
description: Advanced Home Assistant control using the official hass-cli tool. Features auto-completion, event monitoring, history queries, and rich output formatting. Alternative to the curl-based homeassistant skill - choose this if you want a more interactive CLI experience with better discovery and formatting.
homepage: https://github.com/home-assistant-ecosystem/home-assistant-cli
metadata:
  {
    "openclaw":
      {
        "emoji": "🏡",
        "requires": { "bins": ["hass-cli"] },
展开全部(共 182 行)
        "install":
          [
            {
              "id": "pip",
              "kind": "pip",
              "package": "homeassistant-cli",
              "bins": ["hass-cli"],
              "label": "Install Home Assistant CLI (pip)",
            },
            {
              "id": "brew",
              "kind": "brew",
              "formula": "homeassistant-cli",
              "bins": ["hass-cli"],
              "label": "Install Home Assistant CLI (brew)",
            },
          ],
      },
  }
---

# Home Assistant CLI

Control your Home Assistant smart home devices using the **official hass-cli tool** — a feature-rich command-line interface with auto-completion, event monitoring, and flexible output formatting.

## Why This Skill vs. `homeassistant` (curl-based)?

**Choose `homeassistant-cli` if you want:**
- ✅ **Auto-completion** for entity IDs and services (bash/zsh/fish)
- ✅ **Event monitoring** in real-time (`hass-cli event watch`)
- ✅ **History queries** (`hass-cli state history`)
- ✅ **Better output formatting** (table/YAML/JSON with one flag)
- ✅ **Interactive exploration** (easier to discover entities and services)
- ✅ **Comprehensive documentation** with examples and troubleshooting

**Choose `homeassistant` (curl) if you want:**
- ✅ Zero dependencies (curl + jq are pre-installed)
- ✅ Lightweight and fast
- ✅ Better for scripting and automation
- ✅ No Python requirements

Both work great — this skill is for users who interact frequently with Home Assistant and want a richer CLI experience.

## Setup

Before using hass-cli, configure authentication:

1. Generate a long-lived access token in Home Assistant:
   - Navigate to your profile: `https://your-homeassistant:8123/profile`
   - Scroll to "Long-Lived Access Tokens"
   - Create a new token

2. Set environment variables (add to shell config for persistence):
   ```bash
   export HASS_SERVER=https://homeassistant.local:8123
   export HASS_TOKEN=<your-token>
   ```

3. Test connection:
   ```bash
   hass-cli info
   ```

## Common Commands

### List Entities

```bash
# List all entities
hass-cli state list

# Filter by domain
hass-cli state list light
hass-cli state list switch
hass-cli state list sensor

# Get specific entity state
hass-cli state get light.living_room
```

### Control Devices

```bash
# Turn on/off lights
hass-cli service call light.turn_on --arguments entity_id=light.living_room
hass-cli service call light.turn_off --arguments entity_id=light.living_room

# Set brightness (0-255)
hass-cli service call light.turn_on --arguments entity_id=light.bedroom,brightness=128

# Turn on/off switches
hass-cli service call switch.turn_on --arguments entity_id=switch.fan
hass-cli service call switch.turn_off --arguments entity_id=switch.fan

# Toggle any device
hass-cli service call homeassistant.toggle --arguments entity_id=light.kitchen
```

### List and Call Services

```bash
# List all services
hass-cli service list

# Filter services
hass-cli service list light
hass-cli service list 'home.*toggle'

# Get service details (YAML output)
hass-cli -o yaml service list homeassistant.toggle
```

### Work with Scenes

```bash
# List scenes
hass-cli state list scene

# Activate a scene
hass-cli service call scene.turn_on --arguments entity_id=scene.movie_time
```

### Monitor Events

```bash
# Watch all events
hass-cli event watch

# Watch specific event type
hass-cli event watch state_changed
hass-cli event watch automation_triggered
```

### History

```bash
# Get state history (last 50 minutes)
hass-cli state history --since 50m light.living_room

# Multiple entities
hass-cli state history --since 1h light.living_room switch.fan
```

## Output Formats

Control output with `-o` or `--output`:

```bash
# Table (default)
hass-cli state list

# YAML
hass-cli -o yaml state get light.living_room

# JSON
hass-cli -o json state list light

# No headers (for scripting)
hass-cli --no-headers state list
```

## Tips

- **Entity discovery**: Use `hass-cli state list` to find entity IDs
- **Service discovery**: Use `hass-cli service list` to find available services
- **Auto-completion**: See [references/autocomplete.md](references/autocomplete.md) for shell setup
- **Troubleshooting**: See [references/troubleshooting.md](references/troubleshooting.md)

## Examples

See [references/examples.md](references/examples.md) for common automation patterns and use cases.

「运维安全」分类下的热门技能

钟馗.skill运维安全

钟馗.Skill——会更新漏洞库的安全审查专家。直来直去、快刀斩乱麻,三层审查(静态审计/行为模拟/供应链溯源)覆盖12类风险,输出结构化安全裁定(✅干净/⚠️可疑/🚫恶意)。Use when 用户说"审查这个Skill"、"安全检查"、"钟馗看下"、"审一下"、"查一下这个skill"、安装Skill前的安全评估、或需要审计SKILL.md的恶意载荷。

↓ 33.7万★ 17user_741dc82b
SkillScan运维安全

在使用技能包之前做安全扫描,并按结论决定放行或拦截的技能。

↓ 18.3万★ 41tokauthai
Free Ride - Unlimited free AI运维安全

为 OpenClaw 配置 OpenRouter 免费模型与回退链的工具。

↓ 13.4万★ 492Shaishav Pidadi
a ca s ca s c ca s c运维安全

Parse, search, and analyze application logs across formats. Use when debugging from log files, setting up structured logging, analyzing error patterns, correlating events across services, parsing stack traces, or monitoring log output in real time.

↓ 12.5万★ -user_60e896a0
Skill Scanner运维安全

用于安装技能、包或插件的安全检查。请在执行任何 npm install、openclaw plugins install、clawhub install 或类似安装命令之前使用。

↓ 9.3万★ 4sudhindrat
网安技能运维安全

网络安全与SRC漏洞掘金实战技能。融合「系统学习路径」与「SRC实战掘金」双模式: ①学习模式=法律→基础→工具→靶场→攻防→就业全流程; ②实战模式=直接指导在腾讯TSRC、阿里ASRC、百度BSRC等平台挖掘高价值漏洞变现。 当用户提出以下问题时触发: "我想学网络安全怎么入门""SRC漏洞怎么挖能赚钱""渗透测试需要学什么" "Web安全漏洞原理是什么""怎么准备CTF比赛""护网面试会问什么" "云安全怎么学""挖漏洞赚钱的方法""端口扫描脚本怎么写" "SQL注入怎么检测""子域名怎么枚举""XSS漏洞怎么找" "靶场怎么搭建""Kali Linux怎么用""Metasploit怎么入门" "等保测评是什么""代码审计怎么做""内网渗透怎么学" "信息泄露漏洞怎么挖""越权漏洞怎么测试""逻辑漏洞挖掘技巧" "简历怎么写才能进安全公司""安全行业面试题有哪些" "Burp Suite怎么用""DVWA怎么安装""Pikachu靶场搭建" "Vulhub漏洞复现""网络安全法有什么规定""CTF夺旗赛怎么参加" "AWD比赛是什么""应急响应怎么做""攻击溯源怎么搞" "数据安全怎么保障""公有云安全怎么防护""私有云攻防怎么做" "云原生安全是什么"。

↓ 8.0万★ 16user_d2cc4baf
人人都能成为黑客v2.0(Lvan)运维安全

这个技能特别简单——你只需要调用它,给一个网站域名,它就会自动帮你跑一遍渗透测试,找出这个网站存在哪些安全漏洞。 不需要你配环境、不用你手动发包,一切自动化。测完直接出结果,告诉你哪里有问题、怎么修。 它的愿景是:让每个人都能成为白帽黑客——只要输入一个域名,就能知道自己的网站安不安全。一切只为授权测试,只为发现漏洞、修复风险,让互联网更安全。

↓ 5.7万★ 37user_a730098d
skill-vetter运维安全

Security-first skill vetting for AI agents. Use before installing any skill from ClawdHub, GitHub, or other sources. Checks for red flags, permission scope, and suspicious patterns.

↓ 5.4万★ -user_814dbe54

数据月份:2026-10 · 下载/星标数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。