{"id":20914755,"url":"https://github.com/zpm-zsh/autoenv","last_synced_at":"2025-05-13T10:31:41.840Z","repository":{"id":2256396,"uuid":"22990042","full_name":"zpm-zsh/autoenv","owner":"zpm-zsh","description":"Autoenv for zsh","archived":false,"fork":false,"pushed_at":"2025-01-07T23:41:16.000Z","size":98,"stargazers_count":165,"open_issues_count":0,"forks_count":23,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-08T00:30:17.899Z","etag":null,"topics":["autoenv","plugin","shell","zpm","zsh","zsh-plugin","zsh-plugins"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zpm-zsh.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":"2014-08-15T13:17:51.000Z","updated_at":"2025-01-07T23:41:19.000Z","dependencies_parsed_at":"2025-01-08T00:30:12.846Z","dependency_job_id":"65bf2b70-5359-42b9-b37b-be02c7871899","html_url":"https://github.com/zpm-zsh/autoenv","commit_stats":{"total_commits":73,"total_committers":13,"mean_commits":5.615384615384615,"dds":"0.34246575342465757","last_synced_commit":"ff626b0b374379553fa7d5577201be11f4fc83f2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zpm-zsh%2Fautoenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zpm-zsh%2Fautoenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zpm-zsh%2Fautoenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zpm-zsh%2Fautoenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zpm-zsh","download_url":"https://codeload.github.com/zpm-zsh/autoenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253922902,"owners_count":21984800,"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":["autoenv","plugin","shell","zpm","zsh","zsh-plugin","zsh-plugins"],"created_at":"2024-11-18T16:02:07.153Z","updated_at":"2025-05-13T10:31:41.529Z","avatar_url":"https://github.com/zpm-zsh.png","language":"Shell","funding_links":[],"categories":["Plugins","Shell"],"sub_categories":["ZSH on Windows","Zinit (née zplugin)"],"readme":"# Autoenv\n\n\u003e Until recently, the default file name used by this plugin was `.env`, but now it is `.in`. This is done in order not to conflict with `.env` files from numerous projects.\n\n#### Autoenv automatically sources (known/whitelisted) `.in` and `.out` files.\n\nThis plugin adds support for enter and leave events. By default `.in` files are used when entering a directory, and `.out` files when leaving a directory. And you can set variable `CLICOLOR=1` for enabling colored output.\n\nThe environment variables `$AUTOENV_IN_FILE` \u0026 `$AUTOENV_OUT_FILE` can be used\nto override the default values for the file names of `.in` \u0026 `.out` respectively.\n\n![](term.png)\n\n## Example of use\n\n- If you are in the directory `/home/user/dir1` and execute `cd /var/www/myproject` this plugin will source the following files if they exist\n\n```\n/home/user/dir1/.out\n/home/user/.out\n/home/.out\n/var/.in\n/var/www/.in\n/var/www/myproject/.in\n```\n\n- If you are in the directory `/` and execute `cd /home/user/dir1` this plugin will source the following files if they exist\n\n```\n/home/.in\n/home/user/.in\n/home/user/dir1/.in\n```\n\n- If you are in the directory `/home/user/dir1` and execute `cd /` this plugin will source the following files if they exist\n\n```\n/home/user/dir1/.out\n/home/user/.out\n/home/.out\n```\n\n## Examples of `.in` and `.out` files\n\nPlease, don't use `pwd` or `$PWD`, instead of this use `$(dirname $0)`. Additionally, the path of the directory being entered or exited is passed as the first argument to both `.in` and `.out` scripts, should using a symlink be preferred.\n\n### For node.js developing:\n\n### .in\n\n```sh\nnvm use node\nOLDPATH=$PATH\nexport PATH=\"$(dirname $0)/node_modules/.bin\":$PATH\n```\n\n### .out\n\n```sh\nnvm use system\nexport PATH=$OLDPATH\n```\n\n### For projects with `.env` or/and `.env.local`\n\n```sh\nsource $(dirname $0)/.env*\n```\n\n## Prerequisites\n\n#### This plugin depends on [zsh-colors](https://github.com/zpm-zsh/colors).\n\nIf you don't use [zpm](https://github.com/zpm-zsh/zpm), install it manually and activate it before this plugin. \nIf you use zpm you don’t need to do anything\n\n\n## Installation\n\n### Using [zpm](https://github.com/zpm-zsh/zpm)\n\nAdd `zpm load zpm-zsh/autoenv` into `.zshrc`\n\n### Using [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh)\n\nExecute `git clone https://github.com/zpm-zsh/autoenv ~/.oh-my-zsh/custom/plugins/autoenv`. Add `autoenv` into plugins array in `.zshrc`\n\n### Using [Fig](https://fig.io)\n\nFig adds apps, shortcuts, and autocomplete to your existing terminal.\n\nInstall `autoenv` in just one click.\n\n\u003ca href=\"https://fig.io/plugins/other/autoenv_zpm-zsh\" target=\"_blank\"\u003e\u003cimg src=\"https://fig.io/badges/install-with-fig.svg\" /\u003e\u003c/a\u003e\n\n### Using [antigen](https://github.com/zsh-users/antigen)\n\nAdd `antigen bundle zpm-zsh/autoenv` into `.zshrc`\n\n### Using [zgen](https://github.com/tarjoilija/zgen)\n\nAdd `zgen load zpm-zsh/autoenv` into `.zshrc`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzpm-zsh%2Fautoenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzpm-zsh%2Fautoenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzpm-zsh%2Fautoenv/lists"}