Skip to content

EasyLang CLI — Commands Reference

This page lists every command supported by the el CLI, including arguments, flags, modes, and examples.

All commands are based on the official CLI implementation inside el.py.


Command Overview

The base syntax is:

el [options] [file]

If no file or option is provided, the CLI launches the REPL.


Commands & Options

el <file.elang>

Runs the EasyLang file.

Example:

el test.elang

--version

Shows interpreter version and exits.

el --version

Output:

EasyLang version 0.1.x by GreenBugX(0xNA)


--about

Displays extended interpreter information.

el --about


--repl

Starts the EasyLang interactive shell.

el --repl


--tokens FILE

Prints all tokens generated by the lexer.

el --tokens myfile.elang

Output is a list of Token(type, value) pairs.


--ast FILE

Prints the AST (Abstract Syntax Tree) for the file.

el --ast program.elang

This is useful for debugging the parser or contributing to the language.


--lint FILE

Lint the file for syntax/style issues.

Currently not implemented:

Linting is not implemented yet.

The CLI accepts the command for future compatibility.


Behavior When No Flags or File Provided

Just running:

el

does:

    1. Starts REPL (el --repl)
    1. After exiting REPL, prints CLI banner info:
      === EasyLang CLI ===
      ...
      Use --help for more options.
      

Unsupported/Invalid Commands

If an invalid flag is passed:

el --unknown

Output:

usage: el [-h] [--version] [--about] [--repl] [--lint FILE] [--tokens FILE] [--ast FILE] [file]
el: error: unrecognized arguments: --unknown

This behavior comes from Python’s argparse module.


Summary Table

Command Description
el file.elang Run an EasyLang program
el --repl Start interactive shell
el --tokens FILE Print lexer tokens
el --ast FILE Show AST
el --about Show interpreter info
el --version Show version
el --lint FILE Placeholder lint command
el Start REPL

Complete Help Text

Equivalent to running:

el --help

usage: el [-h] [--version] [--about] [--repl] [--lint FILE] [--tokens FILE] [--ast FILE] [file]

EasyLang is a compact educational scripting language whose syntax reads like English.
It is optimized for clarity and teaching: you can write programs using short English phrases instead of dense punctuation.

positional arguments:
  file                  Path to .elang file to execute

options:
  -h, --help            Show this help message and exit
  --version             Show interpreter version and exit
  --about               Show full interpreter information and exit
  --repl                Start interactive EasyLang shell
  --lint FILE           Check for syntax/style issues (not implemented)
  --tokens FILE         Print tokens from file
  --ast FILE            Print AST from file