CLI-Anything Bundle #21 — Python Env Recon Pack
Four NEW agent-native CLI harnesses that answer the four "which Python environment am I actually in" questions every AI agent runs into but usually improvises: which interpreter is this, which binary am I really getting when I type a command, what is installed in this environment, and does my requirements.txt match what is actually installed. Every answer is read from on-disk truth the environment itself exposes — nothing is fetched, nothing is guessed, and version-range satisfaction is never invented.
What's inside
- pyenvpeek — interpreter self-recon, in-process: exact version and version_info, implementation (name/version/hexversion), executable with an on-disk exists check, prefix vs base_prefix with VIRTUAL_ENV both carried (the venv question answered with BOTH facts so the caller sees WHY), sysconfig scheme paths and sys.path each with on-disk exists flags (missing-but-configured paths surfaced, never hidden), interpreter flags that change agent behavior (no_site, isolated, dont_write_bytecode), and GIL truth only where the interpreter itself says it (sys._is_gil_enabled; otherwise null plus a note). Zero subprocesses — self-recon needs none.
- whichpeek — PATH resolution truth: for every command NAME, the winner (the first executable match in PATH order — the file exec would actually run) is named with its directory, and every later executable match is listed as shadowed, in PATH order, so command shadowing is visible instead of guessed. Symlinks identified via lstat with target carried verbatim; identity/size/x-bit ride the FOLLOWED file's truth; a broken symlink surfaces as what exec would hit. Shebang read from the first line only (max 256 bytes). Matched files are NEVER executed — os.access(X_OK) is a permission probe, not a run.
- pippeek — installed-distribution inventory WITHOUT pip: the live view reads importlib.metadata in-process; --path mode parses *.dist-info/METADATA and *.egg-info/PKG-INFO (including single-file .egg-info) directly in one or more site dirs. Rows carry Name/Version/location/kind/top_level.txt imports (capped, verbatim); PEP 503 normalized names make mixed-case and mixed-separator installs COLLIDE into duplicate groups — mixed installs are surfaced, never merged. Invalid dirs and companion files are counted with reasons. pip is located at most (presence reported) and NEVER run.
- reqpeek — declared-vs-installed requirements truth: per requirement row a verdict — INSTALLED / MISSING / VERSION_DIFF / SPEC_UNCOMPARED / NOT_COMPARED — with the declared spec carried verbatim and the installed version beside it when known. Only exact == pins and === arbitrary pins are compared (exact-string truth: 1.0 and 1.0.0 are NOT assumed equal); ranges, carats and PEP 440 wildcards ride verbatim as SPEC_UNCOMPARED, satisfaction never guessed. Nothing is fetched. Comments skipped (counted), inline comments stripped, -r/-c directives and -e editables NAMED rows never followed, options inert, line continuations reported unsupported rather than merged, marker clauses ride verbatim. --strict is the CI gate (exit 1 on any MISSING/VERSION_DIFF).
The pipeline that matters
pyenvpeek (which interpreter is this) → whichpeek (which python/pip binary am I really getting) → pippeek (what is installed in it) → reqpeek (does requirements.txt match the installed truth). Four read-only stages; the environment's truth stays honest end to end.
Install — one step per skill
Unzip the pack and copy each skill folder (the one containing its SKILL.md) into your agent's skills directory, e.g. cp -r pippeek pyenvpeek reqpeek whichpeek ~/.openclaw/skills/. Works with OpenClaw, Claude Code, Codex, or any Agent-Skills-convention runtime. Every skill also runs as a plain CLI (no agent needed) with --json output. Apache 2.0, source included, Python 3.8+, standard library only.
Verify before you trust
Every skill ships a self-test battery that live-fires the real CLI on the running host:
python3 runner_count.py pippeek/agent-harness/cli_anything/pippeek/tests/test_core.py
python3 runner_count.py pyenvpeek/agent-harness/cli_anything/pyenvpeek/tests/test_core.py
python3 runner_count.py reqpeek/agent-harness/cli_anything/reqpeek/tests/test_core.py
python3 runner_count.py whichpeek/agent-harness/cli_anything/whichpeek/tests/test_core.py
Verified 2026-10-22 on the build host: 96 + 126 + 654 + 96 = 972 checks, 0 failed, fired twice (check counts adapt to your host's environment state; 0 failed is the contract). Real defects found by the batteries were repaired in staging before the clean fires — the shipped files are the fired files.
Safety contract
Reads only the on-disk surfaces each skill documents (see each SKILL.md), computes with the stdlib, writes nothing, opens no sockets, sends no signals. Deliberate hard lines: pippeek never runs pip (it is located at most); reqpeek never follows -r/-c directives or fetches anything; whichpeek never executes a matched file; pyenvpeek spawns nothing at all. Unusable surfaces report honestly (exit 2); impossible requests are named refusals (exit 1), never stack traces.
Support: [email protected] — subject "BUNDLE21 PYENV" plus your question. Include your order number.
Built on SoulTech AI. All Is One. One Is All.