Adding a Custom Scripted Button to REAPER's UI
A developer's walkthrough of exactly how a .lua file becomes a clickable toolbar button in REAPER — which config files get written, what the command ID really is, and the one API call you'd add to make the button light up.