openhue / openhue-cli

OpenHue CLI is a command-line interface for interacting with Philips Hue smart lighting systems.
https://www.openhue.io/cli
Apache License 2.0
41 stars 6 forks source link
automation cli cobra-cli golang openhue philips-hue

OpenHue CLI

Build CodeQL Maintainability with Code Climate Test Coverage Docker Image Size (tag)

Overview

OpenHue CLI is a command-line interface for interacting with Philips Hue smart lighting systems. This tool provides a convenient way to control your Philips Hue lights and perform various tasks using the command line.

How to setup OpenHue CLI

Features

For a complete list of features and usage, please refer to the OpenHue CLI online documentation.

Getting Started

To begin developing with Open-Hue's OpenAPI specification, follow these steps:

Prerequisites

Before you start, ensure that you have the following prerequisites installed:

Fork the Repository

Before contributing to OpenHue CLI, it's a good practice to fork the repository to your own GitHub account. This will create a copy of the project that you can work on independently.

Build

  1. Clone the OpenHue CLI repository to your local machine:
    git clone https://github.com/your-username/openhue-cli.git
    cd openhue-cli
  2. Run the following command to build OpenHue CLI on your local environment:
    make build

Test

Run the following command to execute all the tests and calculate the code coverage:

make test

If you want, you can also run the following command to visualize the coverage analysis in your browser:

make coverage

or use make coverage html=true to visualize the HTML report in your default web browser

Generate the OpenHue API Client

Run the following command to generate the OpenHue API Client:

make generate

If there was any OpenAPI specification change, this command will update the ./openhue/gen/openhue.openhue.go file. Please note that this file must never be manually edited!

You also generate the client from another spec location:

make generate spec=/path/to/local/openhue.yaml

License

GitHub License

Open-Hue is distributed under the Apache License 2.0, making it open and free for anyone to use and contribute to. See the license file for detailed terms.