Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A clear and concise description of what the bug is.

## Debug information

1. SSH Addon type
1. SSH App type
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Bold UI labels and use sentence-style capitalization.

Apply bold to UI labels and use sentence-style capitalization for consistency.

Proposed fix
-1. SSH App type
+1. **SSH app type**
 
- App:
- App version:
+ **App**:
+ **App version**:

As per coding guidelines, use bold for UI strings and sentence-style capitalization.

Also applies to: 21-22

🤖 Prompt for AI Agents
In @.github/ISSUE_TEMPLATE/bug_report.md at line 12, Update the UI label "SSH
App type" to use sentence-style capitalization and bold formatting by changing
it to "**SSH app type**" (keep the acronym SSH uppercase), and apply the same
treatment (bold + sentence-style capitalization) to the other UI labels
referenced on lines 21-22 so all UI strings in this template use bold and
sentence-style capitalization.


- [ ] Community
- [ ] Core
Expand All @@ -18,8 +18,8 @@ A clear and concise description of what the bug is.
2. Version of the CLI

CLI Version:
Add-on:
Add-on version:
App:
App version:

3. Version of Home Assistant Core & the Home Assistant Supervisor

Expand Down
6 changes: 3 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Project Overview
This is the official Home Assistant CLI tool written in Go, providing command-line
interface to interact with the Home Assistant Supervisor. The CLI enables users to
manage add-ons, control the core system, handle audio/network settings, manage
manage apps, control the core system, handle audio/network settings, manage
backups, and perform various system operations.

The CLI is communicating with the Supervisor using the Supervisor's HTTP REST API.
Expand All @@ -24,7 +24,7 @@ The CLI is communicating with the Supervisor using the Supervisor's HTTP REST AP

## Available Commands
The CLI provides the following main command categories:
- `addons` - Install, update, remove and configure Home Assistant add-ons
- `apps` - Install, update, remove and configure Home Assistant apps
- `audio` - Audio plug-in management
- `authentication` - Authentication for Home Assistant users
- `cli` - CLI plug-in management
Expand Down Expand Up @@ -78,4 +78,4 @@ The CLI provides the following main command categories:
6. Create Pull Request

This CLI is designed to work with Home Assistant Supervisor API and is commonly used in
Home Assistant Operating System environments, SSH add-ons, and development setups.
Home Assistant Operating System environments, SSH apps, and development setups.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ All options are also available as `SUPERVISOR_` prefixed environment variables l
Available commands:

```text
addons Install, update, remove and configure Home Assistant add-ons
apps Install, update, remove and configure Home Assistant apps
audio Audio device handling.
authentication Authentication for Home Assistant users.
cli Get information, update or configure the Home Assistant cli backend
Expand All @@ -59,19 +59,19 @@ available on the device terminal when using the Home Assistant Operating System.

The CLI is automatically updated on those systems.

Furthermore, the SSH add-on (available in the add-on store) provides
access to this tool and several community add-ons provide it as well (e.g.,
the Visual Studio Code add-on).
Furthermore, the SSH app (available in the app store) provides
access to this tool and several community apps provide it as well (e.g.,
the Visual Studio Code app).
Comment on lines +62 to +64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Bold UI strings in the installation text.

Mark UI strings in bold to align with documentation guidance.

Proposed fix
-Furthermore, the SSH app (available in the app store) provides
-access to this tool and several community apps provide it as well (e.g.,
-the Visual Studio Code app).
+Furthermore, the **SSH app** (available in the **app store**) provides
+access to this tool and several community apps provide it as well (for example,
+the **Visual Studio Code app**).

As per coding guidelines, use bold for UI strings.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Furthermore, the SSH app (available in the app store) provides
access to this tool and several community apps provide it as well (e.g.,
the Visual Studio Code app).
Furthermore, the **SSH app** (available in the **app store**) provides
access to this tool and several community apps provide it as well (for example,
the **Visual Studio Code app**).
🤖 Prompt for AI Agents
In `@README.md` around lines 62 - 64, The installation text in README.md should
use bold for UI strings: wrap UI labels like "SSH app", "app store", and "Visual
Studio Code app" in bold formatting (e.g., **SSH app**, **app store**, **Visual
Studio Code app**) to comply with the documentation guideline; update the
sentence that currently reads "the SSH app (available in the app store) provides
access to this tool and several community apps provide it as well (e.g., the
Visual Studio Code app)" to use the bolded UI strings while keeping the existing
wording and punctuation intact.


## Developing & contributing

### Prerequisites

The CLI can interact remotely with the Home Assistant Supervisor using the
`remote_api` add-on from the [developer add-ons repository](https://github.com/home-assistant/addons-development).
`remote_api` app from the [developer app repository](https://github.com/home-assistant/addons-development).
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link points to addons-development, but the surrounding text now calls it a "developer app repository". Consider keeping the link text consistent with the repository name (or updating the link if a renamed repository exists) to avoid confusion.

Suggested change
`remote_api` app from the [developer app repository](https://github.com/home-assistant/addons-development).
`remote_api` app from the [Home Assistant add-ons development repository](https://github.com/home-assistant/addons-development).

Copilot uses AI. Check for mistakes.

After installing and starting the add-on, a token is shown in the `remote_api`
add-on log, which is needed for further development.
After installing and starting the app, a token is shown in the `remote_api`
app log, which is needed for further development.

### Get the source code

Expand All @@ -86,7 +86,7 @@ go run main.go info
```

**Note**: Replace the `192.168.1.2` with the IP address of your Home Assistant
instance running the `remote_api` add-on and use the token provided.
instance running the `remote_api` app and use the token provided.

### Building

Expand Down
35 changes: 22 additions & 13 deletions cmd/addons.go → cmd/apps.go
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
package cmd

import (
"os"
"strings"

helper "github.com/home-assistant/cli/client"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)

var addonsCmd = &cobra.Command{
Use: "addons",
Aliases: []string{"addon", "add-on", "add-ons", "ad"},
Short: "Install, update, remove and configure Home Assistant add-ons",
var appsCmd = &cobra.Command{
Use: "apps",
Aliases: []string{"app", "addons", "addon", "add-on", "add-ons", "ad"},
Short: "Install, update, remove and configure Home Assistant apps",
Long: `
The addons command allows you to manage Home Assistant add-ons by exposing
The apps command allows you to manage Home Assistant apps by exposing
commands for installing, removing, configure and control them. It also provides
information commands for add-ons.`,
information commands for apps.`,
Example: `
ha addons logs core_ssh
ha addons install core_ssh
ha addons start core_ssh`,
ha apps logs core_ssh
ha apps install core_ssh
ha apps start core_ssh`,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
for idx, arg := range os.Args {
if idx != 0 && (arg == "addons" || arg == "addon" || arg == "add-on" || arg == "add-ons" || arg == "ad") {
cmd.PrintErrf("The use of '%s' is deprecated, please use 'apps' instead!\n", arg)
}
}
rootCmd.PersistentPreRun(cmd, args)
},
Run: func(cmd *cobra.Command, args []string) {
log.WithField("args", args).Debug("addons")
log.WithField("args", args).Debug("apps")

section := "addons"
command := ""
Expand All @@ -37,12 +46,12 @@ information commands for add-ons.`,
}

func init() {
log.Debug("Init addons")
log.Debug("Init apps")

rootCmd.AddCommand(addonsCmd)
rootCmd.AddCommand(appsCmd)
}

func addonsCompletions(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
func appsCompletions(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
if len(args) != 0 {
return nil, cobra.ShellCompDirectiveNoFileComp
}
Expand Down
16 changes: 8 additions & 8 deletions cmd/addons_changelog.go → cmd/apps_changelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ import (
"github.com/spf13/cobra"
)

var addonsChangelogCmd = &cobra.Command{
var appsChangelogCmd = &cobra.Command{
Use: "changelog [slug]",
Aliases: []string{"cl", "ch"},
Short: "Show changelog of a Home Assistant add-on",
Short: "Show changelog of a Home Assistant app",
Long: `
This command shows the changelog of an add-on. It gives you what has been
This command shows the changelog of an app. It gives you what has been
changed in the latest version and tell you about possible breaking changes.`,
Example: `
ha addons changelog core_ssh
ha addons changelog core_mosquitto`,
ValidArgsFunction: addonsCompletions,
ha apps changelog core_ssh
ha apps changelog core_mosquitto`,
ValidArgsFunction: appsCompletions,
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
log.WithField("args", args).Debug("addons changelog")
log.WithField("args", args).Debug("apps changelog")

section := "addons"
command := "{slug}/changelog"
Expand Down Expand Up @@ -61,5 +61,5 @@ ha addons changelog core_mosquitto`,
}

func init() {
addonsCmd.AddCommand(addonsChangelogCmd)
appsCmd.AddCommand(appsChangelogCmd)
}
18 changes: 9 additions & 9 deletions cmd/addons_info.go → cmd/apps_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ import (
"github.com/spf13/cobra"
)

var addonsInfoCmd = &cobra.Command{
var appsInfoCmd = &cobra.Command{
Use: "info [slug]",
Aliases: []string{"in", "info"},
Short: "Show information about available Home Assistant add-ons",
Short: "Show information about available Home Assistant apps",
Long: `
This command can provide information on all available add-ons or, if a slug
is provided, information about a specific add-on.
This command can provide information on all available apps or, if a slug
is provided, information about a specific app.
`,
Example: `
ha addons info
ha addons info core_ssh
ha apps info
ha apps info core_ssh
`,
ValidArgsFunction: addonsCompletions,
ValidArgsFunction: appsCompletions,
Args: cobra.MaximumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
log.WithField("args", args).Debug("addons info")
log.WithField("args", args).Debug("apps info")

section := "addons"
command := "{slug}/info"
Expand Down Expand Up @@ -58,5 +58,5 @@ is provided, information about a specific add-on.
}

func init() {
addonsCmd.AddCommand(addonsInfoCmd)
appsCmd.AddCommand(appsInfoCmd)
}
14 changes: 7 additions & 7 deletions cmd/addons_install.go → cmd/apps_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ import (
"github.com/spf13/cobra"
)

var addonsInstalCmd = &cobra.Command{
var appsInstallCmd = &cobra.Command{
Use: "install [slug]",
Aliases: []string{"i", "inst"},
Short: "Installs a Home Assistant add-on",
Short: "Installs a Home Assistant app",
Long: `
This command allows you to install a Home Assistant add-on from the commandline.
This command allows you to install a Home Assistant app from the commandline.
`,
Example: `
ha addons install core_ssh
ha apps install core_ssh
`,
ValidArgsFunction: storeAddonCompletions,
ValidArgsFunction: storeAppCompletions,
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
log.WithField("args", args).Debug("addons install")
log.WithField("args", args).Debug("apps install")

section := "addons"
command := "{slug}/install"
Expand Down Expand Up @@ -56,5 +56,5 @@ This command allows you to install a Home Assistant add-on from the commandline.

func init() {

addonsCmd.AddCommand(addonsInstalCmd)
appsCmd.AddCommand(appsInstallCmd)
}
16 changes: 8 additions & 8 deletions cmd/addons_logs.go → cmd/apps_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ import (
"github.com/spf13/cobra"
)

var addonsLogsCmd = &cobra.Command{
var appsLogsCmd = &cobra.Command{
Use: "logs [slug]",
Aliases: []string{"log", "lg"},
Short: "View the log output of a running Home Assistant add-on",
Short: "View the log output of a running Home Assistant app",
Long: `
Allowing you to look at the log output generated by a Home Assistant add-on.
Allowing you to look at the log output generated by a Home Assistant app.
`,
Example: `
ha addons logs core_ssh
ha apps logs core_ssh
`,
ValidArgsFunction: addonsCompletions,
ValidArgsFunction: appsCompletions,
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
log.WithField("args", args).Debug("addons logs")
log.WithField("args", args).Debug("apps logs")

section := "addons/{slug}"

Expand Down Expand Up @@ -47,7 +47,7 @@ Allowing you to look at the log output generated by a Home Assistant add-on.
}

func init() {
addLogsFlags(addonsLogsCmd)
addLogsFlags(appsLogsCmd)

addonsCmd.AddCommand(addonsLogsCmd)
appsCmd.AddCommand(appsLogsCmd)
}
25 changes: 12 additions & 13 deletions cmd/addons_rebuild.go → cmd/apps_rebuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,25 @@ import (
"github.com/spf13/cobra"
)

var addonsRebuildForce bool
var appsRebuildForce bool

var addonsRebuildCmd = &cobra.Command{
var appsRebuildCmd = &cobra.Command{
Use: "rebuild [slug]",
Aliases: []string{"rb", "reinstall"},
Short: "Rebuild a locally built Home Assistant add-on",
Short: "Rebuild a locally built Home Assistant app",
Long: `
Most add-ons provide pre-built images Home Assistant can download and use.
Most apps provide pre-built images Home Assistant can download and use.
However, some don't. This is usually the case for local or development version
of add-ons. This command allows you to trigger a rebuild of a locally built
add-on.
of apps. This command allows you to trigger a rebuild of a locally built app.
`,
Example: `
ha addons rebuild local_my_addon
ha addons rebuild local_my_addon --force
ha apps rebuild local_my_app
ha apps rebuild local_my_app --force
`,
ValidArgsFunction: addonsCompletions,
ValidArgsFunction: appsCompletions,
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
log.WithField("args", args).Debug("addons rebuild")
log.WithField("args", args).Debug("apps rebuild")

section := "addons"
command := "{slug}/rebuild"
Expand All @@ -45,7 +44,7 @@ add-on.
"slug": slug,
})

if addonsRebuildForce {
if appsRebuildForce {
request.SetBody(map[string]interface{}{
"force": true,
})
Expand All @@ -67,6 +66,6 @@ add-on.
}

func init() {
addonsRebuildCmd.Flags().BoolVar(&addonsRebuildForce, "force", false, "Force rebuild of the add-on even if pre-built images are provided")
addonsCmd.AddCommand(addonsRebuildCmd)
appsRebuildCmd.Flags().BoolVar(&appsRebuildForce, "force", false, "Force rebuild of the app even if pre-built images are provided")
appsCmd.AddCommand(appsRebuildCmd)
}
14 changes: 7 additions & 7 deletions cmd/addons_restart.go → cmd/apps_restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ import (
"github.com/spf13/cobra"
)

var addonsRestartCmd = &cobra.Command{
var appsRestartCmd = &cobra.Command{
Use: "restart [slug]",
Aliases: []string{"reboot"},
Short: "Restarts a Home Assistant add-on",
Short: "Restarts a Home Assistant app",
Long: `
Restart a Home Assistant add-on
Restart a Home Assistant app
`,
Example: `
ha addons restart core_ssh
ha apps restart core_ssh
`,
ValidArgsFunction: addonsCompletions,
ValidArgsFunction: appsCompletions,
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
log.WithField("args", args).Debug("addons restart")
log.WithField("args", args).Debug("apps restart")

section := "addons"
command := "{slug}/restart"
Expand Down Expand Up @@ -53,5 +53,5 @@ Restart a Home Assistant add-on

func init() {

addonsCmd.AddCommand(addonsRestartCmd)
appsCmd.AddCommand(appsRestartCmd)
}
Loading