{"id":13503265,"url":"https://github.com/basherpm/basher","last_synced_at":"2025-04-08T12:07:31.491Z","repository":{"id":9132228,"uuid":"10921102","full_name":"basherpm/basher","owner":"basherpm","description":"A package manager for shell scripts.","archived":false,"fork":false,"pushed_at":"2024-04-03T16:34:58.000Z","size":219,"stargazers_count":1191,"open_issues_count":17,"forks_count":76,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-01T10:15:55.968Z","etag":null,"topics":["bash","basher","package-manager","shell","shell-script","zsh"],"latest_commit_sha":null,"homepage":"https://www.basher.it/","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/basherpm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2013-06-24T21:45:00.000Z","updated_at":"2025-03-26T11:14:31.000Z","dependencies_parsed_at":"2024-01-23T16:08:10.131Z","dependency_job_id":"e17b09e7-21b8-4af8-9793-c31c86fe3f07","html_url":"https://github.com/basherpm/basher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basherpm%2Fbasher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basherpm%2Fbasher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basherpm%2Fbasher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basherpm%2Fbasher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basherpm","download_url":"https://codeload.github.com/basherpm/basher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247838444,"owners_count":21004580,"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","basher","package-manager","shell","shell-script","zsh"],"created_at":"2024-07-31T22:02:44.040Z","updated_at":"2025-04-08T12:07:31.473Z","avatar_url":"https://github.com/basherpm.png","language":"Shell","readme":"# basher\n\nA package manager for shell scripts and functions.\n\nBasher allows you to quickly install shell packages directly from github (or\nother sites). Instead of looking for specific install instructions for each\npackage and messing with your path, basher will create a central location for\nall packages and manage their binaries for you.\n\nEven though it is called basher, it also works with zsh and fish.\n\n[![Build Status](https://travis-ci.org/basherpm/basher.svg?branch=master)](https://travis-ci.org/basherpm/basher)\n\n## Installation\n\nYou can install Basher in 1 line. This will install Basher, and add it to your .bashrc/.zshrc file - in a way that can automatically be uninstalled later:\n\n\tcurl -s https://raw.githubusercontent.com/basherpm/basher/master/install.sh | bash\n\n#### Install on Mac OSX\n \nBasher requires `bash \u003e= 4`, and the `realpath` utility from `coreutils`. On\nosx you can install both with brew:\n\n```\n$ brew install bash coreutils\n```\n\n#### Manual method to Install\n\n1. Checkout basher on `~/.basher`\n\n    ~~~ sh\n    $ git clone --depth=1 https://github.com/basherpm/basher.git ~/.basher\n    ~~~\n\n2. Initialize basher in your shell initialization\n\n    ~~~ sh\n    export PATH=\"$HOME/.basher/bin:$PATH\"\n    eval \"$(basher init - bash)\" # replace `bash` with `zsh` if you use zsh\n    ~~~\n\n    **Fish**: Use the following commands instead:\n\n    ~~~ sh\n    if test -d ~/.basher\n      set basher ~/.basher/bin\n    end\n    set -gx PATH $basher $PATH\n    status --is-interactive; and . (basher init - fish|psub)\n    ~~~\n\n\n## Updating\n\nGo to the directory where you cloned basher and pull the latest changes:\n\n~~~ sh\n$ cd ~/.basher\n$ git pull\n~~~\n\n## Usage\n\n### Installing packages from Github\n\n~~~ sh\n$ basher install sstephenson/bats\n~~~\n\nThis will install bats from https://github.com/sstephenson/bats and add `bin/bats` to the PATH.\n\n### Installing packages from other sites\n\n~~~ sh\n$ basher install bitbucket.org/user/repo_name\n~~~\n\nThis will install `repo_name` from https://bitbucket.org/user/repo_name\n\n### Using ssh instead of https\n\nIf you want to do local development on installed packages and you have ssh\naccess to the site, use `--ssh` to override the protocol:\n\n~~~ sh\n$ basher install --ssh juanibiapina/gg\n~~~\n\n### Installing a local package\n\nIf you develop a package locally and want to try it through basher,\nuse the `link` command:\n\n~~~ sh\n$ basher link directory my_namespace/my_package\n~~~\n\nThe `link` command will install the dependencies of the local package.\nYou can prevent that with the `--no-deps` option:\n\n~~~ sh\n$ basher link --no-deps directory my_namespace/my_package\n~~~\n\n### Sourcing files from a package into current shell\n\nBasher provides an `include` function that allows sourcing files into the\ncurrent shell. After installing a package, you can run:\n\n```\ninclude username/repo lib/file.sh\n```\n\nThis will source a file `lib/file.sh` under the package `username/repo`.\n\n### Command summary\n\n- `basher commands` - List commands\n- `basher help \u003ccommand\u003e` - Display help for a command\n- `basher uninstall \u003cpackage\u003e` - Uninstall a package\n- `basher list` - List installed packages\n- `basher outdated` - List packages which are not in the latest version\n- `basher upgrade \u003cpackage\u003e` - Upgrade a package to the latest version\n\n### Configuration options\n\nTo change the behavior of basher, you can set the following variables either\nglobally or before each command:\n\n- If `$XDG_DATA_HOME/basher` is a directory, then `$BASHER_ROOT` will be set to `$XDG_DATA_HOME/basher` instead of the usual `$HOME/.basher`. If `$XDG_DATA_HOME` is not set or is empty, then it defaults to `~/.local/share`.\n- `BASHER_FULL_CLONE=true` - Clones the full repo history instead of only the last commit (useful for package development)\n- `BASHER_PREFIX` - set the installation and package checkout prefix (default is `$BASHER_ROOT/cellar`).  Setting this to `/usr/local`, for example, will install binaries to `/usr/local/bin`, manpages to `/usr/local/man`, completions to `/usr/local/completions`, and clone packages to `/usr/local/packages`.  This allows you to manage \"global packages\", distinct from individual user packages.\n\n## Packages\n\nPackages are simply repos (username/repo). You may also specify a site\n(site/username/repo).\n\nAny files inside a bin directory are added to the path. If there is no bin\ndirectory, any executable files in the package root are added to the path.\n\nAny manpages (files ended in `\\.[0-9]`) inside a `man` directory are added\nto the manpath.\n\nOptionally, a repo might contain a `package.sh` file which specifies binaries,\ndependencies and completions in the following format:\n\n~~~ sh\nBINS=folder/file1:folder/file2.sh\nDEPS=user1/repo1:user2/repo2\nBASH_COMPLETIONS=completions/package\nZSH_COMPLETIONS=completions/_package\n~~~\n\nBINS specified in this fashion have higher precedence then the inference rules\nabove.\n\n### Package Directory\n\nA list of working packages can be found on https://www.basher.it/. There\nyou can also find a badge if you want to include it in your readme:\n\n[![basher install](https://img.shields.io/badge/basher-install-white?logo=gnu-bash\u0026style=flat)](https://www.basher.it/package/)\n","funding_links":[],"categories":["Shell","Tools","Package Managers","bash","Package Managers and Tools","Shell Package Management"],"sub_categories":["Bash","Universal","Reusable Things","Directory Navigation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasherpm%2Fbasher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasherpm%2Fbasher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasherpm%2Fbasher/lists"}