{"_id":"@ashishlekhyani/envsync-cli","_rev":"7-164e905579fcff0f0b7a783d36202e3d","name":"@ashishlekhyani/envsync-cli","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.0":{"name":"@ashishlekhyani/envsync-cli","version":"1.0.0","keywords":["envsync","secrets","environment-variables","dotenv","cli","security"],"license":"MIT","_id":"@ashishlekhyani/envsync-cli@1.0.0","maintainers":[{"name":"ashishlekhyani","email":"alekhyanisbi@gmail.com"}],"homepage":"https://github.com/AshishLekhyani/EnvSync#readme","bugs":{"url":"https://github.com/AshishLekhyani/EnvSync/issues"},"bin":{"envsync":"dist/index.js"},"dist":{"shasum":"48da65ef9d08d6906b64f310adcb41ee9a9f8536","tarball":"https://registry.npmjs.org/@ashishlekhyani/envsync-cli/-/envsync-cli-1.0.0.tgz","fileCount":31,"integrity":"sha512-M5BDefa/j5qLYiSZj6L++e7vPAnComgqInDDVBPW0S1lYnDs5YrZuIcq0GFQbjcau5yhM8kLb5/jE/0qeprISQ==","signatures":[{"sig":"MEYCIQDQGcW9a7Mw/lKcN2JyxtP6eOdvVneqTFjGz3TAGpgOSAIhAJLxWp1YhopyUgLv7wVKEGVUh0VO8OPKLFPfqS44ik+f","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36336},"main":"dist/index.js","engines":{"node":">=18"},"gitHead":"50e8b561f26c1e38be1f77df5c31bdcaab083c4e","private":false,"scripts":{"dev":"tsx src/index.ts","build":"tsc -p tsconfig.json"},"_npmUser":{"name":"ashishlekhyani","email":"alekhyanisbi@gmail.com"},"repository":{"url":"git+https://github.com/AshishLekhyani/EnvSync.git","type":"git","directory":"Cli"},"_npmVersion":"11.11.1","description":"EnvSync command-line interface","directories":{},"_nodeVersion":"24.11.1","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.7.3","@types/node":"^20.17.16"},"_npmOperationalInternal":{"tmp":"tmp/envsync-cli_1.0.0_1785496094309_0.21501281902834624","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ashishlekhyani/envsync-cli","version":"1.0.1","keywords":["envsync","secrets","environment-variables","dotenv","cli","security"],"license":"MIT","_id":"@ashishlekhyani/envsync-cli@1.0.1","maintainers":[{"name":"ashishlekhyani","email":"alekhyanisbi@gmail.com"}],"homepage":"https://github.com/AshishLekhyani/EnvSync#readme","bugs":{"url":"https://github.com/AshishLekhyani/EnvSync/issues"},"bin":{"envsync":"dist/index.js"},"dist":{"shasum":"bc6ba8ae8f4a351d73cb4d9f010584379f345bdf","tarball":"https://registry.npmjs.org/@ashishlekhyani/envsync-cli/-/envsync-cli-1.0.1.tgz","fileCount":32,"integrity":"sha512-8eAuMLcrux4N/8WCGkKXyZx47tUGtQF1gw9hJo2OzBmjg6F+6+lw7Xe93AjV3DqPcjddDIoafP3Pb3x/zaTJnQ==","signatures":[{"sig":"MEQCIDBHilnD4Pg0AdDjWxd+wfsZe6kEz1vmZseggR8FcqPTAiB7lRWqzh1JgSEWLDq2el90CdaFwtTVjv35aIYLuHIOWA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39763},"main":"dist/index.js","engines":{"node":">=18"},"gitHead":"4194db17ab6dc34ddac9bc13b8e6d14f2ef46320","private":false,"scripts":{"dev":"tsx src/index.ts","build":"tsc -p tsconfig.json"},"_npmUser":{"name":"ashishlekhyani","email":"alekhyanisbi@gmail.com"},"repository":{"url":"git+https://github.com/AshishLekhyani/EnvSync.git","type":"git","directory":"Cli"},"_npmVersion":"11.11.1","description":"EnvSync command-line interface","directories":{},"_nodeVersion":"24.11.1","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.7.3","@types/node":"^20.17.16"},"_npmOperationalInternal":{"tmp":"tmp/envsync-cli_1.0.1_1785496691393_0.4215810395614352","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@ashishlekhyani/envsync-cli","version":"1.0.2","keywords":["envsync","secrets","environment-variables","dotenv","cli","security"],"license":"MIT","_id":"@ashishlekhyani/envsync-cli@1.0.2","maintainers":[{"name":"ashishlekhyani","email":"alekhyanisbi@gmail.com"}],"homepage":"https://github.com/AshishLekhyani/EnvSync#readme","bugs":{"url":"https://github.com/AshishLekhyani/EnvSync/issues"},"bin":{"envsync":"dist/index.js"},"dist":{"shasum":"c6eeb5cd2b821b3e533810587f85f8c20a710e6e","tarball":"https://registry.npmjs.org/@ashishlekhyani/envsync-cli/-/envsync-cli-1.0.2.tgz","fileCount":32,"integrity":"sha512-FiM7b41VC1dpIZFP7UdTu9qQ6XbIfEUueeC7HP7MrSztzyUyHZpcrEzys5EgCgGzaw2tAz0bdyFpCvfHoBKiHA==","signatures":[{"sig":"MEQCIA5i/F+4MXaGwr0jJSwR0umWvjXfJXjpV71r0tTkzJY2AiAh1R/NIPNMaQz/q5S4jgR3i4fNiJz0ReEjz6x+wvw3UA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39815},"main":"dist/index.js","engines":{"node":">=18"},"gitHead":"52628d0ad1ba5cd0e936019599fc8a000741ce84","private":false,"scripts":{"dev":"tsx src/index.ts","build":"tsc -p tsconfig.json"},"_npmUser":{"name":"ashishlekhyani","email":"alekhyanisbi@gmail.com"},"repository":{"url":"git+https://github.com/AshishLekhyani/EnvSync.git","type":"git","directory":"Cli"},"_npmVersion":"11.11.1","description":"EnvSync command-line interface","directories":{},"_nodeVersion":"24.11.1","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.7.3","@types/node":"^20.17.16"},"_npmOperationalInternal":{"tmp":"tmp/envsync-cli_1.0.2_1785521789044_0.20987061585451738","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@ashishlekhyani/envsync-cli","version":"1.0.3","keywords":["envsync","secrets","environment-variables","dotenv","cli","security"],"license":"MIT","_id":"@ashishlekhyani/envsync-cli@1.0.3","maintainers":[{"name":"ashishlekhyani","email":"alekhyanisbi@gmail.com"}],"homepage":"https://github.com/AshishLekhyani/EnvSync#readme","bugs":{"url":"https://github.com/AshishLekhyani/EnvSync/issues"},"bin":{"envsync":"dist/index.js"},"dist":{"shasum":"361a0a6a2b05b5d639b31c376b0be40eb0d39028","tarball":"https://registry.npmjs.org/@ashishlekhyani/envsync-cli/-/envsync-cli-1.0.3.tgz","fileCount":32,"integrity":"sha512-gj2I/Qc9cG8gxUfVm3KrY1Ya9ewQ5TBx4LPBZXelC14bcymejrut3R/SNrA0e9xgUWTFU0FU5YdNjgwq9u/2Cg==","signatures":[{"sig":"MEQCIGuxh6SBRVzYTLAGY0WPwFoMBnCUHyABoSzgETFvDd5gAiBGDtkMG/GnFZq7idYHJ6iF5ki/Rk1J2GLqL8aVulhmHg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41176},"main":"dist/index.js","engines":{"node":">=18"},"gitHead":"5619c105ad7fdb49790a6857fe809e916953d7e3","private":false,"scripts":{"dev":"tsx src/index.ts","build":"tsc -p tsconfig.json"},"_npmUser":{"name":"ashishlekhyani","email":"alekhyanisbi@gmail.com"},"repository":{"url":"git+https://github.com/AshishLekhyani/EnvSync.git","type":"git","directory":"Cli"},"_npmVersion":"11.11.1","description":"EnvSync command-line interface","directories":{},"_nodeVersion":"24.11.1","dependencies":{"cross-spawn":"^7.0.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.7.3","@types/node":"^20.17.16","@types/cross-spawn":"^6.0.6"},"_npmOperationalInternal":{"tmp":"tmp/envsync-cli_1.0.3_1785522957879_0.14812630163528784","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@ashishlekhyani/envsync-cli","version":"1.0.4","keywords":["envsync","secrets","environment-variables","dotenv","cli","security"],"license":"MIT","_id":"@ashishlekhyani/envsync-cli@1.0.4","maintainers":[{"name":"ashishlekhyani","email":"alekhyanisbi@gmail.com"}],"homepage":"https://github.com/AshishLekhyani/EnvSync#readme","bugs":{"url":"https://github.com/AshishLekhyani/EnvSync/issues"},"bin":{"envsync":"dist/index.js"},"dist":{"shasum":"36ad3b70d216b736e3091aacf4dc374d26eefe13","tarball":"https://registry.npmjs.org/@ashishlekhyani/envsync-cli/-/envsync-cli-1.0.4.tgz","fileCount":40,"integrity":"sha512-Bn5lbRPucDJje+eFUWhYavSXSjiK/rSMKDM52JiXY3981k5zLFmBBjHgNKXi0dyXSQiZ9PhsX9mt027JyGLTnw==","signatures":[{"sig":"MEUCIBYA8s7nJ98/ThBnxtXLOLrFIjZ+aVz8T5CYYgBGj+vxAiEApCbARASpXU/CCsdYzMyZAWkthVvAvpu7SptcprUjlIQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64346},"main":"dist/index.js","engines":{"node":">=18"},"gitHead":"365d4a3c9049ff32ae704aa1c5c556de4ebbf70e","private":false,"scripts":{"dev":"tsx src/index.ts","build":"tsc -p tsconfig.json"},"_npmUser":{"name":"ashishlekhyani","email":"alekhyanisbi@gmail.com"},"repository":{"url":"git+https://github.com/AshishLekhyani/EnvSync.git","type":"git","directory":"Cli"},"_npmVersion":"11.11.1","description":"EnvSync command-line interface","directories":{},"_nodeVersion":"24.11.1","dependencies":{"cross-spawn":"^7.0.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.7.3","@types/node":"^20.17.16","@types/cross-spawn":"^6.0.6"},"_npmOperationalInternal":{"tmp":"tmp/envsync-cli_1.0.4_1785525056704_0.8576256784058116","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@ashishlekhyani/envsync-cli","version":"1.0.5","keywords":["envsync","secrets","environment-variables","dotenv","cli","security"],"license":"MIT","_id":"@ashishlekhyani/envsync-cli@1.0.5","maintainers":[{"name":"ashishlekhyani","email":"alekhyanisbi@gmail.com"}],"homepage":"https://github.com/AshishLekhyani/EnvSync#readme","bugs":{"url":"https://github.com/AshishLekhyani/EnvSync/issues"},"bin":{"envsync":"dist/index.js"},"dist":{"shasum":"34b6c1f050fa2dbd69dfc0bf05c106f2c24d4e17","tarball":"https://registry.npmjs.org/@ashishlekhyani/envsync-cli/-/envsync-cli-1.0.5.tgz","fileCount":40,"integrity":"sha512-KGk6aqvx8K1Frv6VMASD/Rn6z7Bdp+/AxVRU2TO72/1ftRG/w6n3xQeDTsf9u1ZpFMlMpXSw6lRq24c5GJuLlQ==","signatures":[{"sig":"MEYCIQCkPIXBzhTVOKP2u2FkZDerbvWybkzMA79W/8WEeQX5qwIhAN/SD2ONE5zqDiOXGZ2awzEs/orlHL95zLbxqvhtwCTQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64813},"main":"dist/index.js","engines":{"node":">=18"},"gitHead":"4c1a52fa2d7c8503a6d31ec76266c6934bd7b43f","private":false,"scripts":{"dev":"tsx src/index.ts","build":"tsc -p tsconfig.json"},"_npmUser":{"name":"ashishlekhyani","email":"alekhyanisbi@gmail.com"},"repository":{"url":"git+https://github.com/AshishLekhyani/EnvSync.git","type":"git","directory":"Cli"},"_npmVersion":"11.11.1","description":"EnvSync command-line interface","directories":{},"_nodeVersion":"24.11.1","dependencies":{"cross-spawn":"^7.0.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.7.3","@types/node":"^20.17.16","@types/cross-spawn":"^6.0.6"},"_npmOperationalInternal":{"tmp":"tmp/envsync-cli_1.0.5_1785525898517_0.5335002077348734","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@ashishlekhyani/envsync-cli","version":"1.0.6","private":false,"publishConfig":{"access":"public"},"description":"EnvSync command-line interface","license":"MIT","repository":{"type":"git","url":"git+https://github.com/AshishLekhyani/EnvSync.git","directory":"Cli"},"keywords":["envsync","secrets","environment-variables","dotenv","cli","security"],"bin":{"envsync":"dist/index.js"},"main":"dist/index.js","scripts":{"dev":"tsx src/index.ts","build":"tsc -p tsconfig.json"},"dependencies":{"cross-spawn":"^7.0.6","prompts":"^2.4.2"},"devDependencies":{"@types/cross-spawn":"^6.0.6","@types/node":"^20.17.16","@types/prompts":"^2.4.9","tsx":"^4.19.2","typescript":"^5.7.3"},"engines":{"node":">=18"},"gitHead":"1533d533f11ca4af028585b4718998d75d22cc39","_id":"@ashishlekhyani/envsync-cli@1.0.6","bugs":{"url":"https://github.com/AshishLekhyani/EnvSync/issues"},"homepage":"https://github.com/AshishLekhyani/EnvSync#readme","_nodeVersion":"24.11.1","_npmVersion":"11.11.1","dist":{"integrity":"sha512-JrnsyPeKzS56wo3UZLIJnThCVpcaA7K/ZPvl+Sxe94XEKru9Y8wvexu/7i0bZDzNHk4IyBVUYR8V/4RYvBJDww==","shasum":"271415d1acfaf9f8c9db3177f346939a4610da9b","tarball":"https://registry.npmjs.org/@ashishlekhyani/envsync-cli/-/envsync-cli-1.0.6.tgz","fileCount":40,"unpackedSize":64331,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCZpXDE8UIZYh4pfTBObPPzeYk83tVcjGC1hrSoPy0hDQIgDy/RFyv2uwPpHWrqtl5UYEcWC3K6lNfBMQvww++D5GI="}]},"_npmUser":{"name":"ashishlekhyani","email":"alekhyanisbi@gmail.com"},"directories":{},"maintainers":[{"name":"ashishlekhyani","email":"alekhyanisbi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/envsync-cli_1.0.6_1785558869343_0.3989857938236758"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-31T11:08:14.082Z","modified":"2026-08-01T04:34:29.615Z","1.0.0":"2026-07-31T11:08:14.446Z","1.0.1":"2026-07-31T11:18:11.559Z","1.0.2":"2026-07-31T18:16:29.187Z","1.0.3":"2026-07-31T18:35:58.057Z","1.0.4":"2026-07-31T19:10:56.845Z","1.0.5":"2026-07-31T19:24:58.657Z","1.0.6":"2026-08-01T04:34:29.480Z"},"bugs":{"url":"https://github.com/AshishLekhyani/EnvSync/issues"},"license":"MIT","homepage":"https://github.com/AshishLekhyani/EnvSync#readme","keywords":["envsync","secrets","environment-variables","dotenv","cli","security"],"repository":{"type":"git","url":"git+https://github.com/AshishLekhyani/EnvSync.git","directory":"Cli"},"description":"EnvSync command-line interface","maintainers":[{"name":"ashishlekhyani","email":"alekhyanisbi@gmail.com"}],"readme":"# @ashishlekhyani/envsync-cli\n\nThe command-line client for [EnvSync](https://github.com/AshishLekhyani/EnvSync) — a secrets manager for environment variables. Pull, push, and inject secrets without ever committing a `.env` file. One runtime dependency, [`cross-spawn`](https://www.npmjs.com/package/cross-spawn) (used only by `envsync run`, for correct cross-platform command execution — it has zero dependencies of its own and is the same package npm itself relies on internally).\n\n## Install\n\n```\nnpm install -g @ashishlekhyani/envsync-cli\n```\n\n## Quick start\n\n1. Generate a service token in EnvSync under **Settings → CLI & Tokens**.\n2. Log in (reads the token from stdin so it never touches your shell history):\n   ```\n   echo \"$TOKEN\" | envsync login\n   ```\n   or pass it directly: `envsync login <token>`\n3. Run `envsync` with no arguments — it launches an interactive menu that picks your\n   project, environment, and action (pull/push/run/status) for you. No IDs or flags needed.\n\nPrefer flags/scripting instead? That works too:\n1. Find your project/environment IDs:\n   ```\n   envsync projects\n   envsync environments --project <projectId>\n   ```\n2. Link this folder so you don't have to pass `--project`/`--environment` on every command:\n   ```\n   envsync link --project <projectId> --environment <environmentId>\n   ```\n3. Pull secrets into a local `.env` file:\n   ```\n   envsync pull\n   ```\n\n## Commands\n\n| Command | Description |\n|---|---|\n| `envsync login [token]` | Authenticate with a service token. Reads the token from stdin if omitted (`echo $TOKEN \\| envsync login`), avoiding shell history. Writes credentials to `~/.envsync/credentials.json` (mode `0600`). |\n| `envsync logout` | Removes local credentials. Does not revoke the token server-side — revoke it from Settings if it may have been compromised. |\n| `envsync` / `envsync menu` | Interactive mode — pick a project/environment (or reuse a linked one), then an action, from a numbered menu. No flags needed. Runs automatically when you type `envsync` with no arguments while logged in. |\n| `envsync projects` | Lists every project you have access to, with its ID. |\n| `envsync environments [--project <id>]` | Lists every environment for a project, with its ID. |\n| `envsync link --project <id> --environment <id>` | Remembers a project/environment for the current folder (writes `.envsync.json` there), so the commands below can omit `--project`/`--environment` entirely. |\n| `envsync pull [--project <id> --environment <id>] [--out <path>]` | Reveals and writes every secret in the environment to a `.env` file (default `./.env`). Overwrites the destination file completely. |\n| `envsync push [--project <id> --environment <id>] [--out <path>]` | Reads a local `.env` file and upserts its keys to the server — creates new keys, updates existing ones. Never deletes remote-only keys. |\n| `envsync run [--project <id> --environment <id>] -- <cmd> [args...]` | Runs a command with secrets injected directly into its environment variables. Nothing is written to disk. |\n| `envsync status [--project <id> --environment <id>] [--out <path>]` | Compares your local `.env` against the server without revealing any values — metadata only, safe to run often. |\n\n`--project`/`--environment` are only required if you haven't run `envsync link` in the current folder — explicit flags always take priority over a linked value.\n\n## Environment variables\n\n| Variable | Purpose |\n|---|---|\n| `ENVSYNC_TOKEN` | Use a service token directly without running `login` first — the standard way to authenticate in CI (GitHub Actions, Docker builds, etc.). Takes priority over any locally saved credentials. |\n| `ENVSYNC_API_URL` | Point the CLI at a self-hosted EnvSync API instead of the default (`https://envsync-api.onrender.com/api`). Must be HTTPS unless it's `localhost`/`127.0.0.1` — the CLI warns if not. |\n\n## Notes on audit trails and security\n\n- `pull` and `run` reveal every secret in the environment, so each key produces its own audited reveal entry — an environment with 50 secrets means 50 audit rows per pull. `status` never reveals values, so it's audit-quiet by design.\n- A token's access is identity-inheriting and org-scoped: it can only do what its creator could do, and only within the org it was issued for — a leaked CI token has bounded blast radius, not account-wide access.\n- Prefer `ENVSYNC_TOKEN` in CI over passing a token as a bare command-line argument on a shared host (visible via `ps`) or storing it in a credentials file on a machine you don't fully trust.\n\n## License\n\nMIT — see [LICENSE](https://github.com/AshishLekhyani/EnvSync/blob/main/LICENSE).\n","readmeFilename":"README.md"}