bashio-scripting

Write or update bashio-based shell scripts for Home Assistant add-ons.

Updated Feb 7, 2026
One-click install
npx skills add https://github.com/JSchmid6/ha-wireguard-client-addon --skill bashio-scripting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bashio-scripting
Source: https://github.com/JSchmid6/ha-wireguard-client-addon/tree/main/.github/skills/bashio-scripting
Command: npx skills add https://github.com/JSchmid6/ha-wireguard-client-addon --skill bashio-scripting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Write or modify bashio-based shell scripts for the Home Assistant add-on. Use when editing run.sh, adding new features to the entrypoint script, or debugging the add-on's runtime behavior.

Core Features & Use Cases

  • Read configuration values with bashio::config to drive add-on behavior.
  • Log runtime events with bashio::log.* to ensure structured, safe output.
  • Access the Home Assistant Supervisor API and info helpers via bashio functions to interact with the environment.
  • Implement a robust entrypoint workflow with a watchdog loop pattern and basic startup/shutdown handling.
  • Use the script structure pattern to guide creation of reliable run.sh files.

Quick Start

Create a minimal run.sh that reads configuration via bashio and starts a watchdog loop.

Frequently Asked Questions about bashio-scripting

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

FAQPage Schema
How do I read add-on configuration values in a Home Assistant shell script?

You can read add-on configuration values in a Home Assistant shell script by using the bashio::config function to safely access options defined in your add-on's config.yaml file.

What is the best way to structure a run.sh entrypoint for a Home Assistant add-on?

The best way to structure a run.sh entrypoint is to use a script structure pattern with a watchdog loop, applying bashio functions for safe startup, shutdown, and continuous runtime behavior management.

How do I log runtime events in a Home Assistant add-on script?

You log runtime events in a Home Assistant add-on script by using bashio::log.* functions, which ensure structured and safe output directly to the Home Assistant environment.

Can I access the Home Assistant Supervisor API from a bash add-on script?

Yes, you can access the Home Assistant Supervisor API from a bash add-on script by utilizing built-in bashio info helpers and supervisor API functions to interact with the environment.

Why is my Home Assistant add-on startup script failing to read configuration?

Your Home Assistant add-on startup script might be failing because it is not correctly using bashio::config to read configuration values, or the entrypoint script lacks proper bashio library initialization.