{"id":13760512,"url":"https://github.com/pablopunk/bashy","last_synced_at":"2025-04-22T18:27:50.539Z","repository":{"id":54977442,"uuid":"91913248","full_name":"pablopunk/bashy","owner":"pablopunk","description":"Extremely fast and simple git prompt for bash and zsh","archived":false,"fork":false,"pushed_at":"2023-11-01T23:11:12.000Z","size":30,"stargazers_count":45,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T05:12:15.582Z","etag":null,"topics":["bash","bashy","command","git","prompt","repo","terminal","zsh"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/bashy","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/pablopunk.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"pablopunk","custom":"https://pablo.im/fund"}},"created_at":"2017-05-20T20:00:30.000Z","updated_at":"2023-11-01T23:11:16.000Z","dependencies_parsed_at":"2024-01-13T10:41:35.907Z","dependency_job_id":"2a057d5e-78f5-440c-95ca-40562062ba69","html_url":"https://github.com/pablopunk/bashy","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablopunk%2Fbashy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablopunk%2Fbashy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablopunk%2Fbashy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablopunk%2Fbashy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pablopunk","download_url":"https://codeload.github.com/pablopunk/bashy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250296569,"owners_count":21407043,"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":["bash","bashy","command","git","prompt","repo","terminal","zsh"],"created_at":"2024-08-03T13:01:11.828Z","updated_at":"2025-04-22T18:27:50.513Z","avatar_url":"https://github.com/pablopunk.png","language":"Shell","readme":"# Bashy ⚡️⌨️\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/bashy\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/bashy.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003eExtremely fast and simple git prompt for bash\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/pablopunk/art/master/bashy/main.png\" /\u003e\u003c/p\u003e\n\n## Install\n\nYou can use the executable from this repo or install it with [npm](https://www.npmjs.com/)\n\n```bash\nnpm install -g bashy\n```\n\n## Usage\n\nIn your `~/.bashrc` (linux) or `~/.bash_profile` (MacOS) you need to add `bashy` to your `$PS1`:\n\n```bash\nexport PS1='$(bashy) $ '\n```\n\nThis example will give you the next prompt:\n\n```bash\nrepo at branch✓ $ # if you are in a git repo\nfolder $ # otherwise\n```\n\nYou can also choose a path relative to your home folder with the option `-r`:\n\n```bash\nexport PS1='$(bashy -r) $ '\n# results in\n~/repos/bashy at master $\n```\n\nNOTE: Since version *2.5.0* `bashy` does not support branch status on subdirectories of a repo. This decision meant a 2x increase in performance.\n\n## Benchmarks\n\nI've been a `zsh` user for a long time just for the prompts of `oh-my-zsh`. But because `oh-my-zsh` started to slow my prompt so much I decided to go back to `bash`  and make my own customizations.\n\nThe first tool I used to do so was `vcprompt`, but the speed was not improving a lot.\n\nIf we compare `bashy` to other tools like `vcprompt` we can see is much faster:\n\n```bash\n$ time vcprompt\nreal    0m0.094s\nuser    0m0.037s\nsys     0m0.024s\n\n$ time bashy\nreal    0m0.010s\nuser    0m0.004s\nsys     0m0.003s\n```\n\n\u003e Okay, `bashy` is faster but, come on, `0.094s` is still very fast.\n\n__Yes and no__. While times like those can be indistinguishable for humans, you can totally notice the difference in slower systems and also in fast terminal actions like:\n\n![vs_vcprompt](https://github.com/pablopunk/art/raw/master/bashy/vs_vcprompt.gif)\n\n## Customization\n\nOkay okay, you don't care so much about the performance because you love customization, and tools like `vcprompt` are very good at that. While `bashy` does not have a built in customization option, __it's extremely easy to customize__. Just edit the script, purely bash, and write your own icons there, add more colors, or even rearrange the branch name and directory. Your imagination is the limit here.\n\nYou can use your own modified version of bashy cloning this repo and linking it with npm:\n\n```bash\nnpm remove -g bashy                          # Uninstall the global bashy\ngit clone https://github.com/pablopunk/bashy # Clone this repo\ncd bashy\nnpm link                                     # Link\nbashy                                        # Use it!\n```\n\n## Zsh\n\nIf you still wanna use ZSH, __`bashy` will work as well as in bash__, but you need to set this option on your `.zshrc`: `setopt PROMPT_SUBST`.\n\n## Troubleshooting\n\n### Why is my `bashy` slow?\n\nI've run into this recently. If you install `bashy` with `npm` and you're using a version manager for node (like `asdf`, `nvm`, etc...), the executable is not longer `bashy` directly, but the manager executable try to find bashy and run it after, which takes a long time (easily half a second).\n\n## Author\n\n| ![me](https://www.gravatar.com/avatar/fa50aeff0ddd6e63273a068b04353d9d?s=100) |\n| ----------------------------------------------------------------------------- |\n| © 2017 [Pablo Varela](https://pablopunk.com)                                  |\n","funding_links":["https://github.com/sponsors/pablopunk","https://pablo.im/fund"],"categories":["Shell","Git and Version Control Systems"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablopunk%2Fbashy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpablopunk%2Fbashy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablopunk%2Fbashy/lists"}