An interactive command interpreter with command parsing, pipelines, input/output redirection, batch execution, and a command factory.
Implemented commands include echo, wc, date, time, touch, truncate, rm, tr, head, and prompt.
Requires a C++17 compiler and CMake 3.16 or later.
cmake -S . -B build
cmake --build build --config ReleaseRun build/cli-interpreter on Unix or build/Release/cli-interpreter.exe with a Visual Studio generator on Windows. Use end-of-input (Ctrl+D on Unix; Ctrl+Z then Enter on Windows) to leave the interpreter.
echo "Hello, world"
date
time
echo "one two three" | wc -w
include/: parser, command, execution-plan, and exception interfaces.src/: command implementations, parsing, and the interpreter entry point.
This is a custom educational interpreter, not a complete operating-system shell. Commands and parsing rules follow the assignment. Input lines may contain at most 512 characters. Longer lines are rejected and consumed in full so the next command starts cleanly.
After building, run python tests/smoke.py build/Release/cli-interpreter.exe on Windows, or pass build/cli-interpreter on Unix. Python 3 is needed only for this check. The checks cover pipelines, final input without a newline, the 512-character boundary, recovery after an oversized line, and file redirection.
Educational project by Marko Mijanovic, University of Belgrade, School of Electrical Engineering. Supplied course scaffolding and assets retain their original licensing terms.
- CMake/MSVC Release build passed.
- Regression checks passed: pipelines, EOF without newline, 512-character limit and recovery, and output redirection.