The Home Assistant Assist CLI is a Python command-line application designed to interact with Home Assistant via the "Assist" pipeline. It enables users to send text intents directly to Home Assistant, facilitating seamless integration and control over smart home devices through terminal commands or interactive mode.
- Send text intents to Home Assistant from the command line.
- Interactive mode for real-time text intent communication.
- Authentication via access token for secure connection.
If using a Windows machine, download the latest release. Then, create a .env file in the same directory as the executable with your Home Assistant access token and URL:
HATOKEN=your_access_token_here
HAURL=your_home_assistant_url_here
- Python 3.6 or higher
- Home Assistant running instance
- Access to Home Assistant's API via tokens
- Clone the repository to your local machine.
- git clone
- cd
- Install required Python packages.
pip install websocket-client python-dotenv
- Create a
.env
file in the root directory of the project with your Home Assistant access token and URL:
HATOKEN=your_access_token_here
HAURL=your_home_assistant_url_here
To use the Assist CLI, run the script with Python from the command line. There are two modes of operation:
You can send a direct intent as an argument:
python assist_cli.py "Turn on the living room lights"
Run the script without any arguments to enter interactive mode, then type your intents:
python assist_cli.py
Enter exit
to quit interactive mode.
The .env
file contains your configuration settings. Ensure your HATOKEN
and HAURL
are correctly set to communicate with your Home Assistant instance.
Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License. For more information, see the LICENSE file.
For more information on Home Assistant and its capabilities, visit Home Assistant's official website.