Installation
Requirements
legionhjyu runs on Python 3.10 or later. If you don't have it:
python3 --versionIf that prints 3.10 or higher, you're set.
Install from source
Clone the repo and run the installer:
git clone https://github.com/legionhjyu/legionhjyu.git
cd legionhjyu
python3 install.pyThe installer copies the stdlib to ~/.legion/stdlib/, writes a launcher at ~/.local/bin/legion, and creates ~/.legion/meta.json with version info.
After that, add ~/.local/bin to your PATH if it isn't already:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcThen check it works:
legion versionYou should see:
legionhjyu 1.0.0
Python 3.x.xInstall via the pre-built executable
If you don't want to deal with Python, grab the standalone binary from the Download page. These are self-contained executables with Python bundled inside — no dependencies required.
| Platform | File |
|---|---|
| Linux (x64) | legion-linux-x64 |
| macOS (x64) | legion-macos-x64 |
| Windows | legion-windows.exe |
Download the right binary for your platform, make it executable (Linux/macOS), and put it somewhere on your PATH:
## Linux / macOS
chmod +x legion-linux-x64
mv legion-linux-x64 ~/.local/bin/legionOn Windows, rename the .exe to legion.exe and move it to a directory in your system PATH.
Verify the install
Write a test file:
## test.lhj
echo "legion works!"Run it:
legion run test.lhjOutput:
legion works!Directory layout
After installation, legionhjyu creates:
~/.legion/
stdlib/ -- built-in .lhj modules (io, collections, random, json_mod)
packages/ -- installed packages (legion pkg install puts them here)
meta.json -- version and install infoUpdating
Pull the latest source and re-run the installer:
cd legionhjyu
git pull
python3 install.pyOr download the latest binary from the Download page.
Uninstalling
rm ~/.local/bin/legion
rm -rf ~/.legionThat removes the CLI and all installed packages.