Get fly with your Fly command line

The flyctl command is your route to harnessing the immense power of the global Fly network... well, it's a pretty cool command. There are plenty of features in it that not everyone knows. With that in mind, here are some tips for some higher Flying:
  • The command... It started off as flyctl but we kept being asked when would the command become fly. "Why not both?" we said and now, on most platforms, you can use flyctl or fly interchangeably. Boom! Three keystrokes saved!

  • The current app... You already know that Fly looks for a fly.toml file in the current directory to work out what the app you are working with is called. But for many commands you can also add -a appname to your Fly command and it'll use that appname instead. If there's a fly.toml in your current directory, it will ask if you are sure that's the name you want to use to be on the safe side. So now you don't have to change directory to, say, get a status on mygreatapp99 - just do fly status -a mygreatapp99.

  • Building from outside the directory... The fly deploy command can work with that. Say you want to build the app in a child directory "mygreatchildapp". Then just point the deploy at it. fly deploy ./mygreatchildapp and Fly will find the fly.toml in there and get to deploying.

  • Deploy different... What should you do if you have a Fly app that you want to deploy a couple of different ways. If, for each way, you've built a fly.toml file how do you pull that all of them together under one directory? Rename the fly.toml files to something meaningful for your app test.toml, preview.toml, production.toml and then leverage the -c aka --config flag on fly deploy. That gets you the ability to run fly deploy -c preview.toml and away it goes deploying with that config. Oh, and you can combine that with the previous item on this list and then build out of your mono repo tree without changing directory.

  • Easy opening... Are you working out what your application's "" host name is? Save time with the fly open command that works out the app's URL for you and opens your browser on that page.

  • Get Metrics... Some things look better rendered in your browser, like metrics. Now you may know the fly dash command which opens up your Fly web dashboard in your browser. Well, you can go one better with fly dash metrics which takes you straight to the dashboard metrics page for some graphical delight and a lot of information.

  • Go Docs... If you want to look something up in the docs and you are at the command line, try fly docs which opens your browser straight into the documentation's top page.