Have a look through the documentation for the firmware you want to use. The most popular are Marlin and Repetier. The Marlin github Readme contains a list of the Gcodes it supports and which variables they except. I believe Repetier has a similar list.