{"id":42795915,"url":"https://github.com/johnstonskj/rust-zsh-plugin-cli","last_synced_at":"2026-04-15T22:04:39.120Z","repository":{"id":333733362,"uuid":"1128453006","full_name":"johnstonskj/rust-zsh-plugin-cli","owner":"johnstonskj","description":"A command-line tool to generate new Zsh plugins.","archived":false,"fork":false,"pushed_at":"2026-03-13T23:47:33.000Z","size":220,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-14T10:42:40.100Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/johnstonskj.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-05T16:54:03.000Z","updated_at":"2026-03-13T23:47:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/johnstonskj/rust-zsh-plugin-cli","commit_stats":null,"previous_names":["johnstonskj/rust-zsh-plugin-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/johnstonskj/rust-zsh-plugin-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnstonskj%2Frust-zsh-plugin-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnstonskj%2Frust-zsh-plugin-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnstonskj%2Frust-zsh-plugin-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnstonskj%2Frust-zsh-plugin-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnstonskj","download_url":"https://codeload.github.com/johnstonskj/rust-zsh-plugin-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnstonskj%2Frust-zsh-plugin-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31861722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"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":[],"created_at":"2026-01-30T01:00:26.805Z","updated_at":"2026-04-15T22:04:39.114Z","avatar_url":"https://github.com/johnstonskj.png","language":"Rust","readme":"# Package/Tool `zsh-plugin`\n\nA command-line tool to generate new Zsh plugins.\n\n[![Apache-2.0 License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![MIT License](https://img.shields.io/badge/license-mit-118811.svg)](https://opensource.org/license/mit)\n[![Rust Workflow](https://github.com/johnstonskj/rust-zsh-plugin-cli/actions/workflows/rust.yml/badge.svg)](\u003chttps://github.com/johnstonskj/rust-zsh-plugin-cli/actions/workflows/rust.yml\u003e)\n[![Security Audit Workflow](https://github.com/johnstonskj/rust-zsh-plugin-cli/actions/workflows/security-audit.yml/badge.svg)](\u003chttps://github.com/johnstonskj/rust-zsh-plugin-cli/actions/workflows/security-audit.yml\u003e)\n[![crates.io](https://img.shields.io/crates/v/zsh-plugin.svg)](https://crates.io/crates/zsh-plugin)\n[![GitHub stars](https://img.shields.io/github/stars/johnstonskj/rust-zsh-plugin-cli.svg)](\u003chttps://github.com/johnstonskj/rust-zsh-plugin-cli/stargazers\u003e)\n\nThis tool scaffolds Zsh plugins with best practices built-in, including function\ntracking for clean unloading, optional alias support, autoloaded functions, and\nCI/CD workflows for shellcheck and shellspec. Choose from _minimal_, _simple_, or\n_complete_ templates to match your plugin's complexity.\n\n## Install\n\n```bash\n❱ cargo install zsh-plugin\n```\n\n```bash\n❱ zsh-plugin --help\nA command-line tool to generate new Zsh plugins.\n\nUsage: zsh-plugin [OPTIONS] \u003cCOMMAND\u003e\n\nCommands:\n  init  Initialize a new Zsh plugin structure\n  help  Print this message or the help of the given subcommand(s)\n\nOptions:\n  -v, --verbose...  Increase logging verbosity\n  -q, --quiet...    Decrease logging verbosity\n  -h, --help        Print help\n  -V, --version     Print version\n```\n\n## Command `init`\n\n```bash\n❯ zsh-plugin init --help                                                                              \nInitialize a new Zsh plugin structure\n\nThe resulting plugin contains the following content.\n\n...\n\nUsage: zsh-plugin init [OPTIONS] --github-user \u003cGITHUB_USER\u003e \u003cNAME\u003e\n\nArguments:\n  \u003cNAME\u003e\n          The name of the new plugin.\n          \n          Plugin names are restricted to a \"safe\" subset corresponding to the following regular expression `\\[a-zA-Z\\]\\[a-zA-Z0-9_-\\]``.\n\nOptions:\n  -f, --force\n          Force over-writing of existing files.\n          \n          If not set, the tool will fail when target directories or files exist.\n\n  -v, --verbose...\n          Increase logging verbosity.\n\n  -q, --quiet...\n          Decrease logging verbosity.\n\n  -t, --template \u003cTEMPLATE\u003e\n          A pre-configured template to use.\n\n          Possible values:\n          - minimal:  Minimal plugin structure\n          - simple:   Simple in-line function plugin structure\n          - complete: Complete plugin structure with all optional components included\n\n  -a, --add-bin-dir\n          Add a 'bin' sub-directory for plugin-specific binaries/scripts.\n\n  -w, --add-bash-wrapper\n          Add a Bash wrapper file to call the plugin from Bash scripts.\n\n  -A, --no-aliases\n          Do not include support for tracking aliases defined by the plugin.\n\n  -C, --no-shell-check\n          Do not include support for linting using shellcheck.\n          \n          Add linting steps to the Makefile and shell.yml (Github Action) files.\n\n  -D, --no-shell-doc\n          Do not include support for documentation generation with shdoc.\n          \n          Add documentation steps to the Makefile.\n\n  -F, --no-functions-dir\n          Do not include a 'functions' sub-directory and example file.\n\n  -G, --no-git-init\n          Do not initialize Git in the generated plugin.\n          \n          By default the created plugin directory is also initialized as a new Git repository. This option also stops creation a generic .gitignore file.\n\n  -H, --no-github-dir\n          Do not include a '.github' sub-directory.\n          \n          By default the created plugin includes a .github/worflows directory with a file shell.yml that defines a Github Actions workflow. Note that if both no-shell-check and no-shell_test options are set the workflow file is not created as it would effectively be a no-op.\n\n  -R, --no-readme\n          Do not include a README file.\n\n  -S, --no-shell-spec\n          Do not include support for testing using shellspec.\n          \n          Add testing steps to the Makefile and shell.yml (Github Action) files.\n\n  -u, --github-user \u003cGITHUB_USER\u003e\n          Set the name of the Github user for inclusion in README.md\n          \n          [env: USER=simon]\n\n  -Z, --use-plain-plugins\n          Do not use the `zplugins` plugin manager for support functions.\n\n  -d, --description \u003cDESCRIPTION\u003e\n          Short description of the plugin.\n          \n          This description is added to the plugin source and README.md files.\n\n  -h, --help\n          Print help (see a summary with '-h')\n```\n\n### Results\n\nInitialize a new Zsh plugin structure in the directory `zsh-NAME-plugin`.\nhe resulting plugin contains the following content.\n\n1. A file `NAME.plugin.zsh` which consists of the main plugin\n   lifecycle functions.\n   1. A function `NAME_plugin_init` is included with comments to show\n      how to save environment variables, add aliases, and add to either\n      `path` or `fpath`.\n   2. A function `NAME_plugin_unload` is included with comments to\n      demonstrate custom clean-up actions.\n   3. An example global variable `NAME_EXAMPLE` set during _source_ time.\n   4. A call during _source_ time to set any dependencies the plugin\n      wishes to declare.\n\n2. If the option `add-bash-wrapper` is defined, a file `NAME.bash`\n   is included which provides an entry point for Bash users to load the\n   plugin.\n\n3. A directory `.github/workflows` and a Github Actions script named\n   `shell.yml` to automate shellcheck and shellspec. Generation will be\n   skipped if the `no-github-dir` option is checked **or** both the options\n   `no-shell-check` and `no-shell-spec` are set as the workflow then has\n   nothing to do.\n\n4. A directory `functions` with an example autoloaded function\n   named `NAME_example`. Generation will be skipped if the\n   `no-functions-dir` option is set.\n\n5. If the option `add-bin-dir` is set an empty `bin` directory for\n   plugin specific binaries is created.\n\n6. A file `.gitignore`. Generation will be skipped if both the options\n   `no-shell-check` and `no-shell-spec`are set.\n\n7. A directory `doc`. Generation will be skipped if the `no-shell-doc`\n   option is set.\n\n8. A file `Makefile` for GNU Make. Generation will be skipped if\n   the options `no-shell-check`, `no-shell-doc`, and `no-shell-spec`\n   are all true.\n\n9. A file `README.md` containing only a basic skeleton. Generation will be\n   skipped if the `no-readme` is set.\n\n### Templates\n\nRather than setting all options manually, three templates are provided with\npre-defined selection of settings. These are described in the table below.\n\n| Feature / Template  | minimal | simple | complete |\n| ------------------- | ------- | ------ | -------- |\n| `add-bin-dir`       | false   | false  | true     |\n| `add-bash-wrapper`  | false   | false  | true     |\n| `no-aliases`        | true    | false  | false    |\n| `no-functions-dir`  | true    | true   | false    |\n| `no-git-init`       | false   | false  | false    |\n| `no-github-dir`     | true    | true   | false    |\n| `no-readme`         | true    | false  | false    |\n| `no-shell-check`    | true    | false  | false    |\n| `no-shell-doc`      | true    | false  | false    |\n| `no-shell-spec`     | true    | false  | false    |\n\n### Example\n\nGiven the following execution:\n\n```bash\n❱ zsh-plugin init containers --add-bash-wrapper --add-bin-dir\n........ Done\n```\n\nA complete plugin, with all possible content, is created as follows:\n\n```text\n─ zsh-containers-plugin\n  ├─ .github/                # unless no-github-dir OR\n  │  └─ workflows/           #   no-shell-check AND no-shell-check AND no-shell-spec\n  │     └─ shell.yml\n  ├─ bin/                    # when   add-bin-dir\n  │  └─ .gitkeep\n  ├─ functions/              # unless no-functions-dir\n  │  └─ containers_example\n  ├─ .git                    # unless no-git-init\n  ├─ .gitignore              # unless no-git-init\n  ├─ Makefile                # unless no-shell-check AND no-shell-check AND no-shell-spec\n  ├─ mkdoc.zsh               # unless no-shell-doc\n  ├─ README.md\n  ├─ containers.bash         # when   add-bash-wrapper\n  └─ containers.plugin.zsh  \n```\n\n## License(s)\n\nThe contents of this repository are made available under the following\nlicenses:\n\n### Apache-2.0\n\n\u003e ```text\n\u003e Copyright 2025 Simon Johnston \u003cjohnstonskj@gmail.com\u003e\n\u003e \n\u003e Licensed under the Apache License, Version 2.0 (the \"License\");\n\u003e you may not use this file except in compliance with the License.\n\u003e You may obtain a copy of the License at\n\u003e \n\u003e     http://www.apache.org/licenses/LICENSE-2.0\n\u003e \n\u003e Unless required by applicable law or agreed to in writing, software\n\u003e distributed under the License is distributed on an \"AS IS\" BASIS,\n\u003e WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\u003e See the License for the specific language governing permissions and\n\u003e limitations under the License.\n\u003e ```\n\nSee the enclosed file [LICENSE-Apache](https://github.com/johnstonskj/rust-zsh-plugin/blob/main/LICENSE-Apache).\n\n### MIT\n\n\u003e ```text\n\u003e Copyright 2025 Simon Johnston \u003cjohnstonskj@gmail.com\u003e\n\u003e \n\u003e Permission is hereby granted, free of charge, to any person obtaining a copy\n\u003e of this software and associated documentation files (the “Software”), to deal\n\u003e in the Software without restriction, including without limitation the rights to\n\u003e use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n\u003e the Software, and to permit persons to whom the Software is furnished to do so,\n\u003e subject to the following conditions:\n\u003e \n\u003e The above copyright notice and this permission notice shall be included in all\n\u003e copies or substantial portions of the Software.\n\u003e \n\u003e THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n\u003e INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n\u003e PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n\u003e HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n\u003e OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n\u003e SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\u003e ```\n\nSee the enclosed file [LICENSE-MIT](https://github.com/johnstonskj/rust-zsh-plugin/blob/main/LICENSE-MIT).\n\n### Contributions\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n\nFor information on contributing to this project, see the following.\n\n1. Project [Code of Conduct](https://github.com/johnstonskj/rust-zsh-plugin/blob/main/CODE_OF_CONDUCT.md).\n1. Project [Contribution Guidelines](https://github.com/johnstonskj/rust-zsh-plugin/blob/main/CONTRIBUTING.md).\n1. Project [TODO Items](\u003chttps://github.com/johnstonskj/rust-zsh-plugin/issues\u003e) in Issues.\n1. Repository [Change Log](https://github.com/johnstonskj/rust-zsh-plugin/blob/main/CHANGELOG.md).\n","funding_links":[],"categories":["Other Resources"],"sub_categories":["ZSH Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnstonskj%2Frust-zsh-plugin-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnstonskj%2Frust-zsh-plugin-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnstonskj%2Frust-zsh-plugin-cli/lists"}