{"id":30023764,"url":"https://github.com/scriptogre/op-dotenv","last_synced_at":"2025-08-06T05:43:36.297Z","repository":{"id":306917754,"uuid":"1027567411","full_name":"scriptogre/op-dotenv","owner":"scriptogre","description":"Convert .env files to 1Password items and vice versa","archived":false,"fork":false,"pushed_at":"2025-07-28T12:40:50.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-28T13:05:53.499Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/scriptogre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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,"zenodo":null}},"created_at":"2025-07-28T07:53:03.000Z","updated_at":"2025-07-28T12:07:12.000Z","dependencies_parsed_at":"2025-07-28T13:18:09.906Z","dependency_job_id":null,"html_url":"https://github.com/scriptogre/op-dotenv","commit_stats":null,"previous_names":["scriptogre/op-dotenv"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/scriptogre/op-dotenv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptogre%2Fop-dotenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptogre%2Fop-dotenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptogre%2Fop-dotenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptogre%2Fop-dotenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scriptogre","download_url":"https://codeload.github.com/scriptogre/op-dotenv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptogre%2Fop-dotenv/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269027596,"owners_count":24347259,"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","status":"online","status_checked_at":"2025-08-06T02:00:09.910Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-08-06T05:43:35.440Z","updated_at":"2025-08-06T05:43:36.284Z","avatar_url":"https://github.com/scriptogre.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# op-dotenv\n\n[![Release](https://img.shields.io/github/v/release/scriptogre/op-dotenv?style=for-the-badge)](https://github.com/scriptogre/op-dotenv/releases)\n[![Go Version](https://img.shields.io/github/go-mod/go-version/scriptogre/op-dotenv?style=for-the-badge\u0026logo=go)](https://golang.org/)\n[![License](https://img.shields.io/badge/license-MIT-blue?style=for-the-badge)](LICENSE)\n[![Homebrew](https://img.shields.io/badge/brew%20install-scriptogre%2Fop--dotenv%2Fop--dotenv-orange?style=for-the-badge\u0026logo=homebrew)](https://github.com/scriptogre/homebrew-op-dotenv)\n\nConvert .env files to 1Password items and vice versa.\n\n![Showcase](./showcase.png)\n\n## What it does\n\n- **Push**: Convert `.env` file (in current directory) into an 1Password item\n- **Pull**: Convert 1Password item into an `.env` file\n\n**Note:** 1Password item name defaults to current directory name.\n\n## Installation\n\n```bash\nbrew install scriptogre/op-dotenv/op-dotenv\n```\n\n## Requirements\n\n- [1Password CLI](https://developer.1password.com/docs/cli/get-started/) installed and authenticated\n\n## Usage\n\n```bash\n# Convert .env to 1Password item\nop-dotenv push\n\n# Convert 1Password item to .env\nop-dotenv pull\n\n# Specify custom file\nop-dotenv push .env.production\n\n# Override vault \u0026 item name\nop-dotenv push --vault MyVault --item MyProject\n\n# Force overwrite without confirmation\nop-dotenv push --force\n\n# View current configuration\nop-dotenv config\n\n# Clean up configuration data\nop-dotenv clean\n```\n\n## Format specification\n\n### .env file format\n\n```bash\n# --------------------------------------------\n# This was auto-generated by op-dotenv\n# --------------------------------------------\n\nDATABASE_URL=postgres://localhost:5432/myapp\nAPI_KEY=secret123\n\n# Redis Configuration\nREDIS_HOST=localhost\nREDIS_PORT=6379\n\n# Email Settings\nSMTP_HOST=smtp.gmail.com\nSMTP_PORT=587\nSMTP_USER=user@example.com\n```\n\n### Becomes this 1Password item\n\n![1Password Item Example](./1password-example.png)\n\nAnd vice-versa.\n\n### Rules\n\n1. Top-level comment surrounded by 44 dashes becomes the item note\n2. Variables at the top (before any `# Section Name` comment) are saved in 1Password without a section.\n3. Variables after a `# [label]` line in `.env` are saved in a `[label]` section in 1Password.\n4. Variables containing `PASSWORD`, `PASS`, `SECRET`, `KEY`, `TOKEN`, `AUTH`, `CREDENTIAL`, `HASH`, or `SALT` are concealed in 1Password. All other variables remain visible as text fields.\n5. Pull creates the same format as the original `.env` file\n\n## Configuration\n\nThe tool stores vault and item preferences per directory in:\n```\n~/.config/op-dotenv/config.json\n```\n\n**Example configuration output:**\n```bash\n❯ op-dotenv config\nCurrent configuration for /Users/chris/Projects/op-dotenv:\n  Vault: Environments\n  Item:  op-dotenv\n```\n\n**Clean up configuration:**\n```bash\n# Remove all stored configuration data\nop-dotenv clean\n```\n\nThis is useful when uninstalling the tool or resetting preferences.\n\n## Note\n\n1Password recently introduced [Environments (beta)](https://developer.1password.com/docs/environments/) which may eventually make this tool obsolete. However, the current beta has limitations and this tool provides a simpler workflow for basic use cases.\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscriptogre%2Fop-dotenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscriptogre%2Fop-dotenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscriptogre%2Fop-dotenv/lists"}