envsnap is a small command-line utility for generating snapshots of a development
or runtime environment to aid in debugging and issue reporting.
It works by having projects define a .envsnap file, which defines various
data points that the project finds relevant. This ranges from OS/Arch to package dependencies.
envsnap generates a snapshot of the specified data points, making it easy for the user
to provide context for their environment when debugging or reporting an issue.
With envsnap, the you no longer has to worry about which data points are relevant when
reporting an issue. Let the project define it, and let envsnap collect it.
From package manager:
# macOS
brew install edaniszewski/homebrew-tap/envsnapThe binary may also be installed from the project's releases page.
You can also use go get:
go get github.com/edaniszewski/envsnapenvsnap is a simple tool with only two commands:
envsnap init- initializes a new.envsnapconfigenvsnap render- render your environment based on the.envsnapconfig
For additional details and usage info, see the help info with envsnap --help.
$ envsnap render
#### Environment
**System**
- _os_: darwin
- _arch_: x86_64
- _cpus_: 12
- _kernel_: Darwin
- _kernel version_: 19.0.0
- _processor_: i386
**Golang**
- _version_: go1.13.4
- _goroot_: /usr/local/Cellar/go/1.13.4/libexec
- _gopath_: /Users/edaniszewski/go
The envsnap configuration is kept in the YAML-formatted .envsnap file which should be placed
in the root directory of your repository. Below is a description of the different configuration
sections and the options for each.
Render information found in environment variables.
Top-level key: environment
| Option | Description |
|---|---|
variables |
A list of environment variable names whose values are rendered. |
environment:
variables:
- PATH
- KUBECONFIGRender information from executing arbitrary commands.
Top-level key: exec
| Option | Description |
|---|---|
run |
A list of commands to run, the outputs of which are collected and rendered. |
exec:
run:
- kubectl version
- docker --versionRender information about your local Golang installation.
Top-level key: go
| Option | Description |
|---|---|
core |
A list of core Golang data to render. Valid list values include: version, goroot, gopath. |
go:
core:
- version
- gopathRender information about your local Python installation.
Top-level key: python
| Option | Description |
|---|---|
core |
A list of core Python data to render. Valid list values include: version, py2, py3 |
dependencies.packages |
A list of Python packages describing a project's dependencies. The installed version for each dependency is rendered. |
python:
core:
- version
dependencies:
packages:
- aiohttp
- aiocacheRender information about your system.
Top-level key: system
| Option | Description |
|---|---|
core |
A list of core system data to render. Valid list values include: os, arch, cpus, kernel, kernel_version (or kernel-version), processor |
system:
core:
- os
- archenvsnap is released under the MIT license.