Environment:3641397194 wq Gpt6 Astra Python 3
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Runtime |
| Last Updated | 2026-10-26 14:00 GMT |
Overview
Standalone Python 3 runtime for the ColdBrew Zero repository's standalone tool scripts — skill-leaf generation, README preview rendering, and release-download verification — which run outside the Node.js/Electron desktop app.
Description
This environment covers Python 3 scripts in the `tools/` directory that are run directly with `python3` rather than inside the Electron app. These scripts use only the Python 3 standard library (`os`, `json`, `hashlib`, `pathlib`, `urllib`, `html`, `re`) — no third-party packages are required. They generate the 80 per-leaf skill files from an authored catalog, render the project README to a styled preview HTML while validating download links against `VERSION`, and verify release installers via anonymous HTTP range requests with magic-byte checks. A Python 3.8+ interpreter is sufficient; no virtual environment is needed because the scripts are stdlib-only.
Usage
Use this environment for the standalone Python tool scripts invoked during build/release and skill-generation workflows. Run them from the repository root with `python3 tools/<script>.py`. They are not loaded by the desktop app and have no dependency on Node.js or Electron.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Windows / macOS / Linux | Cross-platform via Python 3 stdlib |
| Python | 3.8+ | Uses f-strings, `pathlib`, `urllib.request`; no third-party deps |
| Disk | < 5 MB | Scripts only; no package install |
Dependencies
System Packages
- Python 3.8+ (system or pyenv install)
Python Packages
- None — all scripts use the Python 3 standard library only
Credentials
This environment does not require external credentials. The release-download verifier makes anonymous HTTP range requests (no auth headers); relay/API tokens are managed by the Node.js RelayAdapter, not by these scripts.
Quick Install
# Ensure Python 3.8+ is available
python3 --version
# Run the standalone tools from the repository root:
python3 tools/emit_leaves.py # generate skill-leaf files
python3 tools/build_readme.py # render README preview + validate links
python3 tools/verify_release_downloads.py # verify release installers
Code Evidence
Stdlib-only skill-leaf generation from `emit_leaves.py`:
import json, hashlib, os
from pathlib import Path
with open(CATALOG, encoding="utf-8") as f:
catalog = json.load(f)
for leaf in catalog["leaves"]:
out = OUT_DIR / f"{leaf['id']}.md"
out.write_text(render(leaf), encoding="utf-8")
Anonymous HTTP range request from `verify_release_downloads.py`:
import urllib.request
req = urllib.request.Request(url, headers={"Range": "bytes=0-15"})
with urllib.request.urlopen(req, timeout=30) as r:
head = r.read(16)
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `python3: command not found` | Python 3 not installed or not on PATH | Install Python 3.8+ or use `py -3` on Windows |
| `ModuleNotFoundError: No module named 'xyz'` | Third-party package imported by mistake | These scripts are stdlib-only; ensure you are running the repo's tools, not a modified copy |
| `HTTP 416 Range Not Satisfiable` | Release URL does not support range requests | The verifier skips unsupported URLs and reports them in its summary |
Compatibility Notes
- Python 3.8+: Uses f-strings, `pathlib`, and `urllib.request`; compatible with 3.8 through 3.12+.
- No third-party deps: All scripts use the standard library only — no `pip install` needed.
- Not used by desktop app: These scripts run standalone; the Electron app does not shell out to them.
- Cross-platform: `pathlib.Path` handles OS-specific separators; `hashlib` is available on all platforms.