https://drive.google.com/file/d/0B0yPt9F6jiAbWWhqNk1zZmIxVVk/edit?usp=sharing
README is here
https://github.com/sfmorrigan/toolbox-sca
You can now use indices on variables as well as vanilla backrefs. For example
C = p t k
G = b d g
N = m n
CN > $2$G1
lets you do both metathesis of plosives and nasals, but also change
C > G in a single rule. You actually can't use parentheses here, but it might be a good idea for me to allow that. Or, make them mandatory, since automatically recording the index of every variable might be annoying, as in the
CVN example, where you don't actually need to do anything with the
V.