How to run Minecraft Java without the launcher?

Solution 1:

So I have found a solution. I am using Electron (https://www.electronjs.org/) and Node JS to build my Minecraft Launcher. And I have found a npm package that gives exactly what I want: https://github.com/Pierce01/MinecraftLauncher-core.

This package uses Node JS to launch Minecraft with authentication and all.