Toybox provides the shell utilities. You can plug in a keyboard and mouse via the USB charging port. You can screencast to a TV via a Chromecast. Somehow you'd need to get a compilation toolchain on there.
It's an interesting idea IMO. For many people an Android device is their only computer... though I'm not aware of anyone doing this for real in the wild?