I worked on a semi-similar project, to let people turn bash scripts into FUSE filesystems: https://github.com/jasonhansel/microfs
For example, this script is used to make a FS that turns the web into a filesystem, so reading /www.google.com/GET will show the Google homepage: https://github.com/jasonhansel/microfs/blob/master/http.sh