Repository navigation
Version 0.2.0
Changelog
All notable changes to this project are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.2.0] – 2025-06-01
Added
- New
.load <file>command to execute external batch files from within the REPL. - Added
.clearmeta-command to clear the terminal screen usingos.system("clear"). - Added
.reloadmeta-command to re-execute the original--fileinit file. - Added CLI option
--runto execute a single command before entering interactive mode. - Added CLI option
--fileto preload an init file (now also accessible via.reload). - Tab completion now supports meta-commands (
.help,.exit, etc.). - Comment lines (starting with
#) and empty lines are skipped in file loading. - History recall improved: commands like
!3replace their entry correctly. GenericREPLnow exposes a reusableload_file()method shared by.reload,.load, and--file.
Changed
- All file-based command executions (
--file,.reload,.load) now use a unified logic with consistent behavior and error reporting. - Errors raised by interpreter evaluation are now caught and reported per line (with file context where applicable).
- The REPL now exits gracefully on EOF and keyboard interrupts, and prints user-friendly messages.
Fixed
.reloadpreviously printed a "not implemented" message; it now functions as expected..loadused to evaluate only the last line due to indentation bug — now fixed.- Unit tests for
.metacommands were missing — now included and fully passing. test_keyboard_interruptandtest_eof_exitnow simulate real conditions correctly and avoid infinite loops.
Development
- Source code reorganized into
src/layout for modern packaging. - Makefile targets for
install,format,lint, andtest. - Switched to
pyproject.tomlfor all configuration (no longer usingsetup.cfg). - Editable installs now use
pip install -e .[dev](PEP 660 compliant). - README now documents full usage, development, and integration of custom interpreters.
[0.1.0] – 2025-05-30
Initial release of replkit.
Features
- Base
GenericREPLclass with pluggable interpreter. - Support for history file, tab completion, meta-commands, and interpreter interface.
- CLI with
--prompt,--hello,--log,--loglevel,--history.