{"id":15480950,"url":"https://github.com/pyronaur/zxb","last_synced_at":"2025-04-22T15:24:28.536Z","repository":{"id":65485583,"uuid":"446987486","full_name":"pyronaur/zxb","owner":"pyronaur","description":"A tool for managing scripts better","archived":false,"fork":false,"pushed_at":"2024-01-26T14:56:28.000Z","size":75,"stargazers_count":13,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T16:22:59.020Z","etag":null,"topics":["nodejs","shell","zx"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyronaur.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":"2022-01-11T21:32:48.000Z","updated_at":"2024-12-03T11:33:02.000Z","dependencies_parsed_at":"2024-10-02T05:00:55.297Z","dependency_job_id":null,"html_url":"https://github.com/pyronaur/zxb","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyronaur%2Fzxb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyronaur%2Fzxb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyronaur%2Fzxb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyronaur%2Fzxb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyronaur","download_url":"https://codeload.github.com/pyronaur/zxb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250265567,"owners_count":21402131,"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":["nodejs","shell","zx"],"created_at":"2024-10-02T05:00:50.919Z","updated_at":"2025-04-22T15:24:28.517Z","avatar_url":"https://github.com/pyronaur.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🪣 zxb\n\n*a bucket for your zx scripts*\n\n**zxb** is a [zx](https://github.com/google/zx) script manager to help you write, use, edit and even share zx scripts quickly.\n\nOne of the things I love most about being a developer is continuous improvement. **zx** made writing shell scripts for everyday tasks fun again. But that introduced a new problem - where do I place all my scripts? How do I run them? What did I call that thing I wrote last month? Where did I place it?\n\nWriting shell scripts with **zx** is so easy that it became difficult to manage all of them. That's why I decided to build **zxb**.\n\nJust like **zx** helps you write shell scripts better, **zxb** helps you manage what you've written better.\n\n\n\n## 🚀 Quick Start\n\n1. [Install zx](https://github.com/google/zx#install) first:\n\n```\nnpm i -g zx\n```\n\n2. Run the install script:\n\n```\nzx https://raw.githubusercontent.com/pyronaur/zxb/main/src/inc/install.mjs\n```\n\n3. Reload terminal and load `zxb` for the first time. Done!\n\n### 🤖 Your first script\n\nCreate a new **zxb** managed script by running.\n\nI'll create an ls command that will list files only by your specified extension. Call it **lse**.\n```\nzxb lse\n```\n\nThis will create a `lse.mjs` file in your directory and link it up as a bin so that you can run it from anywhere as `lse` command.\n\nNow add in a bit script magic:\n\n```js\n#!/usr/bin/env zx\nconst ext = argv._[1];\nconst ls = await globby(`*.${ext}`);\nconsole.log(ls.join(\"\\n\"));\n```\n\nThat's it!\n\n## 🧻 Documentation\n\n **Available commands:**\n\n `zxb link [--force]`\n Ensure all your script files have an executable in the bin directory.\n \n `zxb install \u003curl\u003e`\n Install a remote `zx` script and save it locally.\n \n `zxb add_source`\n Add an additional directory to use as a script source.\n\n `zxb clean`\n Remove bin files from the bin directory that don't have a matching script.\n\n `zxb create \u003cscript-name\u003e`\n Create a new script\n\n `zxb edit [script-name]`\n Edit scripts. If no script name is specified, will open all scripts and the ~/.zxb directory\n\n `zxb remove \u003cscript-name\u003e`\n Remove and unlink a script\n\n `zxb list | zxb ls`\n List all known scripts.\n\n `zxb update`\n Update zxb from GitHub\n\n\n## 🎨 Customization\n\n### Code Editor\n\n`zxb` is going to try to use your `EDITOR` environment variable and fall back to **VSCode** as the editor when opening script files.\n\nYou must have [VSCode CLI Tools](https://code.visualstudio.com/docs/editor/command-line) installed for files to be opened automatically in VSCode.\n\nIn your shell configuration file, set an `EDITOR` environment variable:\n\n```sh\n# In .zshrc or .bashrc\nexport EDITOR=\"/usr/bin/vim\"\n```\n \n**Note:**\nVSCode supports both of these commands:\n```sh\n\u003e code /path/to/scripts/my-script.mjs\n\u003e code /path/to/scripts\n```\n\nSo if you want your editor to work properly, make sure it can accept both a path to a single script file and a path to a directory. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyronaur%2Fzxb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyronaur%2Fzxb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyronaur%2Fzxb/lists"}