Usage
ant without any arguments.
Features
- Interactive Evaluation: Execute JavaScript expressions and see results immediately
- History Support: Navigate previous commands with arrow keys
- Multiline Input: Automatic detection of incomplete expressions
- Command History: Persistent history saved to
~/.ant/repl_history - Color Output: Syntax-highlighted results
- Auto-completion: Context-aware completions
REPL Commands
Special dot commands are available in the REPL:Show help message with available commands.
Exit the REPL.
Load JavaScript from a file into the REPL session.
Save all evaluated commands in this REPL session to a file.
Show memory statistics.
Examples
Basic Usage
Multiline Input
Using REPL Commands
Keyboard Shortcuts
- Ctrl+C: Abort current expression (press twice to exit)
- Ctrl+D: Exit the REPL
- Up/Down Arrow: Navigate command history
- Enter: Execute current line or continue multiline
Lexical Declarations
The REPL trackslet, const, and class declarations to prevent redeclaration errors:
Related
- ant file - Run JavaScript files