{"_id":"1password-dot-env-sync","_rev":"6-d10212d8038eea3c6c859fe67581a076","name":"1password-dot-env-sync","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.1":{"name":"1password-dot-env-sync","version":"1.0.1","keywords":["1password","env","sync","secrets","dotenv",".env","onepassword","one password","1 password","1password dot env sync","1password .env sync"],"author":{"name":"Tomislav Balabanov"},"license":"MIT","_id":"1password-dot-env-sync@1.0.1","maintainers":[{"name":"tomasbal","email":"tomislav@tomislavbalabanov.me"}],"bin":{"1password-env-sync":"dist/cli.js"},"dist":{"shasum":"5963d3694415f7f9062fdcde67db7beb634c5f5c","tarball":"https://registry.npmjs.org/1password-dot-env-sync/-/1password-dot-env-sync-1.0.1.tgz","fileCount":25,"integrity":"sha512-kDbhXWl9G7rL2gzZ2Xg/VK0o9MxwPSGmMhNqTKT6UA7VzjbzgHPBT8UhqwcW0Se+yleAi0oMJJjljYZzwgEliQ==","signatures":[{"sig":"MEQCIBq1K2J6zWxph0bU0o32fSTHol0R/0e6L9AEV8c4GMbnAiB+rYkd/cFN8IqLAriFfyL2QK/mw5Ta4V9UajfzDbBS6g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":79887},"main":"src/index.ts","engines":{"node":">=20.0.0"},"gitHead":"2a6844f579cfd6dd7112c3f65516a353faf5d5f8","scripts":{"ci":"tsc && pnpm run build","lint":"tsc","build":"tsc","start":"node dist/cli.js","watch":"tsc -w","prepare":"npm run build","release":"pnpm run ci && changeset publish"},"_npmUser":{"name":"tomasbal","email":"tomislav@tomislavbalabanov.me"},"_npmVersion":"10.8.2","description":"Sync secrets between .env and 1Password vault","directories":{},"_nodeVersion":"20.13.1","dependencies":{"diff":"^5.2.0","kleur":"^4.1.5","dotenv":"^16.4.5","js-yaml":"^4.1.0","commander":"^12.1.0","@1password/sdk":"^0.1.1","@inquirer/prompts":"^5.3.8"},"engineStrict":true,"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","typescript":"^5.5.4","@types/diff":"^5.2.1","@types/node":"^22.2.0","@types/js-yaml":"^4.0.9","@changesets/cli":"^2.27.7"},"_npmOperationalInternal":{"tmp":"tmp/1password-dot-env-sync_1.0.1_1723498930186_0.760256519701769","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"1password-dot-env-sync","version":"2.0.1","keywords":["1password","env","sync","secrets","dotenv",".env","onepassword","one password","1 password","1password dot env sync","1password .env sync"],"author":{"name":"Tomislav Balabanov"},"license":"MIT","_id":"1password-dot-env-sync@2.0.1","maintainers":[{"name":"tomasbal","email":"tomislav@tomislavbalabanov.me"}],"bin":{"1password-env-sync":"dist/cli.js"},"dist":{"shasum":"00f80a81bd326cc233ec70a5f5122a57656cd6f3","tarball":"https://registry.npmjs.org/1password-dot-env-sync/-/1password-dot-env-sync-2.0.1.tgz","fileCount":25,"integrity":"sha512-W+S6zBJ0cBuuzhrAFASsZcXKS8Ma2sGGorWeaDdCrQUJbP09ouPLlSGo1LyZSIFijNCjpXsQ5AYgaqeUCR1MhA==","signatures":[{"sig":"MEUCIFBTPv2a7xfDmtzhRw1LQAnG8wenAgdmwuKxBTGeU8g/AiEA611Ap+nqHWk1mFvLfUWIZG3Kgf58q0gIHqDNrcDStH4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":79887},"main":"src/index.ts","engines":{"node":">=20.0.0"},"gitHead":"2a6844f579cfd6dd7112c3f65516a353faf5d5f8","scripts":{"ci":"tsc && pnpm run build","lint":"tsc","build":"tsc","start":"node dist/cli.js","watch":"tsc -w","prepare":"npm run build","release":"pnpm run ci && changeset publish"},"_npmUser":{"name":"tomasbal","email":"tomislav@tomislavbalabanov.me"},"_npmVersion":"10.8.2","description":"Sync secrets between .env and 1Password vault","directories":{},"_nodeVersion":"20.13.1","dependencies":{"diff":"^5.2.0","kleur":"^4.1.5","dotenv":"^16.4.5","js-yaml":"^4.1.0","commander":"^12.1.0","@1password/sdk":"^0.1.1","@inquirer/prompts":"^5.3.8"},"engineStrict":true,"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","typescript":"^5.5.4","@types/diff":"^5.2.1","@types/node":"^22.2.0","@types/js-yaml":"^4.0.9","@changesets/cli":"^2.27.7"},"_npmOperationalInternal":{"tmp":"tmp/1password-dot-env-sync_2.0.1_1723499009216_0.585484177198268","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"1password-dot-env-sync","version":"1.0.2","keywords":["1password","env","sync","secrets","dotenv",".env","onepassword","one password","1 password","1password dot env sync","1password .env sync"],"author":{"name":"Tomislav Balabanov"},"license":"MIT","_id":"1password-dot-env-sync@1.0.2","maintainers":[{"name":"tomasbal","email":"tomislav@tomislavbalabanov.me"}],"bin":{"1password-env-sync":"dist/cli.js"},"dist":{"shasum":"576a2bdf7aaa92702090a4e407142f2782c27b62","tarball":"https://registry.npmjs.org/1password-dot-env-sync/-/1password-dot-env-sync-1.0.2.tgz","fileCount":25,"integrity":"sha512-NzaN8DlJQ13f47XdYmStGq/Z8lIeA2vMYwJwmicrBog8Hy+uSvT0mN7CkjMiFpwse8B9yqVgpZlI2u/zbJXUlw==","signatures":[{"sig":"MEUCIQDlp0Oo1zh8wydYFQQ3eENHwtIuI8sDox2eIUGTmZ2XzAIgHdkbzm6M/4jiBKX6zCeWduYs7KvVavOPoli333Pl5u4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":79847},"main":"src/index.ts","engines":{"node":">=20.0.0"},"gitHead":"2a6844f579cfd6dd7112c3f65516a353faf5d5f8","scripts":{"ci":"tsc && pnpm run build","lint":"tsc","build":"tsc","start":"node dist/cli.js","watch":"tsc -w","prepare":"npm run build","release":"pnpm run ci && changeset publish"},"_npmUser":{"name":"tomasbal","email":"tomislav@tomislavbalabanov.me"},"_npmVersion":"10.8.2","description":"Sync secrets between .env and 1Password vault","directories":{},"_nodeVersion":"20.13.1","dependencies":{"diff":"^5.2.0","kleur":"^4.1.5","dotenv":"^16.4.5","js-yaml":"^4.1.0","commander":"^12.1.0","@1password/sdk":"^0.1.1","@inquirer/prompts":"^5.3.8"},"engineStrict":true,"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","typescript":"^5.5.4","@types/diff":"^5.2.1","@types/node":"^22.2.0","@types/js-yaml":"^4.0.9","@changesets/cli":"^2.27.7"},"_npmOperationalInternal":{"tmp":"tmp/1password-dot-env-sync_1.0.2_1723502685168_0.5697303544197212","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"1password-dot-env-sync","version":"1.0.4","keywords":["1password","env","sync","secrets","dotenv",".env","onepassword","one password","1 password","1password dot env sync","1password .env sync"],"author":{"name":"Tomislav Balabanov"},"license":"MIT","_id":"1password-dot-env-sync@1.0.4","maintainers":[{"name":"tomasbal","email":"tomislav@tomislavbalabanov.me"}],"homepage":"https://github.com/tomasbal/1password-dot-env-sync#readme","bugs":{"url":"https://github.com/tomasbal/1password-dot-env-sync/issues"},"bin":{"1password-env-sync":"dist/cli.js"},"dist":{"shasum":"cd3f16e859a19ef30d3786d22d98c1ba630054be","tarball":"https://registry.npmjs.org/1password-dot-env-sync/-/1password-dot-env-sync-1.0.4.tgz","fileCount":25,"integrity":"sha512-wEwNlHZJUVMP/qyZRB5xf3iUiqw3+xWnWjpamo8g7VFdBXK8vcITFtYdA8V3us1HXWO3ewJBlQAOXuCQ38S/OQ==","signatures":[{"sig":"MEUCIF6Fff+QFIL/QPlscJap1t/r4MF7FVY20wxXFg5z8++cAiEAwk4Ybbl+5fzNB1iwGgnVNOpyMA90l9/c9+Nf8MEbLi0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":79979},"main":"src/index.ts","_from":"file:1password-dot-env-sync-1.0.4.tgz","engines":{"node":">=20.0.0"},"scripts":{"ci":"tsc && pnpm run build","lint":"tsc","build":"tsc","start":"node dist/cli.js","watch":"tsc -w","release":"pnpm run ci && changeset publish"},"_npmUser":{"name":"tomasbal","email":"tomislav@tomislavbalabanov.me"},"_resolved":"/tmp/c6f91983616f3c08183ca65734ca0930/1password-dot-env-sync-1.0.4.tgz","_integrity":"sha512-wEwNlHZJUVMP/qyZRB5xf3iUiqw3+xWnWjpamo8g7VFdBXK8vcITFtYdA8V3us1HXWO3ewJBlQAOXuCQ38S/OQ==","repository":{"url":"git+https://github.com/tomasbal/1password-dot-env-sync.git","type":"git"},"_npmVersion":"10.8.2","description":"Sync secrets between .env and 1Password vault","directories":{},"_nodeVersion":"22.6.0","dependencies":{"diff":"^5.2.0","kleur":"^4.1.5","dotenv":"^16.4.5","js-yaml":"^4.1.0","commander":"^12.1.0","@1password/sdk":"^0.1.1","@inquirer/prompts":"^5.3.8"},"engineStrict":true,"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","typescript":"^5.5.4","@types/diff":"^5.2.1","@types/node":"^22.2.0","@types/js-yaml":"^4.0.9","@changesets/cli":"^2.27.7"},"_npmOperationalInternal":{"tmp":"tmp/1password-dot-env-sync_1.0.4_1723504216350_0.7983584627653872","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"1password-dot-env-sync","version":"1.0.5","description":"Sync secrets between .env and 1Password vault","main":"src/index.ts","bin":{"1password-env-sync":"dist/cli.js"},"scripts":{"build":"tsc","prepare":"npm run build","watch":"tsc -w","start":"node dist/cli.js","lint":"tsc","ci":"tsc && pnpm run build","release":"pnpm run ci && changeset publish"},"keywords":["1password","env","sync","secrets","dotenv",".env","onepassword","one password","1 password","1password dot env sync","1password .env sync"],"engines":{"node":">=20.0.0"},"repository":{"type":"git","url":"git+https://github.com/tomasbal/1password-dot-env-sync.git"},"publishConfig":{"access":"public"},"engineStrict":true,"author":{"name":"Tomislav Balabanov"},"license":"MIT","dependencies":{"@1password/sdk":"^0.1.1","@inquirer/prompts":"^5.3.8","commander":"^12.1.0","diff":"^5.2.0","dotenv":"^16.4.5","js-yaml":"^4.1.0","kleur":"^4.1.5"},"devDependencies":{"@changesets/cli":"^2.27.7","@types/diff":"^5.2.1","@types/js-yaml":"^4.0.9","@types/node":"^22.2.0","tsup":"^8.2.4","typescript":"^5.5.4"},"_id":"1password-dot-env-sync@1.0.5","gitHead":"884143c8cc5e35dd470862fc8f142a3b7d124feb","bugs":{"url":"https://github.com/tomasbal/1password-dot-env-sync/issues"},"homepage":"https://github.com/tomasbal/1password-dot-env-sync#readme","_nodeVersion":"20.13.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-yfFly6vV7XlIOpyaJxx2SB9vHLhXdz/4ybo3YzrF+P35KaHWGIozQdCj9CzO0xEGPAhEgvdhoaZD8pODJalVIQ==","shasum":"38fc768e7d546a6835f30eca81880deda5371b8e","tarball":"https://registry.npmjs.org/1password-dot-env-sync/-/1password-dot-env-sync-1.0.5.tgz","fileCount":27,"unpackedSize":82111,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjdWto4SpYPlOcyTsZrNXK0KNErpe9ZADI2e5j5xxoewIhAIl58Ck+ZpShWhZtNgCwOIDVEKqMSxydUkzT6voLpVW9"}]},"_npmUser":{"name":"tomasbal","email":"tomislav@tomislavbalabanov.me"},"directories":{},"maintainers":[{"name":"tomasbal","email":"tomislav@tomislavbalabanov.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/1password-dot-env-sync_1.0.5_1723548082205_0.20536382711875056"},"_hasShrinkwrap":false}},"time":{"created":"2024-08-12T21:42:10.063Z","modified":"2024-08-13T11:21:22.579Z","2.0.0":"2024-08-11T21:23:28.733Z","1.0.1":"2024-08-12T21:42:10.410Z","2.0.1":"2024-08-12T21:43:29.390Z","1.0.2":"2024-08-12T22:44:45.346Z","1.0.4":"2024-08-12T23:10:16.536Z","1.0.5":"2024-08-13T11:21:22.380Z"},"bugs":{"url":"https://github.com/tomasbal/1password-dot-env-sync/issues"},"author":{"name":"Tomislav Balabanov"},"license":"MIT","homepage":"https://github.com/tomasbal/1password-dot-env-sync#readme","keywords":["1password","env","sync","secrets","dotenv",".env","onepassword","one password","1 password","1password dot env sync","1password .env sync"],"repository":{"type":"git","url":"git+https://github.com/tomasbal/1password-dot-env-sync.git"},"description":"Sync secrets between .env and 1Password vault","maintainers":[{"name":"tomasbal","email":"tomislav@tomislavbalabanov.me"}],"readme":"# 1password .dot env sync\n[![npm version](https://badge.fury.io/js/1password-dot-env-sync.svg)](https://www.npmjs.com/package/1password-dot-env-sync)\n\n\n## Overview\n\n`1password-dot-env-sync` is a command-line tool that synchronizes secrets between `.env` files and 1Password vaults. This tool allows you to keep your environment variables secure by leveraging 1Password's vault management and syncing capabilities.\n\n## Features\n\n- **Sync Secrets**: Easily sync your `.env` files with 1Password vaults, ensuring all secrets are stored securely.\n- **1Password SDK Integration**: Utilizes the official 1Password SDK to interact with vaults.\n- **CLI Commands**: Intuitive command-line interface for syncing and managing your secrets.\n- **Modular Management**: Handles the configuration, environment, and 1Password interactions in a modular way.\n\n## Roadmap\n\n1. **Support for Multiple .env Files**:\n    - Future releases will support syncing across multiple environment files (e.g., `local`, `prod`, `dev`).\n\n2. **Support sub directory .env files**:\n   -  Future releases will support the ability to sync .env files that are in subdirectories within the project root.\n\n3. **Vault Creation**:\n   - When the 1Password SDK supports it, we will add the ability to create new vaults directly from the CLI.\n\n4. **Extended CLI Commands with Flags**:\n    - We plan to extend the CLI with more commands and flags to enhance the flexibility and usability of the tool.\n\n\n## Getting Started - Local Development\n\n### Prerequisites\n\n- Node.js (version >= 18.0.0)\n- NPM or Yarn\n\n### Installation\n\nClone the repository and navigate to the project directory:\n\n```bash\ngit clone https://github.com/yourusername/1password-env-sync.git\ncd 1password-env-sync\n```\n\nInstall the dependencies:\n\n```bash\nnpm install\n```\n\n### Local Development Setup\n\nTo start developing or modifying the tool locally, follow these steps:\n\n1. **Build the Project**: Compile the TypeScript files.\n\n   ```bash\n   npm run build\n   ```\n\n2. **Watch for Changes**: Automatically rebuild the project when files change.\n\n   ```bash\n   npm run watch\n   ```\n\n3. **Start the Application**: Run the CLI tool.\n\n   ```bash\n   npm start\n   ```\n\n### Usage\n\nTo start using the tool and to sync your `.env` file with a 1Password vault, simply run the following command:\n```bash\nnpx 1password-env-sync init\n```\nThis will initiate the setup of the tool and prompt you to configure the 1Password service account connection (if you don't know how to create 1password token you can find the instructions on the following [Link](https://developer.1password.com/docs/service-accounts/get-started)).\n\n\nAfter the setup is complete, you can sync your `.env` file with the 1Password vault by running:\n```bash\nnpx 1password-env-sync sync\n```\n\nThis will read the default `.env` file in the root directory and sync the variables with the specified 1Password vault configured in your setup.\n\n### CLI Commands\n\n- `sync`: Syncs the default `.env` file with the 1Password vault.\n- `diff`: Compares secrets between the `.env` file and the 1Password vault.\n- `help`: Displays help for a command.\n\n### Configuration\n\nThe tool uses a configuration file to manage settings. By default, it looks for a `config.yaml` file in the root directory.\n\n### Project Structure\n\n- **src/**: Contains the TypeScript source files.\n- **dist/**: Compiled JavaScript files.\n- **envManager.ts**: Handles loading and parsing `.env` files.\n- **onePasswordManager.ts**: Interfaces with the 1Password SDK.\n- **syncManager.ts**: Coordinates the syncing process between `.env` files and 1Password vaults.\n- **cli.ts**: Defines the command-line interface and commands.\n- **configManager.ts**: Manages application configurations.\n- **logger.ts**: Provides logging functionality across the application.\n- **utils.ts**: Utility functions used throughout the application.\n\n\n### How to contribute\nThis project is actively looking for maintainers, so feel free to reach out to me if you want to contribute to it.\n\nE-mail: [contact@tomislavbalabanov.me](mailto:contact@tomislavbalabanov.me)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Author\n\nTomislav Balabanov\n\n---","readmeFilename":"README.md"}