{"id":13609262,"url":"https://github.com/babashka/bbin","last_synced_at":"2025-04-05T02:08:22.547Z","repository":{"id":59947071,"uuid":"527038368","full_name":"babashka/bbin","owner":"babashka","description":"Install any Babashka script or project with one command","archived":false,"fork":false,"pushed_at":"2024-10-20T16:07:21.000Z","size":318,"stargazers_count":143,"open_issues_count":26,"forks_count":9,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-29T01:13:06.242Z","etag":null,"topics":["babashka","bash","bbin","cli","clojure","clojurescript","linux","macos","package-manager","shell","windows","zsh"],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/babashka.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-08-20T20:58:10.000Z","updated_at":"2025-03-17T09:49:27.000Z","dependencies_parsed_at":"2024-05-05T23:30:42.232Z","dependency_job_id":"68d414b8-9f8a-46d7-b7aa-1f4c7d1b844e","html_url":"https://github.com/babashka/bbin","commit_stats":{"total_commits":249,"total_committers":8,"mean_commits":31.125,"dds":0.08032128514056225,"last_synced_commit":"0dcfdadba28f38f01d86f30a10c70d73076420c7"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babashka%2Fbbin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babashka%2Fbbin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babashka%2Fbbin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babashka%2Fbbin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babashka","download_url":"https://codeload.github.com/babashka/bbin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276164,"owners_count":20912288,"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":["babashka","bash","bbin","cli","clojure","clojurescript","linux","macos","package-manager","shell","windows","zsh"],"created_at":"2024-08-01T19:01:33.676Z","updated_at":"2025-04-05T02:08:22.531Z","avatar_url":"https://github.com/babashka.png","language":"Clojure","readme":"# bbin\n\n**Install any Babashka script or project with one command.**\n\n```\n$ bbin install io.github.babashka/neil\n{:lib io.github.babashka/neil,\n :coords\n {:git/url \"https://github.com/babashka/neil\",\n  :git/tag \"v0.1.45\",\n  :git/sha \"0474d4cb5cfb0207265a4508a0e82ae7a293ab61\"}}\n\n$ neil --version\nneil 0.1.45\n\n$ bbin install https://gist.githubusercontent.com/rads/da8ecbce63fe305f3520637810ff9506/raw/25e47ce2fb5f9a7f9d12a20423e801b64c20e787/portal.clj\n{:coords {:bbin/url \"https://gist.githubusercontent.com/rads/da8ecbce63fe305f3520637810ff9506/raw/25e47ce2fb5f9a7f9d12a20423e801b64c20e787/portal.clj\"}}\n\n# Open a Portal window with all installed scripts\n$ portal \u003c(bbin ls)\n```\n\n📦 See the [**Scripts and Projects**](https://github.com/babashka/bbin/wiki/Scripts-and-Projects) wiki page for a list of CLI tools from the community. This list is just a starting point — any existing Babashka script or project can be installed out-of-the-box!\n\n📚 See the [**Usage**](#usage) and [**CLI**](#cli) docs for more examples of what `bbin` can do.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Docs](#docs)\n- [CLI](#cli)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\n### Homebrew (Linux and macOS)\n\n**1. Install via `brew`:**\n```shell\nbrew install babashka/brew/bbin\n```\n\n**2. Add `~/.local/bin` to `PATH`:**\n```shell\necho 'export PATH=\"$PATH:$HOME/.local/bin\"' \u003e\u003e ~/.$(basename $SHELL)rc \u0026\u0026 exec $SHELL\n```\n\n### Scoop (Windows)\n\n**1. Install `bbin` CLI:**\n```shell\nscoop bucket add scoop-clojure https://github.com/littleli/scoop-clojure\nscoop install bbin\n```\n\nThe Scoop package will automatically update your `Path` with `%HOMEDRIVE%%HOMEPATH%\\.local\\bin`, but you will have to restart your terminal for this to take effect.\n\n### Manual (Linux, macOS, and Windows)\n\n[Click here for manual installation instructions.](docs/installation.md#manual-linux-and-macos)\n\n## Usage\n\n```\n# Install a script from a qualified lib name\n$ bbin install io.github.babashka/neil\n$ bbin install io.github.rads/watch --latest-sha\n$ bbin install org.babashka/http-server --mvn/version 0.1.11\n\n# Install an auto-generated CLI from a namespace of functions\n$ bbin install io.github.borkdude/quickblog --tool --ns-default quickblog.api\n\n# Install a script from a URL\n$ bbin install https://gist.githubusercontent.com/rads/da8ecbce63fe305f3520637810ff9506/raw/25e47ce2fb5f9a7f9d12a20423e801b64c20e787/portal.clj\n$ bbin install https://github.com/babashka/http-server/releases/download/v0.1.11/http-server.jar\n\n# Install a script from a Git repo\n$ bbin install https://gist.github.com/1d7670142f8117fa78d7db40a9d6ee80.git\n$ bbin install git@gist.github.com:1d7670142f8117fa78d7db40a9d6ee80.git\n\n# Install a script from a local file\n$ bbin install foo.clj\n$ bbin install http-server.jar\n\n# Install a script from a local root (with no lib name)\n$ git clone https://github.com/babashka/bbin.git ~/src/bbin\n$ bbin install ~/src/bbin --as bbin-dev\n\n# Install a script from a local root (with lib name)\n$ bbin install io.github.babashka/bbin --local/root ~/src/bbin --as bbin-dev\n\n# Remove a script\n$ bbin uninstall watch\n\n# Show installed scripts\n$ bbin ls\n\n# Show the bin path\n$ bbin bin\n```\n\n## Docs\n\n- [CLI Docs](#cli)\n- [FAQ](docs/faq.md)\n- [Design Docs](docs/design.md)\n- [Community Scripts and Projects](https://github.com/babashka/bbin/wiki/Scripts-and-Projects)\n- [Auto-Completion](docs/auto-completion.md)\n\n## CLI\n\n- [`bbin install [script]`](#bbin-install-script)\n- [`bbin uninstall [script]`](#bbin-uninstall-script)\n- [`bbin ls`](#bbin-ls)\n- [`bbin bin`](#bbin-bin)\n- [`bbin version`](#bbin-version)\n- [`bbin help`](#bbin-help)\n\n---\n\n### `bbin install [script]`\n\n**Install a script**\n\n- By default, scripts will be installed to `~/.local/bin`\n    - If `$BABASHKA_BBIN_BIN_DIR` is set, then use `$BABASHKA_BBIN_BIN_DIR` (explicit override)\n- Each bin script is a self-contained shell script that fetches deps and invokes `bb` with the correct arguments.\n- The bin scripts can be configured using the CLI options or the `:bbin/bin` key in `bb.edn`\n- [See the FAQ for additional info on setting up your code to work with bbin](docs/faq.md#how-do-i-get-my-software-onto-bbin)\n\n**Example `bb.edn` Config:**\n\n```clojure\n{:bbin/bin {neil {:main-opts [\"-f\" \"neil\"]}}}\n```\n\n**Supported Options:**\n\n*Note:* `bbin` will throw an error if conflicting options are provided, such as using both `--git/sha` and `--mvn/version` at the same time.\n\nIf no `--git/tag` or `--git/sha` is provided, the latest tag from the Git repo will be used. If no tags exist, the latest SHA will be used.\n\n- `--as`\n    - The name of the script to be saved in the `bbin bin` path\n- `--git/sha`\n    - The SHA for a Git repo\n- `--git/tag`\n    - The tag for a Git repo\n- `--git/url`\n    - The URL for a Git repo\n- `--latest-sha`\n    - If provided, find the latest SHA from the Git repo\n- `--local/root`\n    - The path of a local directory containing a `deps.edn` file\n- `--main-opts`\n    - The provided options (EDN format) will be passed to the `bb` command-line when the installed script is run\n    - By default, `--main-opts` will be set to `[\"-m\" ...]`, inferring the main function from the lib name\n    - For example, if you provide a lib name like `io.github.rads/watch`, `bbin` will infer `rads.watch/-main`\n    - Project authors can provide a default in the `:bbin/bin` key in `bb.edn`\n- `--mvn/version`\n    - The version of a Maven dependency\n- `--ns-default`\n    - The namespace to use to find functions (tool mode only)\n    - Project authors can provide a default in the `:bbin/bin` key in `bb.edn`\n- `--tool`\n    - If this option is provided, the script will be installed using **tool mode**\n    - When enabled, the installed script acts as an entry point for functions in a namespace, similar to `clj -T`\n    - If no function is provided, the installed script will infer a help message based on the function docstrings\n---\n\n### `bbin uninstall [script]`\n\n**Remove a script**\n\n---\n\n### `bbin ls`\n\n**List installed scripts**\n\n---\n\n### `bbin bin`\n\n**Display bbin bin folder**\n\n- The default folder is `~/.local/bin`\n\n---\n\n### `bbin version`\n\n**Display bbin version**\n\n---\n\n### `bbin help`\n\n**Display bbin help**\n\n---\n\n### `bbin migrate`\n\n**Migrate from bbin v0.1.x**\n\n---\n\n## Dev\n\n-To install a development version of bbin, first install bbin stable, then install bbin with bbin.\n\n```\n$ bbin install . --as bbin-dev --main-opts '[\"-m\" babashka.bbin.cli/-main]'\n```\n\nYou can now run your development copy of bbin with `bbin-dev`.\nRebuilding is not required for `bbin-dev` installed this way, changes in Clojure source code is reflected instantly.\n\n## Contributing\n\nIf you'd like to contribute to `bbin`, you're welcome to create [issues for ideas, feature requests, and bug reports](https://github.com/babashka/bbin/issues).\n\n## License\n\n`bbin` is released under the [MIT License](LICENSE).\n","funding_links":[],"categories":["Clojure"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabashka%2Fbbin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabashka%2Fbbin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabashka%2Fbbin/lists"}