How m4444sa/cliproject works
CLIProject is a C++ command-line interpreter. A user enters a line through the console reader; the interpreter tokenizes and parses it, builds a registered command or pipeline, resolves input and output, then executes it. The command registry documents file operations, stream filters, utilities, batch execution, and history. The graph includes those documented command branches; unsampled command implementations are represented by their exact tree paths, and their internal wiring is not inferred.
Main entry points: CommandMap.cpp Command registry · Pipeline.cpp Pipeline executor · Interpreter.cpp Interpreter · Parser.cpp Parser
Components 29
Interactive session
- Program entry
main.cpp - Interpreter
Interpreter.cpp - Console reader
Reader.cpp - Command history
History.cpp
Parsing and dispatch
- Parser
Parser.cpp - Command registry
CommandMap.cpp
Execution and I/O
- Pipeline executor
Pipeline.cpp - Redirection setup
RedirectionSetup.cpp
Command capabilities
- Stream filters
CommandMap.cpp - Echo
Echo.cpp - Word count
Wc.cpp - Text translate
Tr.cpp - Head
Head.cpp - Tail
TailCommand.cpp - Grep
GrepCommand.cpp - Sort
SortCommand.cpp - Filter
Filter.cpp - Frequency
Freq.cpp - Tee
Tee.cpp - Text transforms
CommandMap.cpp - Date and time
Date.cpp - Elapsed time
Time.cpp - File commands
CommandMap.cpp - Batch execution
Batch.cpp - Prompt control
Prompt.cpp - History command
History.cpp
Other components
- CLI user
- Console streams
- Command output
Connections 39
- CLI user → Console reader: enters commands
- Program entry → Interpreter: starts
- Interpreter → Console reader: reads lines
- Interpreter → Parser: tokenizes
- Interpreter → Pipeline executor: builds pipelines
- Interpreter → Command registry: creates commands
- Parser → Interpreter: parsed tokens
- Pipeline executor → Parser: parses stages
- Pipeline executor → Command registry: creates stages
- Interpreter → Redirection setup: sets redirections
- Pipeline executor → Redirection setup: sets redirections
- Interpreter → Console streams: reads and writes
- Interpreter → Command history: records commands
- Command registry → Stream filters: dispatches filters
- Command registry → Echo: dispatches
- Command registry → Word count: dispatches
- Command registry → Text translate: dispatches
- Command registry → Head: dispatches
- Command registry → Tail: dispatches
- Command registry → Grep: dispatches
- Command registry → Sort: dispatches
- Command registry → Filter: dispatches
- Command registry → Frequency: dispatches
- Command registry → Tee: dispatches
- Command registry → Text transforms: dispatches transforms
- Command registry → Date and time: dispatches
- Command registry → Elapsed time: dispatches
- Command registry → File commands: dispatches file tools
- Command registry → Batch execution: dispatches
- Command registry → Prompt control: dispatches
- Command registry → History command: dispatches
- Pipeline executor → Stream filters: executes stages
- Pipeline executor → Echo: executes stages
- Pipeline executor → Word count: executes stages
- Pipeline executor → Text translate: executes stages
- Pipeline executor → Head: executes stages
- Pipeline executor → Command output: writes results
- Interpreter → Command output: writes results
- History command → Command history: reads history