Jamie Balfour

Welcome to my personal website.

Find out more about me, my personal projects, reviews, courses and much more here.

Official ZPE/YASS documentationRunning ZPE

Official ZPE/YASS documentationRunning ZPE

There are many ways to run ZPE as described on the information page. This page will outline all modes and how to use them.

From the GUI

It's really easy to run ZPE from the operating systems graphical user interface (GUI) by simply double clicking on the zpe.jar file that you would get from the download. This will open the graphical editor and is the same as using the zpe -g command.

This is the easier method of running ZPE and all features are available through this method, but ZPE was originally designed as a command line programming language so bear that in mind if you want the fullness of ZPE at your disposal.

From the command line

Before that, we need to open a command line on our computer. On macOS this is called Terminal. On Windows it is called PowerShell. Get familiar with your command line terminal before attempting to use ZPE.

First of all navigate (using the cd command) to the directory in which you have put the zpe.jar file. If you have chosen to install ZPE using the installer for macOS/Linux you can skip this step. If you wish to have ZPE accessible at all times on Windows, create a batch file in a folder and add that folder to the path.

Now you need to run the ZPE program. To do so, type:

Command line
java -jar zpe.jar

If you have already installed it correctly using the installer, you can simply type (you can type this anywhere on your system):

Command line
Command line
java -jar zpe.jar --install --do

This will create a run script in the user's home directory .zpe folder (e.g. /Users/username/.zpe). You then need to add this to the path (instructions for macOS, Linux, Windows) of the system.

If not, you can create a program to run ZPE with just the zpe command by running:

Hopefully we will get a spiel about what ZPE version you are using and a bunch of information about the commands accepted. This is good.

The next step is to run ZPE with a ZPE Argument Command or ZAC. A ZAC is the main way into the program, they are all specified below with their arguments that need to be provided to get them to do something.

-a : Analyse code

This mode is used to analyse code to ensure it will compile. It will tell you if your code from a file is actually valid.

zpe -a $filename
-b : Byte codes

Prints a byte code tokenisation of the program.

zpe -b $filename
-c : Compile mode

Compile mode. Compiles the code to a file for distribution. The -library parameter allows the compiler to compile the program as a library which will force the compiler to remove any main functions from the program. The -f optional parameter is used to specify a folder containing other files to include in compilation. Finally, the optional -k parameter specifies an encryption key to encrypt the code with.

zpe -c $file_to_compile [-o $output_file] [-library $library] [-f $files_to_include] [-k encryption_key] [-optimise $optimise]
-d : Debug mode

Debug mode watches a variable and outputs it each time it changes.

zpe -d $file_to_debug_path -f $function_name -v $variable_name
-e : Export mode

Exports code to another language (transpiles). (experimental/alpha). There already exists a small YASS to Python transpiler.

zpe -e $filename -o $file_out -n $class_name -t $language_type
-g : GUI mode

GUI mode. This mode features a basic GUI for editing and running code.

zpe -g
-h : Help mode

Shows the available help commands and provides access to them. There are four options for $mode as follows: -h info which retrieves the information about the ZPE program; -h doc -f $filename [-s $function_name ] which will read any internal documentation within a compiled application; the -h commands which lists all commands within ZPE when loaded. The -h config will list configuration settings for the current installation.

zpe -h $mode [arguments]
-i : Interactive mode

Interactive mode. Interactive interpreter for commands from the command line. Real time interactive shell mode. This is perhaps the most useful way to learn the syntax and workings of ZPE and YASS as it will allows you to see immediate results.

zpe -i [$code_string] [-level $permission_level]
-j : JSON mode

JSON communication mode. Executes a command or script formatted in JSON. This mode requires the JSON file specified to contain a ZPE file at the end of it within a file property, a parameters property that contains all parameters, and an optional output property to specify where to write the results. This is, in essence, how cross-language communication is performed in ZPE.

zpe -j $filename
-n : Network mode

Network remote server. Opens a ZPEServer or a ZPEClient. The $port specified is the local or server port to open or connect to. The $host should be an IP address. By giving it a host parameter, the ZPE system knows that this instance is a client rather than a server.

The $permission_level argument can only be provided to a server and has no effect on the client.

zpe -n $port [-h $host] [-level $permission_level]
-p : Properties mode

Allows viewing and editing of ZPE properties.

Using the -k and -v arguements will allow you to set a property from the CLI.

zpe -p [-k property_name -v property_value]
-q : Quickfire mode

A GUI single instance that reads in code, runs it and displays the output. This can be used to evaluate mathematical expressions right from the input.

zpe -q
-r : Runtime mode.

Runtime mode. Compiles and runs code using the compiler and runtime.

zpe -r $file_path [-level $permission_level] [-args arguments]
-s : String view

String mode. Prints a string tokenisation of the program. The $clean_up argument changes the code to a clean string representation of the code.

zpe -s $file_path [-c $clean_up]
-t : Tree view

Tree mode. Prints the code tree of the code from a file.

zpe -t $file_path
-w : Web parser

Executes a HTML page with ZPE code.

zpe -w $file_path
$file_path : Run ZPE program

Runs a compiled ZPE application at a specified file path. This mode can also be used to run a non-compiled program similar to the -r mode, but does not support arguments with these programs. The --info feature was added in ZPE 1.12.4 and is used to get information about a compiled application.

zpe $file_path [arguments][--info][-level $level][-k $passcode]

Configure mode. Reinstall the default ZPE settings files

zpe --configure

Manual mode. Searches out internal documentation for an internal function, much like the Unix man pages.

zpe --man $entry_name

Install mode. Provides instructions and installs ZPE to the .zpe folder.

zpe --install --do

Update mode. Basic updater mode that will check for an update to ZPE. Add the -f argument to force the update to happen (i.e. download the very latest version).

zpe --update zpe --update -f true
--version : Version number

Version number. Prints the current version number to the console.

Older versions than 1.10.7 used the -v ZAC to perform the same task.

zpe --version [--json] [--verbose]
--zule : ZULE repository access

ZULE mode. The ZULE or ZPE Uploaded Library Extensions repository is a collection of a libraries and extensions that have been added by users. All libraries are first assessed to ensure stability, performance and integrity.

zpe --zule list
zpe --zule install $file [-d $zpe_directory]
Feedback 👍
Comments are sent via email to me.