add dotenv support
add example, refactor streaming, improve specs