{"id":27165783,"url":"https://github.com/sheluchin/bb-fzf","last_synced_at":"2025-04-10T03:49:40.670Z","repository":{"id":286549595,"uuid":"960055629","full_name":"sheluchin/bb-fzf","owner":"sheluchin","description":"Babashka Tasks Fuzzy Picker","archived":false,"fork":false,"pushed_at":"2025-04-03T19:37:24.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T05:43:48.092Z","etag":null,"topics":["babashka","clojure","fzf","interactive","tasks"],"latest_commit_sha":null,"homepage":"https://fnguy.com/bb-fzf.html","language":"Clojure","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/sheluchin.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-03T19:36:42.000Z","updated_at":"2025-04-03T21:48:00.000Z","dependencies_parsed_at":"2025-04-07T05:43:49.989Z","dependency_job_id":"4284a406-a002-45f6-ae8d-d3bccb838b95","html_url":"https://github.com/sheluchin/bb-fzf","commit_stats":null,"previous_names":["sheluchin/bb-fzf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheluchin%2Fbb-fzf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheluchin%2Fbb-fzf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheluchin%2Fbb-fzf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheluchin%2Fbb-fzf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sheluchin","download_url":"https://codeload.github.com/sheluchin/bb-fzf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247969032,"owners_count":21025903,"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","clojure","fzf","interactive","tasks"],"created_at":"2025-04-09T03:20:50.733Z","updated_at":"2025-04-09T03:20:51.557Z","avatar_url":"https://github.com/sheluchin.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bb-fzf: Select and Run Babashka Tasks with fzf\n\n`bb-fzf` is a Babashka script that uses `fzf` to provide an interactive\ninterface for selecting and running Babashka tasks defined in a `bb.edn` file.\nIt simplifies the process of executing tasks, especially those requiring a\nsingle argument. As a bonus, it allows you to execute your repo's bb tasks from\nany sub-directory in your repo.\n\nIt uses a single dependency, [bling](https://github.com/paintparty/bling), for pretty printing.\n\nThere's a demo gif and some more writeup on my [blog][].\n\n## Prerequisites\n\nBefore using `bb-fzf`, ensure you have the following installed:\n\n1.  **Babashka:** A native Clojure scripting environment. Installation\n        instructions can be found on the [Babashka website][].\n2.  **fzf:** A command-line fuzzy finder. Installation instructions are\n        available on the [fzf GitHub repository][].\n\n## Installation\n\n1.  **Download the script:** Obtain the `bb_fzf.clj` script. You can clone\n        the repository or download the file directly.\n2.  **Make it executable:**\n    ```bash\n    chmod +x bb_fzf.clj\n    ```\n3.  **Place it in your PATH:** Move the script to a directory included in\n        your system's `PATH` environment variable (e.g., `~/.local/bin`,\n`/usr/local/bin`) so you can call it from anywhere.\n    ```bash\n    # Example: moving to ~/.local/bin (create if it doesn't exist)\n    mkdir -p ~/.local/bin\n    mv bb_fzf.clj ~/.local/bin/bb-fzf # Renaming for convenience\n    ```\n    Ensure `~/.local/bin` is in your `PATH`. You might need to add `export\n    PATH=\"$HOME/.local/bin:$PATH\"` to your shell configuration file (e.g.,\n    `~/.bashrc`, `~/.zshrc`) and restart your shell or run `source ~/.bashrc` /\n    `source ~/.zshrc`.\n\n## Usage\n\nNavigate to any directory containing a `bb.edn` file with defined tasks. Run\nthe script:\n\n```bash\nbb-fzf\n```\n\nThis will launch the `fzf` interface, displaying the available public tasks from your `bb.edn`.\n\n- Use arrow keys or type to filter and select a task.\n- Press `Enter` to choose a task.\n- If the selected task appears to require an argument (based on the presence of\n  `*command-line-args*` in its definition), you will be prompted to enter the\n  argument. If you don't provide one, the task will run without it.\n- The script will execute the selected task using `bb \u003ctask-name\u003e [argument]`\n  and display the output (stdout or stderr) along with a success/error/warning\n  status.\n- Press `Esc` in the `fzf` interface to cancel.\n\n## Keyboard Binding (Bash Example)\n\nTo invoke `bb-fzf` easily from any directory using a keyboard shortcut, you\ncan add the script to your `PATH` and add a keyboard binding for it.\n\n```bash\n# adds Ctrl+b as a binding to bring up the picker\n$ bind -x '\"\\C-b\": bb_fzf.clj'\n```\n\nAfter setting up the binding and reloading your configuration, navigating to a\ndirectory with a `bb.edn` and pressing your chosen shortcut (e.g., `Ctrl+B`)\nshould launch the `bb-fzf` interface.\n\n\n[Babashka website]: https://book.babashka.org/#_installation\n[fzf GitHub repository]: https://github.com/junegunn/fzf?tab=readme-ov-file#installation\n[blog]: https://fnguy.com/bb-fzf.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheluchin%2Fbb-fzf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsheluchin%2Fbb-fzf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheluchin%2Fbb-fzf/lists"}