| name | env-snapshot |
| description | Captures tool versions, packages, and kernel info as a reproducibility record in notes/. Use when documenting the environment. |
| allowed-tools | Bash, Read, Write, Glob, Grep |
| version | 1.0.0 |
| workflow_stage | setup |
| tags | ["environment","reproducibility","documentation"] |
Document Environment Snapshot
Capture the full environment state and save it as a reproducibility record.
Steps
-
Gather system and tool versions:
uname -a
quarto --version
uv --version
python3 --version
-
Capture Python package versions:
uv pip list
-
Capture Jupyter kernel list:
uv run jupyter kernelspec list
-
If R is available, capture R session info:
R -e "sessionInfo()"
-
If Stata is available, note the version:
which stata
Read ~/.config/nbstata/nbstata.conf for stata_dir and edition.
-
If TeX Live is available:
pdflatex --version | head -1
-
Generate a timestamped Markdown file with all collected information:
# Environment Snapshot — YYYY-MM-DD
## System
- OS: ...
- Platform: ...
## Tools
| Tool | Version |
| ---- | ------- |
| Quarto | x.x.x |
| uv | x.x.x |
| Python | 3.12.x |
| R | x.x.x (or N/A) |
| Stata | SE x.x (or N/A) |
| TeX Live | xxxx (or N/A) |
## Jupyter Kernels
- python3: /path/to/kernel
- ir: /path/to/kernel (or N/A)
- nbstata: /path/to/kernel (or N/A)
## Python Packages
| Package | Version |
| ------- | ------- |
| numpy | x.x.x |
| pandas | x.x.x |
| ... | ... |
## R Session Info
(full sessionInfo() output, or "R not available")
## Stata Packages
(ado dir output, or "Stata not available")
-
Save to notes/environment-YYYYMMDD.md (using today's date).
-
Report the file path.