{"id":15209493,"url":"https://github.com/jdk2pq/auto-n-auto","last_synced_at":"2026-03-03T04:11:05.656Z","repository":{"id":247172109,"uuid":"823715295","full_name":"jdk2pq/auto-n-auto","owner":"jdk2pq","description":"Automatically run \"n auto\" when changing directories with zsh, but only when needed","archived":false,"fork":false,"pushed_at":"2024-07-07T04:18:15.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-23T18:07:00.382Z","etag":null,"topics":["automation","n","node","zsh"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdk2pq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-07-03T15:03:17.000Z","updated_at":"2024-07-07T04:18:19.000Z","dependencies_parsed_at":"2024-07-07T05:26:23.110Z","dependency_job_id":"79eed989-6d51-4e2c-96a5-17f78bd7a7fd","html_url":"https://github.com/jdk2pq/auto-n-auto","commit_stats":null,"previous_names":["jdk2pq/auto-n-auto"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jdk2pq/auto-n-auto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdk2pq%2Fauto-n-auto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdk2pq%2Fauto-n-auto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdk2pq%2Fauto-n-auto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdk2pq%2Fauto-n-auto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdk2pq","download_url":"https://codeload.github.com/jdk2pq/auto-n-auto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdk2pq%2Fauto-n-auto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30031981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T03:27:35.548Z","status":"ssl_error","status_checked_at":"2026-03-03T03:27:09.213Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["automation","n","node","zsh"],"created_at":"2024-09-28T07:40:26.286Z","updated_at":"2026-03-03T04:11:05.641Z","avatar_url":"https://github.com/jdk2pq.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# auto-n-auto\n\nA modified version of [runn](https://github.com/neemzy/runn) by [neemzy](https://github.com/neemzy)\n\nUses the [n](https://github.com/tj/n) Node.js version manager to switch Node.js versions automatically.\n\nRun `n auto` automatically while changing directories with `zsh`, but only if you need to according to [node-semver](https://github.com/npm/node-semver).\n\n## How it works\n\nThis is meant to be run upon `cd` to switch automatically while keeping it fast. I use `zsh` hooks to run the script on every directory change (configuration below).\n\nRunning this script will try to read a Node.js version from a `.n-node-version` file in the working directory, match the current version of Node against it, and run `n auto` if they do not match.\n\n## Setup\n\nPre req: make sure `n` is installed of course.\n\n```sh\ngit clone git@github.com:jdk2pq/auto-n-auto.git\npnpm i\n```\n\nAdd the following to your `.zshrc`:\n\n```sh\nautoload -U add-zsh-hook\n\nauto-n-auto() {\n  node path/to/auto-n-auto\n}\n\nadd-zsh-hook chpwd auto-n-auto\nauto-n-auto\n```\nFinally, run `source .zshrc` or restart your terminal, and it should work!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdk2pq%2Fauto-n-auto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdk2pq%2Fauto-n-auto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdk2pq%2Fauto-n-auto/lists"}