{"id":20162570,"url":"https://github.com/zdharma-continuum/declare-zsh","last_synced_at":"2025-04-10T00:36:03.035Z","repository":{"id":103426626,"uuid":"425338277","full_name":"zdharma-continuum/declare-zsh","owner":"zdharma-continuum","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-06T18:06:33.000Z","size":245,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T02:21:53.700Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zdharma-continuum.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":"2021-11-06T20:09:10.000Z","updated_at":"2024-09-11T03:10:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"343ae888-d1da-42ef-a95e-baf687f1afa9","html_url":"https://github.com/zdharma-continuum/declare-zsh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdharma-continuum%2Fdeclare-zsh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdharma-continuum%2Fdeclare-zsh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdharma-continuum%2Fdeclare-zsh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdharma-continuum%2Fdeclare-zsh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zdharma-continuum","download_url":"https://codeload.github.com/zdharma-continuum/declare-zsh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247749956,"owners_count":20989714,"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":[],"created_at":"2024-11-14T00:25:48.600Z","updated_at":"2025-04-10T00:36:03.029Z","avatar_url":"https://github.com/zdharma-continuum.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# declare-zsh\n\n[**declare-zsh**](https://github.com/zdharma-continuum/declare-zsh) is a parser for `zinit` commands in `.zshrc`. It allows to\nperform the following actions on `.zshrc` **from the command-line**:\n\n- enable and disable selected plugins and snippets,\n- add plugins and snippets,\n- delete plugins and snippets,\n- it currently supports the classic Zinit syntax only, i.e.: the one with two (`zinit ice …`, `zinit load/snippet …`)\n  commands.\n\n______________________________________________________________________\n\nIn other words, by issuing a `declzsh` command the user deploys a task of:\n\n1. Reading and parsing of the `~/.zshrc`.\n\n1. Making changes (like removal of a plugin, i.e. of `zinit load {the-removed-plugin}` command together with the\n   possible associated `zinit ice …` command) and then…\n\n1. Writing the result back to the `zshrc` (by default, the result is stored to `~/.zshrc_gen` file for safety, but the\n   author wants to emhasize very strongly, that **breaking something within the parsed `zshrc` is nearly impossible**\n   and the tool can be safely used with option `-o ~/.zshrc` which points `declzsh` to the original `zshrc` as the\n   destination output file).\n\n## Examples \u0026 Screenshots\n\n1. Example **disabling** of a plugin via the **toggle** option **-TT** – this works because the commands preceded by `:`\n   are ignored by the shell: ![screenshot](https://raw.githubusercontent.com/zdharma-continuum/declare-zsh/main/img/toggle.png)\n\n2. Example **addition** of a plugin via the option **-AA** – in order to also set up ice modifiers enclose them in a\n   preceding square-bracket block, i.e. `declzsh -AA '[ wait\"1\" lucid ] zdharma/null'`:\n   ![screenshot](https://raw.githubusercontent.com/zdharma-continuum/declare-zsh/main/img/add.png)\n\n3. Example **deletion** of a plugin via the **purge** option **-PP** – the argument is treated as pattern, pass `*` to\n   delete all plugins and snippets!:\n   ![screenshot](https://raw.githubusercontent.com/zdharma-continuum/declare-zsh/main/img/purge.png)\n\n## Usage\n\nMultiple actions, i.e. multiple options like `-AA`, `-PP`, `-DD`, etc. are possible in a single `declzsh` run.\n\n![usage screenshot](https://raw.githubusercontent.com/zdharma-continuum/declare-zsh/master/img/usage.png)\n\n\u003c!-- vim:set ft=markdown tw=80: --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdharma-continuum%2Fdeclare-zsh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzdharma-continuum%2Fdeclare-zsh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdharma-continuum%2Fdeclare-zsh/lists"}