{"id":15118018,"url":"https://github.com/venthur/dotenv-cli","last_synced_at":"2025-04-06T10:10:38.113Z","repository":{"id":33140202,"uuid":"152993874","full_name":"venthur/dotenv-cli","owner":"venthur","description":"Executes commands with environment variables set from .env file. Zero dependencies.","archived":false,"fork":false,"pushed_at":"2025-03-10T04:59:06.000Z","size":200,"stargazers_count":35,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T09:05:34.193Z","etag":null,"topics":["bash-completion","cli","debian","dotenv","dotenv-cli","python"],"latest_commit_sha":null,"homepage":"https://dotenv-cli.readthedocs.io","language":"Python","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/venthur.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":"2018-10-14T16:20:10.000Z","updated_at":"2025-03-10T16:39:12.000Z","dependencies_parsed_at":"2024-02-11T13:36:34.237Z","dependency_job_id":"21330ddb-23d9-41fa-82f6-4360fe409985","html_url":"https://github.com/venthur/dotenv-cli","commit_stats":{"total_commits":234,"total_committers":4,"mean_commits":58.5,"dds":"0.18376068376068377","last_synced_commit":"6dc147a4769c8fee4a7e87719f5fe2c028345f3c"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venthur%2Fdotenv-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venthur%2Fdotenv-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venthur%2Fdotenv-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venthur%2Fdotenv-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/venthur","download_url":"https://codeload.github.com/venthur/dotenv-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247464220,"owners_count":20942970,"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":["bash-completion","cli","debian","dotenv","dotenv-cli","python"],"created_at":"2024-09-26T01:46:06.423Z","updated_at":"2025-04-06T10:10:38.095Z","avatar_url":"https://github.com/venthur.png","language":"Python","readme":"# dotenv CLI\n\nDotenv-CLI provides the `dotenv` command. `dotenv` loads the `.env` file from\nthe current directory, puts the contents in the environment by either changing\nexisting- or adding new environment variables, and executes the given command.\n\n`dotenv` supports alternative `.env` files like `.env.development` via the `-e`\nor `--dotenv` parameters. This parameter can be repeated to load multiple\nfiles, the .env files will be loaded in the order they are provided.\n\nWith the `--replace` flag, `dotenv` also provides an option to completely\nreplace the environment variables with the ones from the `.env` file, allowing\nyou to control exactly which environment variables are set.\n\n`dotenv` provides bash completion, so you can use `dotenv` like this:\n\n```bash\n$ dotenv make \u003cTAB\u003e\nall      clean    docs     lint     release  test\n```\n\n## Install\n\n### Using PyPi\n\ndotenv-cli is [available on PyPi][pypi], you can install it via:\n\n[pypi]: https://pypi.org/project/dotenv-cli/\n\n```bash\n$ pip install dotenv-cli\n```\n\n### On Debian and Ubuntu\n\nAlternatively, you can install dotenv-cli on Debian based distributions via:\n\n```bash\n# apt-get install dotenv-cli\n```\n\n\n## Usage\n\nCreate an `.env` file in the root of your project and populate it with some\nvalues like so:\n\n```sh\nSOME_SECRET=donttrythisathome\nSOME_CONFIG=foo\n```\n\nJust prepend the command you want to run with the extra environment variables\nfrom the `.env` file with `dotenv`:\n\n```bash\n$ dotenv some-command\n```\n\nand those variables will be available in your environment variables.\n\n\n## Rules\n\nThe parser understands the following:\n\n* Basic unquoted values (`BASIC=basic basic`)\n* Lines starting with `export` (`export EXPORT=foo`), so you can `source` the\n  file in bash\n* Lines starting with `#` are ignored (`# Comment`)\n* Empty values (`EMPTY=`) become empty strings\n* Inner quotes are maintained in basic values: `INNER_QUOTES=this 'is' a test`\n  or `INNER_QUOTES2=this \"is\" a test`\n* White spaces are trimmed from unquoted values: `TRIM_WHITESPACE=  foo  ` and\n  maintained in quoted values:  `KEEP_WHITESPACE=\"  foo  \"`\n* Interpret escapes (e.g. `\\n`) in double quoted values, keep them as-is in\n  single quoted values.\n\nExample `.env` file:\n\n```sh\nBASIC=basic basic\nexport EXPORT=foo\nEMPTY=\nINNER_QUOTES=this 'is' a test\nINNER_QUOTES2=this \"is\" a test\nTRIM_WHITESPACE= foo\nKEEP_WHITESPACE=\"  foo  \"\nMULTILINE_DQ=\"multi\\nline\"\nMULTILINE_SQ='multi\\nline'\nMULTILINE_NQ=multi\\nline\n#\n# some comment\n```\n\nbecomes:\n\n```sh\n$ dotenv env\nBASIC=basic basic\nEXPORT=foo\nEMPTY=\nINNER_QUOTES=this 'is' a test\nINNER_QUOTES2=this \"is\" a test\nTRIM_WHITESPACE=foo\nKEEP_WHITESPACE=  foo\nMULTILINE_DQ=multi\nline\nMULTILINE_SQ=multi\\nline\nMULTILINE_NQ=multi\\nline\n```\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fventhur%2Fdotenv-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fventhur%2Fdotenv-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fventhur%2Fdotenv-cli/lists"}