{"id":49583866,"url":"https://github.com/ishbguy/bag","last_synced_at":"2026-05-03T21:37:17.481Z","repository":{"id":191655693,"uuid":"138307307","full_name":"ishbguy/bag","owner":"ishbguy","description":"A bash packages and plugins manager.","archived":false,"fork":false,"pushed_at":"2025-03-04T19:32:12.000Z","size":73,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-03T21:37:16.486Z","etag":null,"topics":["bash","cli","package-manager","plugin-manager","shell"],"latest_commit_sha":null,"homepage":null,"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/ishbguy.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":"2018-06-22T13:41:15.000Z","updated_at":"2025-03-04T19:32:15.000Z","dependencies_parsed_at":"2024-10-15T00:46:01.480Z","dependency_job_id":null,"html_url":"https://github.com/ishbguy/bag","commit_stats":null,"previous_names":["ishbguy/bag"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ishbguy/bag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishbguy%2Fbag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishbguy%2Fbag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishbguy%2Fbag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishbguy%2Fbag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ishbguy","download_url":"https://codeload.github.com/ishbguy/bag/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishbguy%2Fbag/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32586187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"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":["bash","cli","package-manager","plugin-manager","shell"],"created_at":"2026-05-03T21:37:16.811Z","updated_at":"2026-05-03T21:37:17.467Z","avatar_url":"https://github.com/ishbguy.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [bag](https://github.com/ishbguy/bag)\n\n[![Version][versvg]][ver] [![License][licsvg]][lic]\n\n[versvg]: https://img.shields.io/badge/version-v1.0.0-lightgrey.svg\n[ver]: https://img.shields.io/badge/version-v1.0.0-lightgrey.svg\n[licsvg]: https://img.shields.io/badge/license-MIT-green.svg\n[lic]: https://github.com/ishbguy/bag/blob/master/LICENSE\n\n**bag** is a bash package and plugin manager which inspired by [vim-plug](https://github.com/junegunn/vim-plug).\n\n## Table of Contents\n\n+ [:art: Features](#art-features)\n+ [:straight_ruler: Prerequisite](#straight_ruler-prerequisite)\n+ [:rocket: Installation](#rocket-installation)\n+ [:notebook: Usage](#notebook-usage)\n+ [:memo: Configuration](#memo-configuration)\n+ [:hibiscus: Contributing](#hibiscus-contributing)\n+ [:boy: Authors](#boy-authors)\n+ [:scroll: License](#scroll-license)\n\n## :art: Features\n\n+ Basic packges and plugins management: install, update or uninstall.\n+ Customizable to support different downloader: local repos, git repos or cloud drive repos.\n\n## :straight_ruler: Prerequisite\n\n\u003e + `bash` 4.2 or later\n\u003e + `git`\n\n## :rocket: Installation\n\n``` bash\n$ git clone https://github.com/ishbguy/bag /path/to/bag\n```\nor\n```bash\n$ curl -fLo /path/to/bag.sh --create-dirs \\\n         https://raw.githubusercontent.com/ishbguy/bag/master/bag.sh\n```\n\n## :notebook: Usage\n\nThe only action you need to do is to add below instruction in your bash config file: `~/.bashrc` or `~/.bash_profile`:\n\n```bash\n[[ -f /path/to/bag.sh ]] \u0026\u0026 source /path/to/bag.sh\n```\n\nAfter login `bash`, you can use `bag` command to manage packges and plugins. `bag help` will print usage.\n\n```\nbag v1.1.0\nbag \u003csubcmd\u003e [somthing]\n\nsubcmds:\n    agent                      agent for other package or repo operation cmd\n    base       [path]          change or list bags download directory\n    edit                       edit bag list\n    help                       show help message, like this output\n    install    [dl:url]        install a bag\n    link       \u003cpath\u003e \u003cdl:url\u003e add an existed package or repo by symbolic link\n    list                       list installed bags\n    load                       load all plugins and update PATH\n    plug       [dl:url]        add a bag plugin or list all plugins\n    uninstall  \u003cdl:url\u003e        uninstall a bag\n    unlink     \u003cdl:url\u003e        unlink a bag, just like uninstall\n    update     [pat]           update one or more bags\n    version                    show version number\n\n\u003cdl:url\u003e like 'gh:ishbguy/bag' means that it will install or update bag\nfrom https://github.com/ishbguy/bag by github downloader.\n\nIf \u003cdl:url\u003e prefix with '@' like '@gh:ishbguy/bag', that means it will run\nall the autoload/*.sh scripts under the bag directory.\n\nIf \u003cdl:url\u003e suffix with '#!.*' like 'gh:ishbguy/bag#!echo hello', that means\nit will run the post-install hook 'echo hello'.\n\ndownloaders:\n    file                       alias for local downloader\n    gh                         alias for github downloader\n    git                        downloader for git repo\n    github                     downloader for github repo\n    link                       downloader for local file or directory as symbolic link\n    local                      downloader for local file or directory\n\nbag list usage:\n\nbag list [options]\n\noptions:\n                               list without option will list all bags \u003cdl-url\u003e\n    -a|--all|all               list all bags include autoload notation(@)\n                               and post install cmd(#!)\n    -@|@|--autoload|autoload   list autoload bags without '@' or '#!' string\n    -p|--post|post             list bags configured post install cmd but\n                               without '#!' cmd string\n    -h|--help|help             print this help message\n\nbag agent usage:\n\nbag agent \u003caction\u003e [args..]\n\nactions:\n    add \u003ccmd\u003e       add an agent cmd, need to be quoted\n    del \u003ccmd-pat\u003e   delete an agent cmd, need to be quoted\n    run [cmd-pat]   run all or a pattern matched agent cmd\n    edit            edit the agent file\n    list            list all added agent cmd\n    help            print the bag agent help message like this\n\nThis program is released under the terms of MIT License.\nGet more infomation from \u003chttps://github.com/ishbguy/bag\u003e.\n```\n\n### Examples\n\n1. Use bag like other package management tools:\n\n```bash\nbag install gh:ishbguy/bag\nbag update gh:ihsbguy/bag\nbag uninstall gh:ishbguy/bag\n```\n\n2. Use bag as a plugin management tool, you need to add instructions to `~/.bashrc` or `~/.bash_profile`:\n\n```bash\nbag base $HOME/.bags\nbag plug gh:ishbguy/bag\nbag install\nbag load\n```\n\n3. Define your own `bag_downloader_XXX`\n\n```bash\n# Define your own github downloader\nbag_downloader_github() {\n    __bag_require git || return 1\n\n    # get two args\n    local bag_opt=\"$1\"\n    local bag_url=\"https://github.com/${2#*:}\"\n\n    local bag=$(__bag_get_bag_name \"$bag_url\")\n\n    # implement the install and update operations\n    case $bag_opt in\n        install) git clone \"$bag_url\" \"$BAG_BASE_DIR/$bag\" ;;\n        update) (cd \"$BAG_BASE_DIR/$bag\" \u0026\u0026 git pull) ;;\n        *) __bag_error \"No such option: $bag_opt\" ;;\n    esac\n}\n\n# Write the help message, then install it\nBAG_DOWNLOADER_HELP[github]=\"downloader for github repo\"\nBAG_DOWNLOADER[github]=\"bag_downloader_github\"\n```\n\n## :memo: Configuration\n\nThe default `BAG_BASE_DIR` is `$HOME/.bags`, you can change it by `bag base \u003cdir-path\u003e` or `export BAG_BASE_DIR=$DIR_PATH`.\n\n## :hibiscus: Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## :boy: Authors\n\n+ [ishbguy](https://github.com/ishbguy)\n\n## :scroll: License\n\nReleased under the terms of [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishbguy%2Fbag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fishbguy%2Fbag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishbguy%2Fbag/lists"}