tartelet icon indicating copy to clipboard operation
tartelet copied to clipboard

✨ Feature Request: Command line args or config yaml

Open patriknyblad opened this issue 1 year ago • 9 comments
trafficstars

Is your feature request related to a problem?

When setting up a new blank GHA Runner Host (the host machine that will run Tartelet in this case), I can't in an easy/efficient way automate setting up the settings in Tartelet. Ideally I would like to script the process/inject config.

What solution would you like?

I would love to pass all possible settings as command line args to Tartelet in order to automate the setup of a new GH Runner host system and not have to click through the UI. Maybe an argument for a config yaml file makes more sense than passing each individual setting.

What alternatives have you considered?

We have looked into using automator to navigate the Tartelet UI to set all settings using a script but failed due to missing accessibility labels and it being a bit bothersome and error prone in case the UI changes between versions.

Any additional context?

No response

patriknyblad avatar Oct 22 '24 15:10 patriknyblad

Hey, any update on this?

TimPerry avatar Dec 30 '24 15:12 TimPerry

I think it would be great to have a YAML config file that can be exported/imported through the GUI settings and reside in a location where it can be easily overridden

I don't expect to have the time to work on this in the near future, but I'm happy to review PRs that add this functionality

simonbs avatar Jan 02 '25 09:01 simonbs

Hey, no worries. Would you be against it working like how cilicon does it with a yaml file in the home directory?

TimPerry avatar Jan 02 '25 11:01 TimPerry

Would you be against it working like how cilicon does it with a yaml file in the home directory?

I think one of Tartelet's edges is that it has a GUI for all settings, and I believe a config YAML file should extend this rather than replace it.

Therefore, the best way to go about this might be by writing Tartelet's settings to a YAML file and storing it at a user-specified location. It's essential that the GUI and the content of the file are kept in sync.

It's important to consider that Tartelet stores the GitHub private key in the keychain. I think that should remain as is. Storing it in plain text in a YAML file would pose a security risk.

simonbs avatar Jan 02 '25 13:01 simonbs

Righto, thanks for clarifying.

For context: the motivation for this, for us, would be to enable automation of provisioning our build machines, otherwise this becomes a manual step, so a manual import/export wouldn't really work for us.

TimPerry avatar Jan 02 '25 14:01 TimPerry

I’d be fine with having a default location that’s something like ~/.tartelet.yml, enabling you to automate everything. However, it needs to work together with the GUI.

simonbs avatar Jan 02 '25 14:01 simonbs

Cool -- yes, of course.

TimPerry avatar Jan 02 '25 14:01 TimPerry

I'm actually starting to build a little app which can monitor our fleet of Actions runners (and also push new images to them) and part of that work is extending Tartelet to have a CLI. My goal is to have commands like these:

tartelet status
tartelet stop
tartelet start

I can imagine extending this interface to allow getting/setting of values that are managed by the GUI as well. I am thinking about creating a Composers package which can be depended on by a CLI target (and embedding the CLI inside the main app bundle as well).

I'm not sure how long all this will take me but I just made my fork of the repo about an hour ago so I'm on my way 🙂

Of course I'm happy to have input from @simonbs on all this and I'll submit PRs once I get things in a good state!

jsorge avatar Jan 06 '25 01:01 jsorge

@jsorge This sounds exciting! I'd love for Tartelet to have a CLI! Let me know if there's anything specific you'd like input on. I'm also happy to review and merge PRs whenever that time comes 😊

simonbs avatar Jan 07 '25 08:01 simonbs