Reach has a few sub-commands, each with their own options.
However, all commands support the following options:
The environment variable REACH_VERSION signifies what version of Reach to use.
You compile your Reach code by executing
$ reach compile SOURCE EXPORT ...
If no SOURCE is provided, then index.rsh is used.
If no EXPORT is provided, then main is used.
reach compile supports the following options:
-o/--output ‹OUTPUT› —
Writes compiler output files to ‹OUTPUT›, which defaults to a directory named build in the same directory as SOURCE.
Write intermediate files, which may be interesting for debugging compilation failures or using in other contexts.
You can create template index.rsh and index.mjs files for a simple Reach app by running
$ reach init
You can run a simple Reach application by executing
$ reach run APP
If no APP is provided, index is used.
If APP is a directory, then APP/index is used.
Your Reach program is named APP.rsh.
Compiles your program with Reach.
Executes that image, connected with a private Ethereum devnet.
reach run supports the following options:
If the environment variable REACH_ETH_MODE is bound to ganache, then Reach will use Ganache instead of a private network.
You can create template package.json, Dockerfile, docker-compose.yml, and Makefile files for a simple Reach app by running
$ reach scaffold
The files created are the same as those used temporarily by reach run.
You can upgrade your Reach installation by executing
$ reach upgrade
This may change the default version used by reach commands.
You can update the Docker images used by your Reach installation by executing
$ reach update
This may change the patch version used by reach commands.
You can see what version of Reach you have installed by running
$ reach version