Expose a global 'ctx' to CLI so main() isn't required.