godot-version-manager
godot-version-manager copied to clipboard
Add CLI support
Any ideas on how this is gonna work? Is it gonna be similar to pyenv/nvm or is it gonna just open X project in X version?
I plan to separate all components as much as possible in a couple of singletons providing the different services. So for example Downloader.gd will let you queue a download, abort it, check it's progress. Visual representation will be handled in a different script(and asociated nodes/scene). So it will be the same API to be consumed by the GUI frontend or the CLI frontend.
For the CLI itself the idea is to have a nice API that allows you to do the same things you can do visually, but through the command line.
For example:
gvm get version 3.5.2-rc2
will download and install Godot 3.5.2-rc2
gvm add project "My Game" at path "/path/to/project/" with version 3.5.2-rc2
will add that project to the list of projects and assign Godot 3.5.2-rc2 as its version (and maybe download it if necessary)
gvm launch project named "My Game"
will get the list of projects by name, find "My Game" and launch it with it's assigned version
gvm set version 3.6 for project named "My Game"
will change the assigned version into 3.6 (and maybe download it if necessary)
gvm list projects
will return a numbered list of projects
gvm launch project #2
will launch project number 2 from the returned list
I'm just coming up with this examples right now. GVM 1.x was mostly something I quickly hacked together. For 2.0 the idea would be to plan it thoroughly, prioritize and then start implementing it
Is it planned if/when this happens we would get a headless build as well? I would be interested in getting a Godot version manager as a CLI tool only.
Yes, the idea is that if it can be used in cli mode you should be able to run it in headless mode and also non-interactively (from a script). I was pretty busy with GDC these days but I'd like to start working on it as soon as possible
Alright, that's amazing to hear! Just as a note, though: gvm
is already the name of the Go Version Manager. You may want to consier gdvm
or similar.
Thanks for the info. Yeah I'm considering what to do regarding the name. "Godot Version Manager" is descriptive and worked well for an internal project, but for something publicly accessible I think it could be confused with an official tool. Besides, the new version will also manage projects as well. I'm thinking of using a fantasy name instead of an acronym and I'll try my best to avoid any collisions with other apps.
For those wanting CLI support, there's https://github.com/chickensoft-games/GodotEnv by @chickensoft-games