{"id":21158375,"url":"https://github.com/toilal/dotx","last_synced_at":"2025-03-14T15:27:29.470Z","repository":{"id":57167000,"uuid":"466251972","full_name":"Toilal/dotx","owner":"Toilal","description":"Bridge the gap between shell commands and .env files","archived":false,"fork":false,"pushed_at":"2022-03-11T07:28:47.000Z","size":1207,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-01-21T09:09:35.744Z","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/Toilal.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}},"created_at":"2022-03-04T19:49:25.000Z","updated_at":"2022-03-14T14:02:42.000Z","dependencies_parsed_at":"2022-08-30T13:20:26.706Z","dependency_job_id":null,"html_url":"https://github.com/Toilal/dotx","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toilal%2Fdotx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toilal%2Fdotx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toilal%2Fdotx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toilal%2Fdotx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Toilal","download_url":"https://codeload.github.com/Toilal/dotx/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243599904,"owners_count":20317193,"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-11-20T12:22:07.243Z","updated_at":"2025-03-14T15:27:29.448Z","avatar_url":"https://github.com/Toilal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dotx\n\nBridge the gap between shell commands and [dotenv](https://www.npmjs.com/package/dotenv) `.env` files.\n\n## Install\n\n```bash\nnpm install --global @toilal/dotx\n```\n\n## Docs\n\n`dotx` can be used to run any command with environment variable loaded from `.env` file.\n\n```bash\ndotx \u003ccommand\u003e\n```\n\nA custom `.env` file can be given:\n\n```bash\ndotx -f .env.test \u003ccommand\u003e\n```\n\nYou may also set many `.env` files.\n\n```bash\ndotx -f .env -f .env.local \u003ccommand\u003e\n```\n\n*later files have higher priority and will erase variables loaded from previous files*\n\n`.env` files can be loaded into current shell using the following trick:\n\n```bash\neval $(dotx -o export)\n```\n\nYou can also grab a single value\n\n```bash\nMY_VAR=$(dotx -r MY_VAR)\n```\n\n## Usage\n\n```bash\n$ dotx --help\nOptions:\n      --help        Show help                                          [boolean]\n      --version     Show version number                                [boolean]\n  -f, --files       .env files to load                                   [array]\n  -o, --output      output environment variable\n                      [string] [choices: \"set\", \"export\", \"json\", \"json-pretty\"]\n  -r, --read-value  read value for one environment variable             [string]\n  -s, --shell       execute the command in shell                       [boolean]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoilal%2Fdotx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoilal%2Fdotx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoilal%2Fdotx/lists"}