{"id":16182571,"url":"https://github.com/jippi/dottie","last_synced_at":"2025-03-19T02:30:46.625Z","repository":{"id":220718262,"uuid":"752241307","full_name":"jippi/dottie","owner":"jippi","description":"Simplify working with .env files","archived":false,"fork":false,"pushed_at":"2024-10-22T22:20:10.000Z","size":889,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-23T19:54:04.766Z","etag":null,"topics":["12-factor","dot-env","dot-environment","environment-variables","golang","golang-application","golang-package"],"latest_commit_sha":null,"homepage":"https://github.com/jippi/dottie","language":"Go","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/jippi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["jippi"]}},"created_at":"2024-02-03T13:02:56.000Z","updated_at":"2024-10-22T22:20:14.000Z","dependencies_parsed_at":"2024-03-27T12:25:41.506Z","dependency_job_id":"a7041640-a853-40d4-9c61-67b51990e361","html_url":"https://github.com/jippi/dottie","commit_stats":null,"previous_names":["jippi/dottie"],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jippi%2Fdottie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jippi%2Fdottie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jippi%2Fdottie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jippi%2Fdottie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jippi","download_url":"https://codeload.github.com/jippi/dottie/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221720281,"owners_count":16869452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["12-factor","dot-env","dot-environment","environment-variables","golang","golang-application","golang-package"],"created_at":"2024-10-10T06:34:13.822Z","updated_at":"2025-03-19T02:30:46.616Z","avatar_url":"https://github.com/jippi.png","language":"Go","funding_links":["https://github.com/sponsors/jippi"],"categories":[],"sub_categories":[],"readme":"# Dottie\n\n## About\n\n`dottie` (pronounced `dotty`) is a tool for working with dot-env (`.env`) files more enjoyable and safe.\n\n* Grouping of keys into logical sections\n* Rich validation of key/value pairs via comment \"annotations\"\n* Update/sync/migrate a `.env` file from an upstream/external source for easy upgrades/migrations.\n* Create/Read/Update/Delete commands for easy programmatic manipulation of the `.env` file.\n* JSON representation of the `.env` file for templating or external consumption.\n* Enable (uncomment) and Disable (comment) KEY/VALUE pairs.\n* Colorized / pretty / dense / export output.\n* Filtering by key/prefix/groups when printing keys.\n* Literal (what you see is what you get) or interpolated (shell-like interpolation of variables) modes.\n\n## Example\n\n\u003e [!WARNING]\n\u003e Run these example commands in a directory without an existing `.env` file\n\n```shell\n# Crate a new env file\ntouch .env\n\n# Create a key/pair value\ndottie set my_key=value\n\n# Create another key (PORT) with value \"3306\"\n#  * One comment\n#  * One validation rule that the value must be a number\n#  * \"none\" quote style from the default \"double\"\ndottie set \\\n  --comment 'A port for some service' \\\n  --comment '@dottie/validate number' \\\n  --quote-style none \\\n  PORT=3306\n\n# Check validation (success)\ndottie validate\n\n# Print the file\ndottie print\n\n# Print the file (but pretty)\ndottie print --pretty\n\n# Change the \"PORT\" value to a \"test\" (a non-number).\n# NOTE: the comments are kept in the file, even if they are omitted here\ndottie set PORT=test\n\n# Test validation again (it now fails)\ndottie validate\n\n# Fix the port value\ndottie set PORT=3306\n\n# Create a new key/value pair in a group named \"database\"\n# NOTE: the group will be created on-demand if it does not exists\ndottie set \\\n  --group database \\\n  --comment 'the hostname to the database' \\\n  DB_HOST=\"db\"\n\n# Create a \"DB_PORT\" key pair in the same \"database\" group as before\n# NOTE: this value refer to the 'PORT' key we set above via interpolation\ndottie set \\\n  --group database \\\n  --comment 'the port for the database' \\\n  --comment '@dottie/validate number' \\\n  DB_PORT='${PORT}'\n\n# Print the file again\ndottie print --pretty\n\n# Disable the DB_PORT key\ndottie disable DB_PORT\n\n# Print the file again\n# NOTE: the DB_PORT key/value is now gone\ndottie print --pretty\n\n# Print the file again, but include commented disabled keys\n# NOTE: the DB_PORT key/value is printed (but still disabled)\ndottie print --pretty --with-disabled\n\n# Enable the DB_PORT key again\ndottie enable DB_PORT\n```\n\n## Install\n\n### homebrew tap\n\n```shell\nbrew install jippi/tap/dottie\n```\n\n### apt\n\n```shell\necho 'deb [trusted=yes] https://pkg.jippi.dev/apt/ * *' | sudo tee /etc/apt/sources.list.d/dottie.list\nsudo apt update\nsudo apt install dottie\n```\n\n### yum\n\n```shell\necho '[dottie]\nname=dottie\nbaseurl=https://pkg.jippi.dev/yum/\nenabled=1\ngpgcheck=0' | sudo tee /etc/yum.repos.d/dottie.repo\nsudo yum install dottie\n```\n\n### snapcraft\n\n```shell\nsudo snap install dottie\n```\n\n### scoop\n\n```shell\nscoop bucket add dottie https://github.com/jippi/scoop-bucket.git\nscoop install dottie\n```\n\n### aur\n\n```shell\nyay -S dottie-bin\n```\n\n### deb, rpm and apk packages\n\nDownload the `.deb`, `.rpm` or `.apk` packages from the [releases page](https://github.com/jippi/dottie/releases) and install them with the appropriate tools.\n\n### go install\n\n```shell\ngo install github.com/jippi/dottie@latest\n```\n\n## Verifying the artifacts\n\n### binaries\n\nAll artifacts are checksummed, and the checksum file is signed with [cosign](https://github.com/sigstore/cosign).\n\n1. Download the files you want, and the `checksums.txt`, `checksum.txt.pem` and `checksums.txt.sig` files from the [releases page](https://github.com/jippi/dottie/releases):\n2. Verify the signature:\n\n    ```shell\n    cosign verify-blob \\\n      --certificate-identity 'https://github.com/jippi/dottie/.github/workflows/release.yml@refs/tags/v1.0.0' \\\n      --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \\\n      --cert 'https://github.com/jippi/dottie/releases/download/v1.0.0/checksums.txt.pem' \\\n      --signature 'https://github.com/jippi/dottie/releases/download/v1.0.0/checksums.txt.sig' \\\n      ./checksums.txt\n    ```\n\n3. If the signature is valid, you can then verify the SHA256 sums match with the downloaded binary:\n\n    ```shell\n    sha256sum --ignore-missing -c checksums.txt\n    ```\n\n### docker images\n\nOur Docker images are signed with [cosign](https://github.com/sigstore/cosign).\n\nVerify the signatures:\n\n```shell\ncosign verify \\\n  --certificate-identity 'https://github.com/jippi/dottie/.github/workflows/release.yml@refs/tags/v1.0.0' \\\n  --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \\\n  jippi/dottie\n```\n\n\u003e [!NOTE]\n\u003e The `.pem` and `.sig` files are the image `name:tag`, replacing `/` and `:` with `-`.\n\n## Development Setup\n\nTo compile the module yourself, you can setup this repository for development.\n\nYou will need:\n\n- [Git](https://git-scm.com/)\n- [Go](https://go.dev/doc/install)\n\n1. Clone the repository:\n\n  ```sh\n  git clone https://github.com/jippi/dottie.git\n  cd dottie\n  ```\n\n2. Build the module:\n\n  ```sh\n  go build\n  ```\n\n3. Build the docker container:\n\n  ```sh\n  docker build --file Dockerfile.release --tag ghcr.io/jippi/dottie:v0.15.1 .\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjippi%2Fdottie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjippi%2Fdottie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjippi%2Fdottie/lists"}