btdownloadheadless is perfect for this task. All you need to do is kill it once you get to the "download succeeded" message. I was going to write a Python script and even thought of putting in options to share X percentage of the file via upload before exiting (so you don't just download to 100% and then immediately exit without being a good citizen), but grep -q provided me a very quick and simple way to do what I wanted:
btdownloadheadless foo.torrent | tee out.txt | grep -iq "download succeeded"
grep -q will silently look through every line of output and do nothing, until it encounters the first occurrence of "download succeeded", at which point it will exit, causing the other two commands piped into it to exit as well.
You can then watch the output of btdownloadheadless by tailing out.txt with a fast polling rate:
tail -s 0.1 -f out.txt