Installation
💡 Installing the
plsexecutable currently requires the Deno CLI version 1.29.2 or higher to be installed. This requirement will be removed once the preview period is over.
To install the Platformscript interpreter on your system, run the following:
$ deno install -A https://platformscript-anztkndh0nng.deno.dev/plsThis will install the pls executable on your path, which you can confirm by
running
$ pls --versionOnce you have pls installed, you can use it to run PlatformScript programs.
To try it out, create a file called hello-world.yaml and paste the following
text into it:
Hello world!You can now use pls to execute PlatformScript programs. To do this we use the
run command. Try it out in your console with the file you just created.
$ pls run hello-world.yaml
Hello world!💡By default, the result of evaluating a PlatformScript value is itself. Hence the hello world program in PlatformScript is the YAML string
Hello world!
What's happening here is that the pls run command is evaluating the
PlatformScript module contained in the file hello-world.yaml. But modules can
be located anywhere adressable by a URL, not just on the local filesystem. For
example, you can run run the preceding example online with the command:
$ pls run https://pls.pub/examples/hello-world.yaml
Hello world!