Bashtet is a Tetris Bot Protocol Tetris bot written in bash. Use it with a TBP frontend, such as Quadspace.
The actual AI itself is a simplified implementation of Yiyuan Lee's Tetris AI, which was chosen over Dellacherie's algorithm or El-Tetris as it was a fairly simple algorithm using just four features. Despite the name, this algorithm is nowhere near perfect.
TBP's design delegates actual legality checking for each move to the frontend; I thought it would be funny to abuse this fact. The idea was to enumerate each move and simply present it to the frontend in order of preference. Alas, this was incredibly slow and also crashed Quadspace (why can't it handle a thousand suggestions?), so this does some basic legality checks to avoid this.