Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计提醒

truenas-skill特鲁纳斯技能

Agent Skill

truenas-skill 用于整理文档、README、Markdown 和说明材料,适合在 OpenClaw 中需要把零散信息整理成结构清晰的文档时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

45,049

周安装

1,896

GitHub Stars

公开资料未说明

下载量

15,775
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:truenas-skill(特鲁纳斯技能)
来源仓库:https://github.com/anotb/truenas-skill
安装命令:
openclaw skills install truenas-skill
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install truenas-skill

简介

通过 API 管理 TrueNAS SCALE。检查池运行状况、管理数据集和快照、监控警报、控制服务、管理应用程序、编排 Dockge 容器堆栈以及管理书签。当用户询问其 NAS、存储、备份、容器、书签或家庭实验室服务时使用。

SKILL.md

name
truenas-skill
description
>
license
MIT
homepage
https://github.com/anotb/truenas-skill
compatibility
Requires curl, jq, and Node.js 18+. Network access to TrueNAS instance.
metadata
{"author": "anotb", "version": "1.2.0", "openclaw": {"requires": {"env": ["TRUENAS_URL", "TRUENAS_API_KEY"], "bins": ["curl", "jq", "node"]}, "primaryEnv": "TRUENAS_API_KEY"}}

TrueNAS SCALE Skill

Manage a TrueNAS SCALE server and its apps via the TrueNAS API and Dockge Socket.IO.

Setup

Required Environment Variables

TRUENAS_URL       — TrueNAS base URL (e.g., https://10.0.0.5:444)
TRUENAS_API_KEY   — API key from TrueNAS UI → API Keys

Optional: TLS Configuration

TRUENAS_VERIFY_TLS  — Set to "1" to enforce TLS certificate validation (default: skip for self-signed certs)

Optional: Dockge (Docker Compose UI)

DOCKGE_URL        — Dockge URL (e.g., http://10.0.0.5:5001)
DOCKGE_USER       — Dockge login username
DOCKGE_PASS       — Dockge login password

Optional: Homelab Service API Keys

See the references/ directory for per-service env vars. Common ones:

SONARR_URL, SONARR_API_KEY           — TV show management
RADARR_URL, RADARR_API_KEY           — Movie management
PROWLARR_URL, PROWLARR_API_KEY       — Indexer management
OVERSEERR_URL, OVERSEERR_API_KEY     — Media request UI
PLEX_URL                             — Media server (no auth on LAN)
TAUTULLI_URL, TAUTULLI_API_KEY       — Plex analytics
QBITTORRENT_URL                      — Torrent client (no auth)
SABNZBD_URL, SABNZBD_API_KEY         — Usenet client
AUDIOBOOKSHELF_URL, AUDIOBOOKSHELF_API_KEY
NTFY_URL                             — Push notifications
SYNCTHING_URL, SYNCTHING_API_KEY     — File sync
N8N_URL, N8N_API_KEY                 — Workflow automation
NOCODB_URL, NOCODB_API_KEY           — Database
CHANGEDETECTION_URL, CHANGEDETECTION_API_KEY
CRAFTY_URL, CRAFTY_API_KEY           — Game servers
LAZYLIBRARIAN_URL, LAZYLIBRARIAN_API_KEY
METUBE_URL                           — YouTube downloader
KARAKEEP_URL, KARAKEEP_API_KEY       — Bookmarks with AI tagging

API Notes

HTTPS REQUIRED: TrueNAS auto-revokes API keys used over HTTP.

REST API Deprecation Notice: The REST API (/api/v2.0/) is deprecated in TrueNAS 25.04 and fully removed in 26.04. Use the WebSocket API (via scripts/truenas-ws.mjs) as the forward-compatible method. REST examples below still work on 24.10 and 25.x.

REST API (Legacy)

curl -sk "$TRUENAS_URL/api/v2.0/[endpoint]" \
  -H "Authorization: Bearer $TRUENAS_API_KEY"

The -k flag is needed for self-signed certificates (common on home servers).

WebSocket API (Recommended)

The WebSocket API uses a DDP-like protocol (Meteor style). REST paths become dot notation: /api/v2.0/appapp.query, /api/v2.0/system/infosystem.info.

// Connect: wss://<host>/websocket (rejectUnauthorized: false for self-signed)

// 1. Handshake
send: {"msg": "connect", "version": "1", "support": ["1"]}
recv: {"msg": "connected", "session": "..."}

// 2. Authenticate
send: {"id": "1", "msg": "method", "method": "auth.login_with_api_key", "params": ["API_KEY"]}
recv: {"id": "1", "msg": "result", "result": true}

// 3. Call methods
send: {"id": "2", "msg": "method", "method": "system.info", "params": []}
send: {"id": "3", "msg": "method", "method": "app.query", "params": []}

Use the helper script for WebSocket calls: node scripts/truenas-ws.mjs <method> [params_json]

Security Notes

  • Self-signed certificates: TLS verification is skipped by default (curl -k, rejectUnauthorized: false) because homelab servers typically use self-signed certs. Set TRUENAS_VERIFY_TLS=1 to enforce strict TLS validation.
  • API key scope: Use a read-only or least-privilege API key when possible. TrueNAS lets you scope keys to specific endpoints.
  • Credentials stay local: All env vars are read at runtime and sent only to the configured service endpoints. Nothing is phoned home.

Core Operations

System Info

curl -sk "$TRUENAS_URL/api/v2.0/system/info" -H "Authorization: Bearer $TRUENAS_API_KEY"

Pool Health

# All pools with health status
curl -sk "$TRUENAS_URL/api/v2.0/pool" -H "Authorization: Bearer $TRUENAS_API_KEY" \
  | jq '.[] | {name, healthy}'

# Or via WebSocket
node scripts/truenas-ws.mjs pool.query '[]'

The API returns a .healthy boolean per pool. For deeper status, inspect the full pool object.

Active Alerts

curl -sk "$TRUENAS_URL/api/v2.0/alert/list" -H "Authorization: Bearer $TRUENAS_API_KEY" \
  | jq '.[] | {level, formatted}'

Running Services

curl -sk "$TRUENAS_URL/api/v2.0/service" -H "Authorization: Bearer $TRUENAS_API_KEY" \
  | jq '.[] | select(.state == "RUNNING") | .service'

Dataset Management

List Datasets

curl -sk "$TRUENAS_URL/api/v2.0/pool/dataset" -H "Authorization: Bearer $TRUENAS_API_KEY" \
  | jq '.[] | {name, type, used: .used.parsed, available: .available.parsed}'

Create Dataset

curl -sk -X POST "$TRUENAS_URL/api/v2.0/pool/dataset" \
  -H "Authorization: Bearer $TRUENAS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "pool/path/new-dataset"}'

Delete Dataset

# Destructive — confirm with user first
curl -sk -X DELETE "$TRUENAS_URL/api/v2.0/pool/dataset/id/DATASET_ID" \
  -H "Authorization: Bearer $TRUENAS_API_KEY"

Snapshots & Replication

List Snapshots

# WebSocket (required on 25.10+, /api/v2.0/zfs/snapshot returns 404)
node scripts/truenas-ws.mjs zfs.snapshot.query '[]'

Create Snapshot

node scripts/truenas-ws.mjs zfs.snapshot.create '[{"dataset": "pool/dataset", "name": "manual-YYYY-MM-DD"}]'

Snapshot Task Status

curl -sk "$TRUENAS_URL/api/v2.0/pool/snapshottask" -H "Authorization: Bearer $TRUENAS_API_KEY" \
  | jq '.[] | {dataset, schedule, enabled}'

Replication Health

curl -sk "$TRUENAS_URL/api/v2.0/replication" -H "Authorization: Bearer $TRUENAS_API_KEY" \
  | jq '.[] | {name, state: .state.state}'

App Management

TrueNAS Apps are the official marketplace for installing containerized services.

List Installed Apps

curl -sk "$TRUENAS_URL/api/v2.0/app" -H "Authorization: Bearer $TRUENAS_API_KEY" \
  | jq '.[] | {name, state, version}'

Check for Updates

curl -sk "$TRUENAS_URL/api/v2.0/app" -H "Authorization: Bearer $TRUENAS_API_KEY" \
  | jq '.[] | select(.upgrade_available) | .name'

Install / Update Apps

See references/app-installation.md for the full installation guide covering:

  • Checking app templates and storage requirements
  • Creating datasets with proper ACLs
  • Installing with correct storage mappings
  • Handling apps with multiple storage mounts

App Status

curl -sk "$TRUENAS_URL/api/v2.0/app?name=APP_NAME" -H "Authorization: Bearer $TRUENAS_API_KEY" \
  | jq '.[0] | {name, state, portals}'

Dockge (Docker Compose Stacks)

Dockge is a companion UI for Docker Compose stacks not in the TrueNAS Apps catalog. It uses Socket.IO, not REST. Use the provided scripts.

Prerequisites

npm install   # in this skill's root directory

List Stacks

node scripts/dockge-list.mjs

Update Stacks

# Update all running stacks
node scripts/dockge-update.mjs

# Update specific stacks
node scripts/dockge-update.mjs mystack1 mystack2

Socket.IO Protocol Details

Dockge uses Socket.IO with WebSocket transport.

Status codes:

  • 1 = inactive/exited
  • 3 = running
  • 4 = updating

Key events:

  • login — authenticate with username/password
  • stackList — get all stacks (received via agent event)
  • agent, "", "updateStack", stackName — trigger pull + restart

Note: Stacks prefixed with ix- are TrueNAS-managed apps visible to Dockge — skip those when updating.

Monitoring Checklist

Run these commands for a quick health overview:

# Pool health
curl -sk "$TRUENAS_URL/api/v2.0/pool" -H "Authorization: Bearer $TRUENAS_API_KEY" \
  | jq '.[] | {name, healthy}'

# Active alerts
curl -sk "$TRUENAS_URL/api/v2.0/alert/list" -H "Authorization: Bearer $TRUENAS_API_KEY" \
  | jq '.[] | {level, formatted}'

# Running services
curl -sk "$TRUENAS_URL/api/v2.0/service" -H "Authorization: Bearer $TRUENAS_API_KEY" \
  | jq '.[] | select(.state == "RUNNING") | .service'

# App updates available
curl -sk "$TRUENAS_URL/api/v2.0/app" -H "Authorization: Bearer $TRUENAS_API_KEY" \
  | jq '.[] | select(.upgrade_available) | .name'

# Replication status
curl -sk "$TRUENAS_URL/api/v2.0/replication" -H "Authorization: Bearer $TRUENAS_API_KEY" \
  | jq '.[] | {name, state: .state.state}'

Homelab Services

This skill includes reference files for common homelab service categories. Each covers API patterns, env vars, and common agent tasks for services that typically run alongside TrueNAS:

ReferenceServicesFile
Media managementOverseerr, Sonarr, Radarr, Prowlarr, Plex, Tautullireferences/media-management.md
App installationTrueNAS native app install guidereferences/app-installation.md
Download clientsqBittorrent, SABnzbd, FlareSolverrreferences/downloads.md
Homelab servicesntfy, Syncthing, n8n, NocoDB, ChangeDetection, Craftyreferences/homelab-services.md
Books & mediaAudiobookshelf, LazyLibrarian, Calibre-Web, MeTubereferences/books-and-media.md
BookmarksKarakeep (AI-powered bookmark manager)references/bookmarks.md

Load the relevant reference file when the user asks about a specific service category.

Common Tasks

"Check NAS health"

Run the monitoring checklist above. Summarize pool states, alerts, and any pending updates.

"What's running?"

# TrueNAS apps
curl -sk "$TRUENAS_URL/api/v2.0/app" -H "Authorization: Bearer $TRUENAS_API_KEY" \
  | jq '.[] | select(.state == "RUNNING") | .name'

# Dockge stacks (if configured)
node scripts/dockge-list.mjs

"Install an app"

Follow the guide in references/app-installation.md:

  1. Check app template for storage requirements
  2. Create dataset(s) under the apps pool
  3. Set ACL with apps preset
  4. Install app with correct storage mappings

"Take a snapshot"

node scripts/truenas-ws.mjs zfs.snapshot.create '[{"dataset": "pool/dataset", "name": "manual-snapshot-name"}]'

"What's downloading?"

See references/downloads.md for qBittorrent and SABnzbd API commands.

"Add a movie/show"

See references/media-management.md for Overseerr request workflow.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

77.9%
按下载量换算12,289

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills