The fastest way: use the File Editor add-on to paste raw code directly
If you want a single file or a small set of files from a GitHub repository, the quickest route is to copy the raw code and paste it into Home Assistant's File Editor add-on. Open the GitHub file in your browser, click the Raw button to see plain text, copy everything, then paste it into a new file in Home Assistant. This works for YAML configuration files, Python scripts, and automation templates — anything text-based.
The File Editor add-on comes built into most Home Assistant installations. Go to Settings > Add-ons, search for "File Editor", and start it if it is not running. Once open, create a new file in the folder where it belongs (usually config/ for configuration files or config/custom_components/ for custom integrations), paste the code, and save. Home Assistant will reload the file automatically or on your next restart, depending on what you copied.
This method works best when you know exactly which file you need and you do not plan to update it often. If the repository changes and you want the latest version, you will need to repeat the copy-and-paste process by hand.
Key Takeaways
- Use the File Editor add-on to paste single files or small sets of files directly into Home Assistant without command-line tools.
- The Raw button on GitHub shows plain text that you can copy; paste it into File Editor and save to the correct folder.
- For entire repositories or frequent updates, clone the repository using Git commands in the SSH terminal or use the Git Clone add-on.
- Custom integrations go in config/custom_components/ and require a restart; automations and scripts reload automatically.
- If you use Git to clone, you can pull updates later without re-downloading everything by hand.
Cloning an entire repository with the Git Clone add-on
When you need all the files from a GitHub repository — not just one or two — use the Git Clone add-on. This is the standard way to install custom integrations, themes, and large projects. Install the add-on from Settings > Add-ons > Create your own add-ons (or search the community add-ons), then configure it to point to the repository URL.
The add-on will download the entire repository into a folder you specify, usually config/custom_components/ for integrations or config/www/ for themes. After cloning, restart Home Assistant so it finds and loads the new files. If the repository updates on GitHub later, you can run the clone again and it will pull the latest version.
To find the repository URL, go to the GitHub page, click the green Code button, and copy the HTTPS link (not SSH, unless you have set up SSH keys). Paste that URL into the Git Clone add-on configuration and let it run.
Using SSH and Git commands for more control
If you are comfortable with the command line, you can SSH into Home Assistant and use Git directly. This gives you the most control: you can clone, pull updates, switch branches, and manage multiple repositories without add-ons.
Enable SSH access in Settings > System > Termina & SSH, then connect from your computer using an SSH client. Once connected, navigate to the Home Assistant config folder and run git clone [repository-url] to download the repository. For custom integrations, clone into config/custom_components/. For other files, clone into the appropriate folder based on what you are installing.
After cloning, restart Home Assistant. Later, when you want updates, SSH back in, navigate to the cloned folder, and run git pull to fetch the latest changes without re-downloading everything. This is much faster than cloning again from scratch.
Where files go and what happens after you copy them
Home Assistant has specific folders for different types of files, and putting them in the wrong place means they will not work. Custom integrations must go in config/custom_components/ and require a full restart to load. Automations, scripts, and templates can go in config/automations.yaml, config/scripts.yaml, or separate YAML files in dedicated folders, and they reload automatically when you save.
Configuration files like configuration.yaml or packages/ files reload when you restart or trigger a manual reload from Developer Tools. Themes go in config/themes/ and load after a browser refresh. Python scripts for the Script Editor go in config/scripts/ and are ready to use immediately.
Check the repository's README file to see where the author intended the files to go. Most well-maintained repositories include installation instructions that tell you the exact folder path and whether a restart is needed.
Handling dependencies and requirements
Some repositories include a requirements.txt file or list Python packages they need to run. Home Assistant will not install these automatically — you have to do it by hand through SSH or by using the Terminal & SSH add-on.
SSH into Home Assistant, navigate to the config folder, and run pip install -r requirements.txt if the file exists in the repository. If the README lists specific packages, install them one at a time with pip install [package-name]. After installing dependencies, restart Home Assistant so the new packages are available to your integrations or scripts.
If you skip this step and the integration or script needs a package that is not installed, you will see errors in the logs but the feature will not work. Always check the README first.
Troubleshooting when files do not appear or load
If you copied files but Home Assistant does not see them, check three things: the folder path is correct, the file extension matches what Home Assistant expects (YAML files need .yaml, not .txt), and you restarted if required. Custom integrations especially need a full restart — a reload is not enough.
Look at the Home Assistant logs (Settings > System > Logs) to see error messages. If a file has a syntax error, the logs will tell you the line number and what went wrong. Use the YAML validator in Developer Tools to check YAML files for formatting problems before you restart.
If you cloned a repository and it is not loading, make sure the folder structure inside the clone matches what Home Assistant expects. Some repositories have the actual integration code nested inside subfolders, and you may need to move files up one level. The README usually clarifies this.
Keeping repositories up to date
If you cloned a repository using Git and the author releases updates, you have two choices: pull the latest version using git pull, or delete the old folder and clone again. Pulling is faster and preserves any local changes you made, but cloning from scratch is simpler if you are not sure what changed.
To pull updates, SSH in, navigate to the cloned folder, and run git pull origin main (or master if the repository uses that branch name). Home Assistant will download only the files that changed. Restart Home Assistant afterward to load the updates.
If you used the Git Clone add-on instead of SSH, you can re-run the add-on to pull the latest version. Some add-ons have an update button; others require you to delete the folder and clone again. Check the add-on documentation for the exact process.
Frequently Asked Questions
Can I copy files from GitHub without using the command line?
Yes. Use the File Editor add-on to paste individual files, or use the Git Clone add-on to download entire repositories. Both have web interfaces and do not require SSH or terminal commands. The File Editor is fastest for one or two files; Git Clone is better for full projects.
Do I need to restart Home Assistant after copying files?
It depends on the file type. Custom integrations require a full restart. Automations, scripts, and templates reload automatically when you save. Configuration files reload on restart or when you trigger a manual reload from Developer Tools. Check the README to be sure.
What if the GitHub repository has a folder structure and I do not know where to put the files?
Read the README file in the repository root — it almost always includes installation instructions with the exact folder path. If it does not, look at the folder names inside the clone. Custom integrations have a folder named after the integration inside custom_components/; themes have a folder inside themes/. Match that structure.
Can I update files I copied without re-downloading everything?
Only if you used Git to clone the repository. Run git pull to fetch updates. If you used File Editor to paste code, you will need to copy and paste again by hand. This is why Git is better for files you plan to update often.
What does the Raw button on GitHub do?
It shows the file as plain text instead of formatted HTML, so you can copy the entire contents without accidentally copying formatting or line numbers. Click Raw, select all, copy, then paste into File Editor or your text editor.