# OneButtonPet
OneButtonPet is a TBC Anniversary Classic addon that turns pet control into a single button.
Use `/pettoggle` in a macro or bind it directly in the Key Bindings menu. On a hostile living target, the first press sends your pet to attack. Press it again on that same target and your pet returns to follow. If your target is friendly, dead, or missing, it safely falls back to `PetFollow()`.
## Features
- One-button pet attack/follow toggle
- Slash command support with `/pettoggle`
- Direct keybind support through the AddOns key binding section
- Smart target-aware behavior for hostile, friendly, dead, and missing targets
- Short grace-window tracking so rapid double-taps still toggle reliably
- Lightweight implementation with no config UI required
## Example Macro
```text
#showtooltip
/pettoggle
```
## Why Use It
Normally, pet control macros split behavior across separate `/petattack` and `/petfollow` conditions. OneButtonPet wraps that into a single command so your pet behavior feels like a real toggle instead of a collection of edge-case macro lines.
## Included in This Repo
- `OneButtonPet.lua`
- `OneButtonPet.toc`
- `Bindings.xml`
- Local Lua test suite
- GitHub Actions CI
- Automatic version tagging from TOC
- Automated release packaging workflow
## Target Client
- World of Warcraft: TBC Anniversary Classic
- TOC Interface: `20504`
## Status
Initial release is published as `v1.0.0`.