Fw Install

The main purpose for this command is to install a new FW App not currently installed on your FW System. There are guides already available for how to install a new app, but below is a bare description of how the fw install command works. The other purpose for the fw install command is to install all of the addons listed, and configure the settings for the app as well.

You can also optionally run fw i as a shortened form of fw install if you wish.

Note: In developing each app, you can modify the install.php file for setting up configuration specific install code for that app. This will be run when running fw install for the first time, or when you are running fw install --config to renew the configuration. An example app that does a bit of this is eResource Checks.

Directory to Run

This command can be run either in the base FW root directory (usually called fw-dev or fw-apps), which is where you run the command if it is the first use case (installing a new app). In this case the app argument is required. In this case, if the app is already installed, it will throw an error unless the --force option is specified.

The second place this command can be run is in the root app folder (ie fw-dev/apps/sta). Because you are in the context of a specific app already, the app argument is not used (it automatically fills the app argument properly based on your folder). In this use case, the app is clearly already installed, and thus, this is used for the second use of the install command (to install addons or reconfigure settings). This second use case is used almost exclusively in a development (as opposed to a production) context.

Arguments

There are two arguments which can be used:

  • app is either the app short code (for production) or the git url (for development). For more information on these, see the documentation linked above. This parameter is required either by directory context or to be specified. If using the command within the app folder, this argument is set by context and unneeded.
  • version is a string which specifies the version of the app to download. This is only relevant for the production installation of an app, and will not do anything if used in a development mode.

Extra Options

There are four additional options, besides those listed in the base options above. They are:

  • -w | --webroot is an option that can be set to the value of the webroot variable, where the client will be built to. If not provided, this will be prompted from the user (unless it is in no interaction mode). Since this is a variable, if used a value must be specified (it isn't just a flag), like so: fw install sta --webroot="../../public/sta/".
  • -u | --url is an option that changes the url variable. If not provided, this will also be prompted from the user. Like the webroot option, this also requires a value, like so: fw install sta --url="/sta/".
  • -f | --force is a flag option which if it is included will ignore if an app is already installed and install a fresh app regardless. Otherwise, there will be an error if you attempt to install an app that is already installed on your system.
  • -c | --config is a flag option, which if included will re-run the php installation script to generate the config for that app. Ordinarily, this script is only run during the initial install of an app, so it is helpful to be able to reset the configuration if needed (especially for an app like eResource Checks).

Usage

So here is the structure of the fw install command. If it is wrapped in <> it is a required, wrapped in [] means it is optional. Global options for all FW commands are not included. See above for any questions.

C:\Users\[user]\fw-dev> fw install <app> [version] [--webroot=WEBROOT --url=URL --force --config]
C:\Users\[user]\fw-dev\apps\sta> fw install [--force --config]