{"id":22477042,"url":"https://github.com/felixtellmann/deploy-env-custom","last_synced_at":"2025-08-27T22:43:45.374Z","repository":{"id":113226091,"uuid":"392691575","full_name":"FelixTellmann/deploy-env-custom","owner":"FelixTellmann","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-04T13:22:12.000Z","size":110,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T20:46:13.747Z","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-08-04T13:05:54.000Z","updated_at":"2022-06-28T12:01:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"53d0c49c-1a93-4ec4-b62e-939b6c9ebd26","html_url":"https://github.com/FelixTellmann/deploy-env-custom","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%2Fdeploy-env-custom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FelixTellmann%2Fdeploy-env-custom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FelixTellmann%2Fdeploy-env-custom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FelixTellmann%2Fdeploy-env-custom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FelixTellmann","download_url":"https://codeload.github.com/FelixTellmann/deploy-env-custom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245897224,"owners_count":20690439,"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:21.304Z","updated_at":"2025-03-27T17:43:48.876Z","avatar_url":"https://github.com/FelixTellmann.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deploy-env\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)\n[![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\n## Installation\n``` bash\nnpm add -g deploy-env\n```\n\u003e `deploy-env` expects the Vercel CLI to be installed globally with `npm add -g vercel`\n\n\n## Usage\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``` 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``` 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``` bash\ndeploy-env [production | preview | development] [ENV_VAR]...\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\n## Examples\nDeploy all `preview` environment variables to the Preview deployment\n``` bash\ndeploy-env preview\n```\n\nDeploy only the `API_KEY` environment variable to the Preview deployment\n``` bash\ndeploy-env preview API_KEY\n```\n\nDeploy only the `API_KEY`, `TOKEN`, and `GRAPHQL_ENDPOINT` environment variables to Production\n``` bash\ndeploy-env production API_KEY TOKEN GRAPHQL_ENDPOINT\n```\n\n\n## Programmatic API\n\n### `deployEnv`\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\n## Related Projects\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%2Fdeploy-env-custom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelixtellmann%2Fdeploy-env-custom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelixtellmann%2Fdeploy-env-custom/lists"}