Installation
Install Java, the VS Code extension or the command-line generator.
Check Java
The generator runs on Java 17 or later. Open a terminal and type:
java -version
If the command is not found, or the version is lower than 17, install a recent JDK (Temurin from adoptium.net works well), then open a new terminal.
VS Code extension
This is the easiest way to start.
- Download the
.vsixfile from the Download page. - In VS Code, open the Extensions view (
Ctrl+Shift+X). - Click the
...menu at the top of the view, then Install from VSIX, and pick the file. - Open or create a file ending in
.aml. The extension starts and checks your code as you type.
The first generation can take a few seconds while Java starts.
Command-line generator
Use it in a terminal, in scripts or in a CI pipeline. Packages exist for Windows (installer, MSI, portable ZIP) and Linux (.deb, AppImage, .tar.gz). Each one comes with its install steps on the Download page.
Once installed:
algoml-generate factorial.aml .
The first argument is the AlgoML file, the second one is the folder where the generated file is written. See Command-line generator for details.
Check that it works
Create a file named hello.aml with this content, then generate it.
Algorithm Helloversion '1.0'language Cbeginwrite("Hello, world!\n")endend algorithm
Hello, world!hello.aml on GitHubTry itSoon