Add gdevelop CLI support

I’d like to see some command line support in gdevelop. Use cases should be

  • run gdevelop with a specific project.
    This could be extended into double-clicking a gdevelop project would automatically open gdevelop and the project
  • export project. Both project and export options should be specified on the command line
    this would allow people to build CI/CD pipelines, which I am very interested in
3 Likes

It is already on gdevelop just open a gdevelop project .json and set it to open with gdevelop always

Just using save as will do the work

Thank you for the hint, Ruhan.
I am however not sure how well this would work out.

  1. When I ran
    gdevelop --help, or
    gdevelop -h
    there was no reaction so I thought command line parameters are not used at all. I just checked by giving a full path and wow, the project file was opened. Thank you for the fast implementation. :slight_smile:

I use json files in many cases. There are lots that are not related to GDevelop, neither in context nor in structure. Thus I recommend changing the default extension to some custom value (e.g. *.gdevelop) so setting the association you describe does not break other behaviours like opening JSON files with my favourite IDE.

  1. How would using “Save as” allow me to export the project into a local HTML5/JavaScript application? Could you elaborate on that?

Save as allow you to save your project file in your wanted directory.
To export project to your wanted directory you can set it while you export the project. :slightly_smiling_face:

No at all. Hiran wish a command in the console for export a game without open GDevelop.

Lot of software work only in command line. And some of them use both Graphical UI (GUI) and non GUI.
non GUI is the use of the software in command line.

For now as far i know GDevelop have only dev-tools and disable-update-check
See in GDevelop\newIDE\electron-app\app\main.js

Card added on the roadmap.

1 Like

You suggest to choose “save as” from the GUI menu - I can already achieve that on the command line with a file copy.

I was not asking to save the project in another directory but to ‘export’ the project. Probably poorly named, as I believe the game.json file gets compiled into whatever format I choose - however the menu entry is called export so I am reusing that term.

My intention is to trigger this export function from the command line, without further activity on the UI. I think Bouh understood the gist.

1 Like