{"id":15020978,"url":"https://github.com/pytal/deploy-env","last_synced_at":"2025-09-08T12:32:06.043Z","repository":{"id":37020257,"uuid":"277239972","full_name":"Pytal/deploy-env","owner":"Pytal","description":"Deploy environment variables from .env and .env-cmdrc.json files to Vercel","archived":false,"fork":false,"pushed_at":"2024-09-04T23:11:45.000Z","size":962,"stargazers_count":32,"open_issues_count":22,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T03:09:33.950Z","etag":null,"topics":["deploy","deployment","env","environment-variables","vercel"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Pytal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2020-07-05T05:51:15.000Z","updated_at":"2023-10-20T15:42:25.000Z","dependencies_parsed_at":"2024-01-15T05:43:46.184Z","dependency_job_id":"bc204b00-03ff-431f-9a9d-dfa5ce2b3fa3","html_url":"https://github.com/Pytal/deploy-env","commit_stats":{"total_commits":654,"total_committers":5,"mean_commits":130.8,"dds":0.5214067278287462,"last_synced_commit":"3ab30b905fe6511928169bca011aafbc90bddc34"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pytal%2Fdeploy-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pytal%2Fdeploy-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pytal%2Fdeploy-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pytal%2Fdeploy-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pytal","download_url":"https://codeload.github.com/Pytal/deploy-env/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232308556,"owners_count":18503119,"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":["deploy","deployment","env","environment-variables","vercel"],"created_at":"2024-09-24T19:55:58.341Z","updated_at":"2025-01-03T08:11:51.656Z","avatar_url":"https://github.com/Pytal.png","language":"TypeScript","readme":"# deploy-env\n\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Pytal/deploy-env/Publish?label=CI\u0026style=for-the-badge)](https://github.com/Pytal/deploy-env/actions) [![npm](https://img.shields.io/npm/v/deploy-env?style=for-the-badge)](https://www.npmjs.com/package/deploy-env)\n\nDeploy environment variables from `.env` and `.env-cmdrc.json` files to Vercel.\n\n## Installation\n\n```bash\nnpm add -g deploy-env\n```\n\n\u003e `deploy-env` expects the Vercel CLI to be installed globally with `npm add -g vercel`\n\n## Usage\n\nIn your Vercel project directory:\n\nMake at least one `.env`, `.env.production`, `.env.preview`, or `.env.development` file with your environment variables in the following format:\n\n```env\nAPI_KEY=top_secret_api_key\nTOKEN=some_secret_token\n...\n```\n\nYou can also make a `.env-cmdrc.json` file with the following format:\n\n```jsonc\n{\n  \"development\": {\n    \"API_KEY\": \"development value\"\n    // development environment variables\n  },\n  \"preview\": {\n    \"API_KEY\": \"preview value\"\n    // preview environment variables\n  },\n  \"production\": {\n    \"API_KEY\": \"production value\"\n    // production environment variables\n  }\n}\n```\n\nRun the command:\n\n```bash\ndeploy-env [production | preview | development] [ENV_VAR]...\n```\n\n\u003e `dpl-env` can be used as an alias for `deploy-env`\n\n\u003e If a `.env.[environment]` file doesn't exist when running: `deploy-env [environment]`, the `.env` file will be used and deployed to the environment specified in the command\n\n## Examples\n\nDeploy all `preview` environment variables to the Preview deployment\n\n```bash\ndeploy-env preview\n```\n\nDeploy only the `API_KEY` environment variable to the Preview deployment\n\n```bash\ndeploy-env preview API_KEY\n```\n\nDeploy only the `API_KEY`, `TOKEN`, and `GRAPHQL_ENDPOINT` environment variables to Production\n\n```bash\ndeploy-env production API_KEY TOKEN GRAPHQL_ENDPOINT\n```\n\n## Programmatic API\n\n### `deployEnv`\n\nA function which deploys environment variables from `.env` and `.env-cmdrc.json` files:\n\n- `deploymentEnv` { `'production' | 'preview' | 'development'` }: Deployment environment to be deployed to\n- `varNameList` { `string[]` }: (optional) List of environment variables to be deployed\n- **Returns** { `Promise\u003cvoid\u003e` }: Promise which resolves when deployment completes\n\n## Related Projects\n\n[`env-cmd`](https://github.com/toddbluhm/env-cmd) - simple node program for executing commands using an environment from an env file\n\n[`dotenv`](https://github.com/motdotla/dotenv) - module that loads environment variables from a `.env` file into [`process.env`](https://nodejs.org/docs/latest/api/process.html#process_process_env)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytal%2Fdeploy-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpytal%2Fdeploy-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytal%2Fdeploy-env/lists"}