# Agent Instructions for GitHub Binary Installers ## When to Use the Installer Creation Guide When a user requests the creation of an installer script for a binary hosted on GitHub releases, follow these steps: 1. **Check Existing Installers**: First, verify if an installer for the requested tool already exists in the repository by checking the project files. 2. **Use the Guide**: If no installer exists, use the `INSTALLER_CREATION_GUIDE.md` as the primary reference for creating the new installer. 3. **Follow the Template**: Strictly adhere to the structure, functions, and patterns outlined in the guide. Do not deviate from the established conventions. 4. **Adapt Placeholders**: Replace all placeholders (`[tool]`, `[Tool Name]`, `[TOOL]`, `[owner]/[repo]`) with the actual values for the requested binary. 5. **Verify GitHub Releases**: Ensure the binary naming convention and download URLs match the actual GitHub release assets. 6. **Test the Script**: After creation, the script should be tested to ensure it works correctly on the target systems. 7. **Update Documentation**: Add appropriate usage examples and next steps specific to the tool being installed. ## Key Requirements - **System-Wide Preference**: Always prefer system-wide installation (`/usr/local/bin`) over user-specific installation. - **Binary-Only**: Disable package manager installation to ensure the latest version from GitHub is used. - **Version Management**: Implement proper version symlinks for multiple version support. - **Conflict Resolution**: Detect and offer to remove conflicting user bin installations. - **Command-Line Options**: Support `--version`, `--force`, and `--reinstall` options. - **Error Handling**: Include comprehensive error checking and user-friendly messages. ## File Naming Convention Name the installer script as `install-[tool-name].sh` (e.g., `install-my-tool.sh`). ## Integration After creating the installer: 1. Add it to the repository 2. Update any relevant README files to reference the new installer 3. Ensure the script is executable (`chmod +x install-[tool-name].sh`) ## Reference See `INSTALLER_CREATION_GUIDE.md` for complete implementation details and code templates. AGENTS.md