Log Trainer is a local command-line learning tool that generates randomized, reproducible scripting challenges. It gives you files to investigate, grades the answer you produce, provides progressive hints, explains the solution, and tracks completed practice iterations.
The learner controls the solution. You can use Python, PowerShell, Bash, or any
other local tool capable of producing the required answer.txt file. Log
Trainer grades the result rather than enforcing one specific implementation.
- Random scenario selection without repeats until the pool is exhausted
- Explicit scenario selection
- Deterministic seeds for reproducible challenges
- Configurable access-log sizes with safe generation limits
- Single-file and multi-file challenges
- Output-based grading
- Progressive hints
- Solution walkthroughs
- Persistent iteration tracking
- Automatic workspace cleanup
- No execution of learner-written code by the trainer
- Python standard library only
Analyze a generated web access log and identify the client IP address that made the most requests.
most-common-ip
Analyze a generated access log and identify the HTTP response status code that appears most often.
most-common-status
The Hidden French Word
Investigate 30 French text files. Twenty-nine are identical, while one contains a single additional word. Use checksums and file-comparison tools to locate the outlier and identify the added word.
hidden-word
- Python 3.12 or newer
- PowerShell, Bash, or another shell for running commands
- No third-party Python dependencies
The repository currently selects Python 3.13 through .python-version, but the
application supports Python 3.12 and newer.
Clone the repository and enter its directory:
git clone <your-repository-url>
cd log_trainerRun it directly with Python:
python main.py helpCreating a virtual environment is optional because the project has no external runtime dependencies.
PowerShell:
python -m venv .venv
.\.venv\Scripts\Activate.ps1Bash:
python3 -m venv .venv
source .venv/bin/activateGenerate a scenario from the current random pool:
python main.py generateDisplay the active challenge again:
python main.py showOpen the generated challenge files under:
workspace/challenge/
Write your solution in the generated starter file if desired:
workspace/submission/solution.py
Your solution must write its final response to:
workspace/submission/answer.txt
Run your solution yourself, then grade the answer:
python workspace/submission/solution.py
python main.py gradeThe trainer does not execute solution.py; it only reads answer.txt.
python main.py help
python main.py --help
python main.py generate --helppython main.py list-scenariosThis displays each scenario's title, slug, difficulty, and description.
python main.py generateEvery registered scenario is selected once per pool cycle. When the pool is empty, it is shuffled and refilled. The final scenario of one cycle will not be immediately repeated at the beginning of the next cycle.
python main.py generate --scenario most-common-ip
python main.py generate --scenario most-common-status
python main.py generate --scenario hidden-wordExplicit selection does not consume a scenario from the random pool.
python main.py generate --scenario most-common-ip --seed 48291The same scenario and seed produce the same challenge data.
python main.py generate --scenario most-common-ip --lines 500Access-log scenarios accept between 10 and 100,000 records.
python main.py gradeThe answer is normalized by removing surrounding whitespace and then compared with the internally calculated expected result.
python main.py hintEach invocation reveals the next unused hint.
python main.py explainpython main.py wipeThis removes generated challenge files, solution.py, and answer.txt. It
preserves iteration history.
generate a randomized challenge
↓
inspect the prompt and files
↓
solve it using your preferred scripting tool
↓
write the result to answer.txt
↓
grade the result
↓
request a hint or walkthrough if needed
↓
wipe and generate another iteration
workspace/
├── challenge/
│ ├── access.log # access-log scenarios
│ ├── documents/ # multi-file scenarios
│ ├── prompt.txt
│ ├── metadata.json
│ └── .state.json
├── submission/
│ ├── solution.py
│ └── answer.txt
└── iterations.json
Generated challenge data, submissions, answer state, and personal iteration history are excluded from Git.
- Solve practical problems rather than trivia questions.
- Grade results instead of implementation style.
- Allow Python, PowerShell, Bash, and other valid approaches.
- Use deterministic randomness for reproducibility.
- Provide help progressively.
- Keep generated work disposable.
- Never execute learner code automatically on the host.
- Build operational skill through repeated variations.
Log Trainer is a working prototype for a broader local systems-learning engine. Future scenario families may cover Linux administration, users and groups, permissions, processes, services, networking, filesystems, Bash automation, Python automation, DevOps, and troubleshooting inside disposable environments.
The current release intentionally remains a small, local, file-based CLI.
This project is designed for personal local practice:
- It does not run learner-written scripts.
- It does not open network services.
- It does not require administrator privileges.
- It contains no API credentials or runtime secrets.
- Generated files are confined to the project workspace.
Do not expose the current CLI directly as a multi-user web service. A hosted version would require isolated execution environments, server-side grading state, authentication, resource limits, and stronger lifecycle controls.
No license has been selected yet. Add a license before inviting external contributors or reuse.