Package: diffenv
diffenvOverviewdiffenv gathers and compares development environments. It defines
a simple standard for storing a complete picture of an environment
as a structured collection of facets such as "python", "shell",
"git", etc.Output your current environment#$ diffenvpython:python-version:Python 3.7.3shell:envvars:EDITOR:sublwGIT_EDITOR:subl -wPRISMA_ENDPOINT:http://prisma:4466GOOGLE_API_KEY(HASHED):603ade004ce4bb13c3f66bc1644164ca(HASH)os:timezone:0200version:Darwin 18.7.0 x86_64# ...trimmed(Simplified example. Seefull examplehere)You can also get just specific facets:# Get all python-relevant informationdiffenv--facetpython# List environment variablesdiffenv-fshell:envvarsShare your environment with co-worker#$ diffenv --share

Your env was uploaded to: https://transfer.sh/P1gQZ/env.yaml

Run the following line on comparison environment:

diffenv --compare https://transfer.sh/P1gQZ/env.yamlDiff your environment with co-worker#$ diffenv --compare https://transfer.sh/P1gQZ/env.yaml
git:git-user-name:-    <<-: Stan James+    +>>: Gabriel Pickardversion:-    <<-: git version 2.22.0+    +>>: git version 2.11.0os:version:-    <<-: Darwin 18.7.0 x86_64+    +>>: Linux 4.19.34-04457-g5b63d4390e96 x86_64python:python-version:-    <<-: Python 3.7.3+    +>>: Python 2.7.13python3-version:-    <<-: Python 3.7.3+    +>>: Python 3.5.3which-python:-    <<-: /usr/local/opt/python/libexec/bin/python+    +>>: /usr/bin/python# ...trimmedInclude environment in submitted issuesIf you are an open-source project maintainer you can use diffenv to structure the submission of bug reports. Tell your users to specify the conditions under which their bug occurs by sending along their diffenv output. This way you can get significantly more detailed insight from the get-go without having to go back and forth with the reporter of the bug.For github issues we provide a handy way to submit a new issue and include a local diffenv dump directly from the command line.#$ diffenv --issue# Browser will open a Github issue with env data automatically added:Compare with past commits#$ diffenv --compare .diffenv/commits/2b19c9e47af0828c8775ee231768631e0b06ae0f.diffenv
git:version:-    <<-: git version 2.11.0+    +>>: git version 2.22.0python:python-version:-    <<-: Python 3.7+    +>>: Python 3.7.3Note this requires the git commit hooks to have been installed, so that diffenv is run on each commit.#$ diffenv --add-hooksInstallationpython3-mpipinstalldiffenvCurrently diffenv only supports Python 3.UseTo output your current development environment to stderr:diffenvTo compare your environment with @werg:diffenv-chttps://raw.githubusercontent.com/error-central/diffenv/master/examples/gabe_env.yamlTo share your environment with a coworker for comparison:diffenv--shareFor a complete list of command line options run:$diffenv--help

usage:diffenv[-h][-oOUTPUT][-cCOMPARE][--add-hooks][--share][--issue][--postPOST][--configCONFIG][--ignore-config][--no-color][--no-paging][--version][-fFACET]Diffyourtotalenvironment.Runwithoutanyparamstosimplyoutputcurrent
environmentstateasYAML.

optionalarguments:-h,--helpshowthishelpmessageandexit-oOUTPUT,--outputOUTPUToutputtofileinsteadofstdout-cCOMPARE,--compareCOMPAREfileorURLtocompareagainstthecurrentenv--add-hooksinstallgithooksincurrentrepoandexit--sharestorecurrentenvandreturnURLthatcanbeshared--issuecreategithubissue--postPOSTPOSTenvtospecificURLwhensharing;mustbeusedwith--share--configCONFIGloadconfigfromspecificfile--ignore-configignoreconfigsandrunallfacets--no-colordon't color diff output--no-paging           don'tuselessforpagingoutput--versiondisplayversionandexit-fFACET,--facetFACETrunaspecificfacet

Moreinformationandsourcecodeathttps://github.com/error-central/diffenvCustomizationdiffenv can be customized for a user or for a repo.  Customizations are put in a directory named.diffenvin the user's home directory or the git repos top directory.Custom FacetsCustom facets for a git repo should be saved in.diffenv/facets/<yourfacet>The facet file itself needs to be excutable (chmod +x <yourfacet>).ConfigurationYou can limit which facets are run with a yaml file saved in.diffenv/config.yamlHere's an example config:# Currently there is only one relevant part of the config, facets.facets:# If you give the name of a directory, it will run all facets in it.# In this case, we'll run every facet within `python`.python:# ...or you can list all the way down to the facet within a directory.# Here we'll only run the `node-version` facet.nodejs:node-version:git:os:shell:# You can also provide command line arguments as list to the facet.# In this case we pass the `shell` facet a whitelist of environment# variables to show.envvars:-DISPLAY-USER-PATH-PWD-HOME-SHELL-COLORTERM-TERMdirectory:# In this case we restrict how deep we recur into child directorieslisting:1Contributing to diffenvDevelopment installIf you are developing locally, donotinstall as above, and instead run the following in the repo root directory:# Remove global installation of diffenv, if presentpip3uninstalldiffenv# depending on your setup you may have to prefix sudo to this commandpip3install--editable.Nowdiffenvwill always point to your local repo, including any changes.Testingpython3-munittesttests/tests.pyFor testing on docker containers:dockerpullpython
dockerrun-itpythonbash# Now e.g. `pip install diffenv`Creating a releaseFirst editsetup.pyand bump the version, then:python3setup.pysdist# modify the below to match the file of the version you just createdtwineuploaddist/diffenv-