{"id":37130514,"url":"https://github.com/spatialcurrent/goprintenv","last_synced_at":"2026-01-14T15:01:00.662Z","repository":{"id":57705414,"uuid":"185880493","full_name":"spatialcurrent/goprintenv","owner":"spatialcurrent","description":"Super simple command line program for printing environment variables","archived":false,"fork":false,"pushed_at":"2019-10-07T02:27:59.000Z","size":17,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-21T13:06:14.237Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spatialcurrent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-09T22:32:06.000Z","updated_at":"2019-10-07T02:27:59.000Z","dependencies_parsed_at":"2022-08-29T05:30:42.194Z","dependency_job_id":null,"html_url":"https://github.com/spatialcurrent/goprintenv","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/spatialcurrent/goprintenv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatialcurrent%2Fgoprintenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatialcurrent%2Fgoprintenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatialcurrent%2Fgoprintenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatialcurrent%2Fgoprintenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spatialcurrent","download_url":"https://codeload.github.com/spatialcurrent/goprintenv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatialcurrent%2Fgoprintenv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28424038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T15:00:34.721Z","updated_at":"2026-01-14T15:01:00.469Z","avatar_url":"https://github.com/spatialcurrent.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://circleci.com/gh/spatialcurrent/goprintenv/tree/master.svg?style=svg)](https://circleci.com/gh/spatialcurrent/goprintenv/tree/master) [![Go Report Card](https://goreportcard.com/badge/spatialcurrent/goprintenv)](https://goreportcard.com/report/spatialcurrent/goprintenv)  [![GoDoc](https://godoc.org/github.com/spatialcurrent/goprintenv?status.svg)](https://godoc.org/github.com/spatialcurrent/goprintenv) [![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://github.com/spatialcurrent/goprintenv/blob/master/LICENSE)\n\n# goprintenv\n\n## Description\n\n**goprintenv** is a super simple command line program for printing environment variables, including in custom formats.  **goprintenv** supports the following operating systems and architectures.  While **goprintenv** does not intend to be a drop-in replacement to the system `printenv` command, it aims to provide a similar command line usage and an enhanced capability.\n\n## Platforms\n\nThe following platforms are supported.  Pull requests to support other platforms are welcome!\n\n| GOOS | GOARCH |\n| ---- | ------ |\n| darwin | amd64 |\n| linux | amd64 |\n| windows | amd64 |\n| linux | arm64 |\n\n## Releases\n\nFind releases at [https://github.com/spatialcurrent/goprintenv/releases](https://github.com/spatialcurrent/goprintenv/releases).  You might want to rename your binary to just `goprintenv` (or `printenv`) for convenience.  See the **Building** section below to build from scratch.\n\n**Darwin**\n\n- `goprintenv_darwin_amd64` - CLI for Darwin on amd64 (includes `macOS` and `iOS` platforms)\n\n**Linux**\n\n- `goprintenv_linux_amd64` - CLI for Linux on amd64\n- `goprintenv_linux_amd64` - CLI for Linux on arm64\n\n**Windows**\n\n- `goprintenv_windows_amd64.exe` - CLI for Windows on amd64\n\n## Usage\n\nSee the usage below or the following examples.\n\n```shell\ngoprintenv is a super simple utility to print environment variables in a custom format.\nSupports the following formats: csv, bson, go, gob, json, properties, tags, toml, tsv, yaml.\n\nUsage:\n  goprintenv [-f FORMAT] [flags] [variable]...\n\nFlags:\n  -f, --format string   output format, one of: csv, bson, go, gob, json, properties, tags, toml, tsv, yaml (default \"properties\")\n  -h, --help            help for goprintenv\n  -0, --null            use a NUL byte to end each line instead of a newline character\n  -p, --pretty          use pretty output format\n  -r, --reversed        if output is sorted, sort in reverse alphabetical order\n  -s, --sorted          sort output\n```\n\n# Examples\n\n**All Environment Variables**\n\n```shell\ngoprintenv -f json\n```\n\n**Subset of Environment Variables**\n\n`goprintenv` accepts a list of environment variables.\n\n```shell\ngoprintenv SHELL PATH\n```\n\n**Subset of Environment Variables as Pretty JSON**\n\n`goprintenv` accepts a list of environment variables and a custom format.\n\n```shell\ngoprintenv -f json -p SHELL PATH\n```\n\n## Building\n\nUse `make help` to see help information for each target.\n\n**CLI**\n\nThe `make build_cli` script is used to build executables for Linux and Windows.  Use `make install` for standard installation as a go executable.\n\n**Changing Destination**\n\nThe default destination for build artifacts is `bin`, but you can change the destination with an environment variable.  For building on a Chromebook consider saving the artifacts in `/usr/local/go/bin`, e.g., `DEST=/usr/local/go/bin make build_cli`\n\n## Testing\n\n**CLI**\n\nTo run CLI testes use `make test_cli`, which uses [shUnit2](https://github.com/kward/shunit2).  If you recive a `shunit2:FATAL Please declare TMPDIR with path on partition with exec permission.` error, you can modify the `TMPDIR` environment variable in line or with `export TMPDIR=\u003cYOUR TEMP DIRECTORY HERE\u003e`. For example:\n\n```\nTMPDIR=\"/usr/local/tmp\" make test_cli\n```\n\n**Go**\n\nTo run Go tests use `make test_go` (or `bash scripts/test.sh`), which runs unit tests, `go vet`, `go vet with shadow`, [errcheck](https://github.com/kisielk/errcheck), [ineffassign](https://github.com/gordonklaus/ineffassign), [staticcheck](https://staticcheck.io/), and [misspell](https://github.com/client9/misspell).\n\n## Contributing\n\n[Spatial Current, Inc.](https://spatialcurrent.io) is currently accepting pull requests for this repository.  We'd love to have your contributions!  Please see [Contributing.md](https://github.com/spatialcurrent/goprintenv/blob/master/CONTRIBUTING.md) for how to get started.\n\n## License\n\nThis work is distributed under the **MIT License**.  See **LICENSE** file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatialcurrent%2Fgoprintenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspatialcurrent%2Fgoprintenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatialcurrent%2Fgoprintenv/lists"}