Add entrypoint function which returns a repl-env.