The command-line tools are the primary interface to the Trigger.io Forge build service.
Using the command-line tools you can:
The command-line tools are available via npm
.
The first thing you'll need is a working Node.js installation.
You can either install Node.js via your favourite package manager or download it here:
Once you have verified that your Node.js installation is working you can perform the following tasks to get going with a new app:
mkdir my_app cd my_app npm init
npm i @triggercorp/forge --save
npx forge create
npx forge build android npx forge run android
npx forge build ios npx forge run ios
npx forge build web npx forge run web
Important: Only use
npm
to perform a global installation if you know exactly what you are doing and why you are doing it.
It's also possible to install the forge command-line executable globally in your Node.js installation.
npm i @triggercorp/forge -g forge version
Or, if your npm installation requires root permissions for a global install:
sudo npm i @triggercorp/forge -g --unsafe-perm=true
There are five main commands when using Trigger.io:
forge create
forge build
forge serve
forge run
forge package
Reload has a number of commands which can be run from the command line:
forge reload list
forge reload create
forge reload push
These are explained in more detail in Using Trigger.io Reload.
There are also some additional commands which may be used:
forge check
: Perform some sanity checks on the app, including
parsing the JavaScript to check for syntax errors.Run any command with the --help
argument to see more information
about the particular command.
Note: All commands can be run with the
--verbose
parameter, to enable the display of more output.
Parameters to the forge
commands can be given as command-line
options, or stored in a file.
Command-line options are dot-separated names, like
--android.sdk /path/to/android-sdk
.
A complete list of command-line options, is given in Available Forge Parameters.
forge
executable in ToolkitThe forge
executable can also be found in the legacy Toolkit distribution:
C:\> "C:\Users\<Your Username>\AppData\Local\Trigger Toolkit\forge.exe"
$ $HOME/Library/Trigger\ Toolkit/forge
$ ~/TriggerToolkit/forge