@whitequark @natty I had that problem, and it's part of why I made this: https://gist.github.com/ryancdotorg/163f778bf91877cceac1fb07139754f1
It's a customized REPL around node that can also run scripts, and when it runs scripts it does cursed shit to make the global crypto object work.