This article describes how to install and run Z1h

Support System

Z1h language supports the following systems:

  • Windows
  • mac OS
  • Linux
  • Android
  • iOS
  • WebAssembly
  • Raspberry PI


The installation package download address:

  • After downloading the installation package of the corresponding platform
  • Unzip the zip, get the executable file and configuration example file
  • Open the terminal (such as Terminal of macOS, cmd of Windows) , And enter the decompression directory
  • Drag the executable file to the terminal, press Enter, you can see the command line help instructions

If the platform is correct, you will see the following output:

Version = vx.x.x_xxxxxx

		the file to be run
		http listen port
		configuration file
		run repl mode

Repl Mode

Enter on the command line

z1h -repl

You can enter the repl mode, enter the code will run it.

Sample code below is in order to output Z1h version number, and generates a content in this catalog is Z1h official website link of qr code picture.

>> $file.write('z1h.jpg', assert($qrcode('')))

Execute file

Now created a file in this directory, such as hello.z1h

Open the created file, enter the Z1h code content, such as

words = {};
`${encodeURI('JJ Lin')}`
.filter(e=>{(words[e]++) == 2})

After saving the file, enter the command

z1h -run hello.z1h

You can see the contents from spider

PS: there will be a special follow-up tutorial shows you how to Z1h do a spider job, here only as an example , No understanding required