{"id":22476996,"url":"https://github.com/felixtellmann/vercel-deploy-env","last_synced_at":"2025-06-30T19:34:17.052Z","repository":{"id":113228035,"uuid":"421409581","full_name":"FelixTellmann/vercel-deploy-env","owner":"FelixTellmann","description":null,"archived":false,"fork":false,"pushed_at":"2021-10-26T12:35:00.000Z","size":112,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T20:46:12.813Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/FelixTellmann.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":"2021-10-26T12:09:32.000Z","updated_at":"2022-06-28T12:01:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"4ffa500e-da6f-4c01-89e3-020d20fc4b72","html_url":"https://github.com/FelixTellmann/vercel-deploy-env","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FelixTellmann%2Fvercel-deploy-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FelixTellmann%2Fvercel-deploy-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FelixTellmann%2Fvercel-deploy-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FelixTellmann%2Fvercel-deploy-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FelixTellmann","download_url":"https://codeload.github.com/FelixTellmann/vercel-deploy-env/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245897141,"owners_count":20690424,"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":[],"created_at":"2024-12-06T14:09:14.188Z","updated_at":"2025-03-27T17:43:39.910Z","avatar_url":"https://github.com/FelixTellmann.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelixtellmann%2Fvercel-deploy-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelixtellmann%2Fvercel-deploy-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelixtellmann%2Fvercel-deploy-env/lists"}