I’m building a cli which invokes fly to do deployments. I’m currently wrapping the flyctl cli as part of my cli, but it’s kind of a pain to execute shell commands from my cli’s golang code and to try/catch errors. Is there a fly library that I can include as part of my cli, or fly API endpoint that I can invoke instead?
It depends on what you’re trying to do. Fly Machines have a REST API; for other stuff, flyctl talks to our internal GraphQL API. You can use the GraphQL API, but we don’t guarantee that it won’t change in ways that break what you’re doing.
1 Like