Using the FW Installer in the Command Line
The FW Installer is of course, at its base a means of running specific FW tasks in the command line and being able to update the FW Registry. Things such as installing, publishing, or even updating apps are all done through it. While the various guides above help you to know how to do certain tasks, it may be helpful to have a brief API documentation on some of the most commonly used commands that are available, as well as all the options associated with them. The FW Installer is used by both end users installing production environments and developers alike, so it is important to have some of this API documentation sorted out. In each case, when there is a more robust guide for each section, this will be linked within the API documentation.
General Introduction
There are a couple of pieces of information which may be helpful to discuss before getting into each command individually. Namely, some general tips which you can know about all commands, which will help you use the FW Installer more effectively.
Help from the Command Line
Perhaps first it is helpful to say that there is a way for you to get help when using the installer itself, without having to read some of this API docs. First, the command fw list
will list all commands that are available to you from the FW Installer (or other addons) in this directory. It will first list all of the options that are available on all commands followed by a list with a brief description of every command that is usable in that directory (meaning that the fw database
commands will show up in App folders with Migration Core, but not in the root FW folder). Some of these commands will almost never be used, so they will not even be mentioned here.
Secondly, fw help {command}
or fw {command} --help
or fw {command} -h
are three different ways of asking for the same thing. It will give you a brief tutorial for that command right there in the command line. It will give you the following information (if applicable):
- Description, which is typically a short sentence
- Usage, which gives the structure for calling the command in command line
- Arguments, which is a full list of all the acceptable arguments, with a short description of each.
- Options, which will give the full list of options available for that command, since some commands define other options than just the usual.
- Finally it might display Help, which is just an extra documentation piece for the Installer to give any extra needed information for the purpose or usage of this command. For many of the commands, this is deemed unnecessary and this section will not be displayed.
Both of these commands can help you to get an easy thumbnail sketch of what is available to you in the command line.
Most Helpful Options on All FW Commands
Each command defines its own options and arguments, which allow the Installer to receive the information it needs from the user. Thus, not all options are available on all commands, and not all global options are worth mentioning, but there are a few that are worthy of mention to allow you to use commands more effectively. Some commands have both a long option (prefixed by --
) and a short option (prefixed by -
). Where applicable, we will display both options.
--help
or-h
is perhaps one of the most important options available on all commands, but that was described in detail above.--quiet
or-q
will run the command without any output. This can be helpful when you know the command will work and want a less cluttered interface.--no-interaction
or-n
will run the command and not ask you any questions (thus if the script has interactive questions, it will automatically use the defaults, rather than requiring you to hitto select the default). --version
or-V
(note the capital) will simply return the currently installed version of the Installer. For this option, no command is required to be selected (hencefw --version
is all you need to display the version).
As suggested, each individual command may have other options beyond these, but these will help get you started with what is able to be seen on every command. This is also not all of the global options, but they will probably be the only ones that will help you (for example, there is no difference currently between the different levels of verbosity so that option doesn't really help much).
Most Important Commands
Now that we have that we have a general introduction for all of the commands, the specific commands which will be most used by you in development, which will be given specific attention are the following:
- Related to setup/the FW Installer: fw setup, fw login, and fw self-update
- Related to each app: fw install, fw update, and fw publish
- Additionally apps with the Migration Core Addon are given the additional command, fw database to integrate some database setup abilities in the command line (currently all apps have Migration Core, so this will be available in every app).