{"id":28375917,"url":"https://github.com/magdyamr542/project-root","last_synced_at":"2026-04-13T08:30:59.372Z","repository":{"id":43480089,"uuid":"439831265","full_name":"magdyamr542/project-root","owner":"magdyamr542","description":"Faster way to jump to the root of your project","archived":false,"fork":false,"pushed_at":"2024-09-27T21:30:32.000Z","size":1907,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-29T23:35:06.875Z","etag":null,"topics":["cd","fast","go","navigate","project-root-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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magdyamr542.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}},"created_at":"2021-12-19T10:13:30.000Z","updated_at":"2024-09-27T21:30:36.000Z","dependencies_parsed_at":"2023-01-22T21:50:13.088Z","dependency_job_id":"083998e8-5835-4200-a752-1c956b9ab52f","html_url":"https://github.com/magdyamr542/project-root","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/magdyamr542/project-root","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magdyamr542%2Fproject-root","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magdyamr542%2Fproject-root/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magdyamr542%2Fproject-root/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magdyamr542%2Fproject-root/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magdyamr542","download_url":"https://codeload.github.com/magdyamr542/project-root/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magdyamr542%2Fproject-root/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31746101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T06:26:45.479Z","status":"ssl_error","status_checked_at":"2026-04-13T06:26:44.645Z","response_time":93,"last_error":"SSL_read: 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":["cd","fast","go","navigate","project-root-path","shell"],"created_at":"2025-05-29T23:36:55.203Z","updated_at":"2026-04-13T08:30:59.366Z","avatar_url":"https://github.com/magdyamr542.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"j Project root\n\n![example workflow](https://github.com/magdyamr542/project-root/actions/workflows/doBuild.yaml/badge.svg)\n\n[![ezgif.com-gif-maker578618f2773b60af.gif](https://s10.gifyu.com/images/ezgif.com-gif-maker578618f2773b60af.gif)](https://gifyu.com/image/SSISi)\n\n- [Project root](#project-root)\n\t- [Introduction](#introduction)\n\t\t\t- [Stop wasting your time with `cd ../`](#stop-wasting-your-time-with-cd-)\n\t- [Installation](#installation)\n\t- [Usage](#usage)\n\n## Introduction\n\n#### Stop wasting your time with `cd ../`\n\n- This enables you to return to the root directory of your project faster.\n- It's meant for people who find it annoying to type `cd ../` a lot of times `:D`\n- If you are in `./src/api/routes` you can simply use `pr` and you will automatically **cd** to the root of the project if its path was saved was `pr add` command.\n\n```\n.\n├── dist\n├── node_modules\n├── package.json\n├── src\n│   ├── api\n│   │   └── routes\n│   │       └── getProduct.ts\n│   └── utils\n│       └── array.ts\n└── tsconfig.json\n\n6 directories, 4 files\n```\n\n## Installation\n\n1. Run `mkdir ~/.proot`\n1. Run `touch entryPoint.sh`\n1. Put this in the file `entryPoint.sh`\n\n```bash\nfunction pr {\n    output=$(~/.proot/proot $@)\n    retCode=$?\n    if [[ ( $1 == \"go\" || $1 == \"\" || $1 == \"back\" || $1 == \"b\" || $1 == \"to\" || $1 == \"t\" ) \u0026\u0026 $retCode -eq 0 ]]; then\n        # cd when go or back command. hide output\n        cd $output\n    else\n        echo $output\n    fi\n    if [ $retCode -ne 0 ]; then\n        return $retCode\n    fi\n    \n}\n```\n\n1. Install the `proot` executable from [here](https://github.com/magdyamr542/project-root/releases/tag/2.0) and put it in the directory `~/.proot`\n1. Add `source ~/.proot/entryPoint.sh` to your `.bashrc` or `.zshrc`. (This step is important)\n1. Source your shell again or open a new terminal session.\n1. Use `pr --help`\n\n## Usage\n\n1. Use `pr add [path]` to save the current path as a project root.\n1. Use `pr` or `pr go` from any child directory of your project and you will jump to the root of the project as long as you saved its path like in step 1.\n1. Use `pr list` to list all saved project root paths.\n1. Use `pr purge` to delete any paths that were saved before but don't exist in the file system any more.\n1. Use `pr clear` to delete all saved paths. (use with **CAUTION**)\n1. Use `pr back` go back to the last path from which you used the `pr go` command\n    - let's say you are in `/home/user/project/src/utils` and you saved `/home/user/project/` as a project root\n    - Now you want to go back to the project root (to do something quickly) so you execute `pr go` or just `pr`\n    - What if you want to go back to `/home/user/project/src/utils` again to continue you work ? the `pr back` command helps with such case\n    - type `pr back` and it will cd to `/home/user/project/src/utils` automatically\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagdyamr542%2Fproject-root","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagdyamr542%2Fproject-root","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagdyamr542%2Fproject-root/lists"}