This mod adds the item equivalent of command blocks. It lets creative players
The rune can be given to any player, who can use it to execute the commands. More details (and source code) at https://github.com/stewbasic/CommandItem.
Actually I would like to see this added to vanilla, to make customization easier for mapmakers and servers. This seems unlikely to happen, so in the meantime this mod is the next best thing...
Planned future features