ZX provides two start scripts:
zx: Headless mode
zxh: Interactive mode
The "zx" command is for running "headless", meaning with no Erlang shell attached and "zxh" is for running with an Erlang shell (interactive -- particularly useful for developers or specialty applications that expect an Erlang shell to be present).
The following examples are all written as headless execution commands, but substituting
zxh in place of
zx will change the mode.
To run a program from the command line use the "run" command:
zx run [app] [args]
The "app" part of the command is a package identifier. A package identifier is a realm name, a package name and a version string, all separated by dashes:
some_realm-some_app-X.Y.Z. You can omit the realm name if the app is from the default "otpr" realm (the canonical repository of open-source software), so
otpr-foo is equivalent to
foo. If you want to run the latest version every time you can omit the version number also.
For example, if you want to run the latest version of a program called "foo" from the realm "otpr" then you only need:
zx run foo
If you want to run a specific version of foo:
zx run foo-1.2.3
To run the latest incarnation of version 2 of a program called "bar" from a realm called "other":
zx run other-bar-2
See the ZX manual for more details on how application names (aka "identifiers") are used to pick specific versions as well as how to query a realm to find application names, descriptions and types.