Using the CLI
The CLI is where all the eryx functionality is. With it you can run programs, start the REPL, start the web IDE, run the all of the current version's tests, transpile code into Python and manage packages.
eryx [--version]
Available commands:
repl Start the REPL
run Run an Eryx file
server Start the web IDE
test Run the test suite
transpile Transpile Eryx code
package Manage Eryx packages
Check the current installed version
To run a check what version of Eryx you have installed, simply use:
Running a program
To run a program use:
Debug arguments:
- --tokenize: Print the tokenized code
- --ast: Print the AST (Abstract Syntax Tree)
- --result: Print the result of the code evaluation
Starting the repl
To start the Eryx REPL (Read-Eval-Print-Loop) use:
This will start an interactive shell that you can use to run Eryx code:
To exit the REPL use either CTRL + C
or the command exit()
.
Debug arguments:
- --tokenize: Print the tokenized code
- --ast: Print the AST
- --result: Print the result of the code evaluation
Starting the web IDE
The web IDE can be used to run programs or use the REPL directly from your browser. To start it use:
(--no-file-io disables file read/write/append and file importing) Default ip is 0.0.0.0
(all available network interfaces) and the default port is 80
.
Running the tests
Eryx uses pytest for handling and running tests to make sure the language is working as expected. To run said tests use:
Transpiling into Python
To transpile Eryx code Into python code, use the following command:
This will transpile your .eryx
file into .py
.
Transpiling code
The code transpiler is currently in beta and may not work sometimes. (please report any bugs here)
Using the package manager
The package manager is built into the Eryx CLI, using the subcommand package
:
eryx package <subcommand>
Available 'package' commands:
install Install a package
uninstall Uninstall a package
list List all installed packages
upload Upload a package
delete Delete a package
install
Install a package:
- --upgrade: Upgrades a package if it is already installed (or just install if not present)
- --server: Change the package repository URL
uninstall
Uninstall a package:
list
List all installed packages:
upload
Upload a package to a package repository:
- --server: Change the package repository URL
delete
Delete a package from a package repository:
- --server: Change the package repository URL
Default package repo
The default package repository is https://eryx-packages.shymike.tech.