{"id":13582392,"url":"https://github.com/home-assistant/cli","last_synced_at":"2025-05-14T12:12:06.972Z","repository":{"id":37744295,"uuid":"114773042","full_name":"home-assistant/cli","owner":"home-assistant","description":":white_square_button: Home Assistant command line interface","archived":false,"fork":false,"pushed_at":"2025-05-05T09:06:11.000Z","size":982,"stargazers_count":200,"open_issues_count":3,"forks_count":101,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-05T10:24:59.377Z","etag":null,"topics":["cli","hacktoberfest","hass"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/home-assistant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":"https://www.openhomefoundation.org"}},"created_at":"2017-12-19T14:12:31.000Z","updated_at":"2025-05-05T09:06:14.000Z","dependencies_parsed_at":"2023-10-12T15:58:01.834Z","dependency_job_id":"30d7a62b-e037-4dce-862e-2aed86cb9146","html_url":"https://github.com/home-assistant/cli","commit_stats":null,"previous_names":["home-assistant/hassio-cli"],"tags_count":93,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/home-assistant","download_url":"https://codeload.github.com/home-assistant/cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254140768,"owners_count":22021220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","hacktoberfest","hass"],"created_at":"2024-08-01T15:02:40.249Z","updated_at":"2025-05-14T12:12:06.933Z","avatar_url":"https://github.com/home-assistant.png","language":"Go","funding_links":["https://www.openhomefoundation.org"],"categories":["Go"],"sub_categories":[],"readme":"# Home Assistant CLI\n\nCommand line interface to facilitate interaction with the Home Assistant Supervisor.\n\n## Usage\n\n- `ha help`\n- `ha \u003csubcommand\u003e \u003caction\u003e [\u003coptions\u003e]`\n\nE.g.:\n\n- `ha core info --raw-json`\n\n### Modifiers\n\n#### Global\n\n```text\n      --api-token string   Home Assistant Supervisor API token\n      --config string      Optional config file (default is $HOME/.homeassistant.yaml)\n      --endpoint string    Endpoint for Home Assistant Supervisor (default is 'supervisor')\n  -h, --help               help for ha\n      --log-level string   Log level (defaults to Warn)\n      --no-progress        Disable the progress spinner\n      --raw-json           Output raw JSON from the API\n```\n\nAll options are also available as `SUPERVISOR_` prefixed environment variables like `SUPERVISOR_LOG_LEVEL`\n\n#### Subcommands\n\nAvailable commands:\n\n```text\n  addons         Install, update, remove and configure Home Assistant add-ons\n  audio          Audio device handling.\n  authentication Authentication for Home Assistant users.\n  cli            Get information, update or configure the Home Assistant cli backend\n  core           Provides control of the Home Assistant Core\n  dns            Get information, update or configure the Home Assistant DNS server\n  docker         Docker backend specific for info and OCI configuration\n  hardware       Provides hardware information about your system\n  help           Help about any command\n  host           Control the host/system that Home Assistant is running on\n  info           Provides a general Home Assistant information overview\n  multicast      Get information, update or configure the Home Assistant Multicast\n  network        Network specific for updating, info and configuration imports\n  observer       Get information, update or configure the Home Assistant observer\n  os             Operating System specific for updating, info and configuration imports\n  resolution     Resolution center of Supervisor, show issues and suggest solutions\n  backups        Create, restore and remove backups\n  supervisor     Monitor, control and configure the Home Assistant Supervisor\n```\n\n## Installation\n\nThe CLI is provided by the CLI container on Home Assistant systems and is\navailable on the device terminal when using the Home Assistant Operating System.\n\nThe CLI is automatically updated on those systems.\n\nFurthermore, the SSH add-on (available in the add-on store) provides\naccess to this tool and several community add-ons provide it as well (e.g.,\nthe Visual Studio Code add-on).\n\n## Developing \u0026 contributing\n\n### Prerequisites\n\nThe CLI can interact remotely with the Home Assistant Supervisor using the\n`remote_api` add-on from the [developer add-ons repository](https://github.com/home-assistant/addons-development).\n\nAfter installing and starting the add-on, a token is shown in the `remote_api`\nadd-on log, which is needed for further development.\n\n### Get the source code\n\nFork ([https://github.com/home-assistant/cli/fork](https://github.com/home-assistant/cli/fork)) or clone this repository.\n\n### Using it in development\n\n```shell\nexport SUPERVISOR_ENDPOINT=http://192.168.1.2\nexport SUPERVISOR_API_TOKEN=replace_this_with_remote_api_token\ngo run main.go info\n```\n\n**Note**: Replace the `192.168.1.2` with the IP address of your Home Assistant\ninstance running the `remote_api` add-on and use the token provided.\n\n### Building\n\nWe use go modules; an example build below:\n\n```bash\nCGO_ENABLED=0 go build -ldflags=\"-s -w\" -o \"ha\"\n```\n\nFor details how we build cross for different architectures,\nplease see our [build action file](https://github.com/home-assistant/cli/blob/master/.github/workflows/build.yml).\n\n### Contributing a change\n\n1. Create a feature branch on your fork/clone of the git repository.\n2. Commit your changes.\n3. Rebase your local changes against the `master` branch.\n4. Run test suite with the `go test ./...` command and confirm that it passes.\n5. Run `gofmt -s` to ensure your code is formatted properly.\n6. Create a new Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhome-assistant%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhome-assistant%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhome-assistant%2Fcli/lists"}