{"id":26105368,"url":"https://github.com/willwade/envloader","last_synced_at":"2025-06-11T04:14:18.391Z","repository":{"id":278089294,"uuid":"934461224","full_name":"willwade/envloader","owner":"willwade","description":"a very basic direnv that you can use standalone ","archived":false,"fork":false,"pushed_at":"2025-02-18T12:26:48.000Z","size":2978,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T21:21:36.504Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/willwade.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2025-02-17T21:52:06.000Z","updated_at":"2025-03-06T15:40:13.000Z","dependencies_parsed_at":"2025-02-18T00:22:33.831Z","dependency_job_id":"0b582c4d-e4dd-4afc-9d5d-042045bef2d8","html_url":"https://github.com/willwade/envloader","commit_stats":null,"previous_names":["willwade/envloader"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willwade%2Fenvloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willwade%2Fenvloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willwade%2Fenvloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willwade%2Fenvloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willwade","download_url":"https://codeload.github.com/willwade/envloader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willwade%2Fenvloader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259198000,"owners_count":22820153,"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":"2025-03-09T21:06:38.146Z","updated_at":"2025-06-11T04:14:18.354Z","avatar_url":"https://github.com/willwade.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# envloader\n\nA minimal, standalone .env and .envrc loader with no dependencies.\n\n## Why use this instead of direnv?\n\nWell, I'll be honest - use direnv if you can. It's a great tool and I use it myself. I built this because I had an absolute headache trying to get direnv working on a windows machine. It was likely a very specific problem due to a locked down machine. (And profile being on onedrive which was set by a group policy). So :shrug: this is what I came up with.\n\n## Features\n\n- Zero dependencies\n- Cross-platform support (Windows, Linux, macOS)\n- Supports both `.env` and `.envrc` files\n- Simple shell integration\n\n\n## Installation\n\n### Using Homebrew\n```bash\nbrew tap willwade/envloader https://github.com/willwade/envloader\nbrew install willwade/envloader/envloader\n```\n\n### Using Scoop\n```powershell\nscoop bucket add envloader https://github.com/willwade/envloader\nscoop install envloader\n```\n\n## Usage\n\nDue to how shell environments work, the way you use envloader depends on your shell:\n\n### PowerShell\n\n```powershell\n# Either:\nInvoke-Expression $(envloader)\n# Or:\n. envloader\n```\n\n### Bash/Zsh\n\n```bash\n# Either:\neval \"$(envloader)\"\n# Or:\nsource envloader\n```\n\nThis will:\n1. Find the nearest `.env` or `.envrc` file\n2. Load its environment variables into your current shell session\n3. Variables will be available to all processes run in that shell session\n\nAdvanced options:\n```bash\n# Load from a specific file\nenvloader -f path/to/.env\n\n# Search up to specific depth for .env files\nenvloader --depth 3\n```\n\n## Shell Integration\n\nFor a more convenient experience, you can add a shell function to your profile:\n\n### PowerShell\nAdd to your `$PROFILE` (eg. `notepad $PROFILE`):\n\n```powershell\nfunction envload { \n    # Join multiple lines into a single string and pipe to Invoke-Expression\n    envloader | Out-String | Invoke-Expression\n}\n```\n\n### Bash\nAdd to your `~/.bashrc`:\n```bash\nenvload() {\n    eval \"$(envloader)\"\n}\n```\n\n### Zsh\nAdd to your `~/.zshrc`:\n```zsh\nenvload() {\n    eval \"$(envloader)\"\n}\n```\n\n### Fish\nAdd to your `~/.config/fish/functions/envload.fish`:\n```fish\nfunction envload\n    eval (envloader)\nend\n```\n\nAfter adding to your profile and restarting your shell, you can simply use:\n```bash\nenvload\n```\n\nThis will load environment variables from the nearest `.env` or `.envrc` file.\n\n\n### How it works\n\nThe `envloader` binary:\n1. Finds and reads `.env`/`.envrc` files\n2. Outputs shell-appropriate commands for evaluation\n3. Variables are set in your shell when commands are evaluated\n\n\n## Building from source\n\nRequires Go 1.x or higher and goreleaser to be installed.\n\n```bash\ngit clone https://github.com/willwade/envloader\ncd envloader\ngoreleaser build --snapshot --skip-publish\n```\n\n## License\n\n[MIT License](LICENSE)\n\n---\n\nNote: To use the GitHub releases, you'll need to set up a `GITHUB_TOKEN` with appropriate permissions if you're downloading from private repositories.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillwade%2Fenvloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillwade%2Fenvloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillwade%2Fenvloader/lists"}