{"id":17325034,"url":"https://github.com/otaviof/path-helper","last_synced_at":"2026-05-02T05:10:13.613Z","repository":{"id":57649616,"uuid":"210131841","full_name":"otaviof/path-helper","owner":"otaviof","description":"Configurable command-line helper to generate PATH and MANPATH based on /etc/paths.d and /etc/manpaths.d","archived":false,"fork":false,"pushed_at":"2024-02-10T18:03:35.000Z","size":187,"stargazers_count":6,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-30T23:11:49.022Z","etag":null,"topics":["command-line","path","shell"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/otaviof.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":"2019-09-22T10:54:44.000Z","updated_at":"2024-01-27T03:17:35.000Z","dependencies_parsed_at":"2024-06-20T10:23:37.137Z","dependency_job_id":"c76e4029-b433-461c-86b7-7570db696b1f","html_url":"https://github.com/otaviof/path-helper","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/otaviof/path-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otaviof%2Fpath-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otaviof%2Fpath-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otaviof%2Fpath-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otaviof%2Fpath-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/otaviof","download_url":"https://codeload.github.com/otaviof/path-helper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otaviof%2Fpath-helper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263108721,"owners_count":23415001,"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":["command-line","path","shell"],"created_at":"2024-10-15T14:12:16.250Z","updated_at":"2026-05-02T05:10:13.582Z","avatar_url":"https://github.com/otaviof.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca alt=\"GitHub Actions CI\" href=\"https://github.com/otaviof/path-helper/actions\"\u003e\n        \u003cimg src=\"https://github.com/otaviof/path-helper/actions/workflows/test.yaml/badge.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca alt=\"go.pkg.dev project documentation\" href=\"https://pkg.go.dev/mod/github.com/otaviof/path-helper\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/go.pkg.dev-docs-007d9c?logo=go\u0026logoColor=white\"\u003e\n    \u003c/a\u003e\n    \u003ca alt=\"goreportcard.com project report\" href=\"https://goreportcard.com/report/github.com/otaviof/path-helper\"\u003e\n        \u003cimg src=\"https://goreportcard.com/badge/github.com/otaviof/path-helper\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n# `path-helper`\n\nCommand-line application to generate `PATH` and `MANPATH` environment variables based on a configuration directory, the same approach used in MacOS.\n\nBy default, `PATH` is genarated based in `/etc/paths.d` directory, while `MANPATH` is based on `/etc/manpaths.d`, you can configure these locations.\n\nFiles created on these directories are listed alphabetically, each line in a file corresponds to a another directory that should become part of `PATH` and `MANPATH`.\n\nConfiguration files may as well contain environment variables which will be expanded during execution.\n\nPlease consider the local example of [`paths.d`](./test/paths.d).\n\nIn short, the usage of `path-helper` is:\n\n```bash\neval `path-helper`\n```\n\n## Install\n\nThe most convenient way would be:\n\n```sh\ncurl -sL https://raw.githubusercontent.com/otaviof/path-helper/main/hack/install-lastest-release.sh | sh\n```\n\nThis process is [automated by this script](./hack/install-lastest-release.sh), you should consider running on your repository clone, i.e.:\n\n```sh\nhack/install-lastest-release.sh\n```\n\nTo install `path-helper` consider the [release page][releaseURL] and download pre-compiled binaries for your platform. Once the tarball is downloaded, you need to extract and install on the desired location, like the example snippet below\n\n```sh\ncd /tmp\ntar -zxvpf path-helper-ostype-arch.tar.gz path-helper\ninstall -m 0755 path-helper /usr/local/bin/path-helper\n```\n\n## Usage Examples\n\nPlease consider `--help` to see all possible options:\n\n```bash\npath-helper --help\n```\n\nSkipping duplicated entries, if any:\n\n```bash\npath-helper -s\n```\n\nSkipping non-existing directory:\n\n```bash\npath-helper -d\n```\n\n### Shell Configuration Example\n\nEvaluate `path-helper` output in order to export `PATH` and `MANPATH` environment variables. The following example checks if `path-helper` is present in default location, and later runs `eval` against:\n\n```sh\ndeclare -r PATH_HELPER_BIN=\"/usr/local/bin/path-helper\"\n\n[[ -x \"${PATH_HELPER_BIN}\" ]] \u0026\u0026\n    eval \"$(${PATH_HELPER_BIN})\"\n```\n\nRunning `path-helper` without `eval`, would print out the Shell script snippet it generateds. For instance:\n\n```\n$ path-helper\nPATH=\"...\" ; MANPATH=\"...\" ; export PATH MANPATH ;\n```\n\n[releaseURL]: https://github.com/otaviof/path-helper/releases/tag/0.1.1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotaviof%2Fpath-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fotaviof%2Fpath-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotaviof%2Fpath-helper/lists"}