{"_id":"@cristiand391/oclif-carapace-spec-plugin","_rev":"6-2baae4e3cb38125eadc6142d30bebcbf","name":"@cristiand391/oclif-carapace-spec-plugin","dist-tags":{"latest":"0.5.1"},"versions":{"0.1.0":{"name":"@cristiand391/oclif-carapace-spec-plugin","version":"0.1.0","keywords":["oclif","carapace"],"author":{"url":"https://github.com/cristiand391","name":"Cristian Dominguez"},"license":"MIT","_id":"@cristiand391/oclif-carapace-spec-plugin@0.1.0","maintainers":[{"name":"cristiand391","email":"cristiand391@proton.me"}],"homepage":"https://github.com/cristiand391/oclif-carapace-spec-plugin","bugs":{"url":"https://github.com/cristiand391/oclif-carapace-spec-plugin/issues"},"dist":{"shasum":"95e1a4cdeef961ff1593bd02f7269fa2b17713b1","tarball":"https://registry.npmjs.org/@cristiand391/oclif-carapace-spec-plugin/-/oclif-carapace-spec-plugin-0.1.0.tgz","fileCount":11,"integrity":"sha512-gWMeHifVchbrmjIfNVupqfeEESNouest8/TKygl0WUK47YlpU5NUKe4lf8wm0oeAkJlkXzWj/hB83Tv17Nq5AA==","signatures":[{"sig":"MEUCIDTGE17hHRoe/ZqUZmeNy8LEe4Kdd9kzYvrK7BEdVjbOAiEA+rqSYnA8L1dRjeB5Hcck8yUE6Hi37R8LPNUv/zy/u8c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10645},"main":"dist/index.js","type":"module","oclif":{"bin":"carapace-spec","hooks":{"plugins:postinstall":"./dist/hooks/refresh-cache.js","plugins:postuninstall":"./dist/hooks/refresh-cache.js"},"commands":"./dist/commands","topicSeparator":" "},"types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"21e870486794bb18ec8804b39c4ef17fa69820fd","scripts":{"lint":"eslint . --ext .ts","build":"rm -rf dist && tsc -b","prepack":"oclif manifest","postpack":"rm -f oclif.manifest.json"},"_npmUser":{"name":"cristiand391","email":"cristiand391@proton.me"},"repository":{"url":"git+https://github.com/cristiand391/oclif-carapace-spec-plugin.git","type":"git"},"_npmVersion":"10.8.2","description":"oclif plugin to generate a carapace spec","directories":{},"_nodeVersion":"20.17.0","dependencies":{"ejs":"^3.1.10","yaml":"^2.5.1","ansis":"^3.3.2","@oclif/core":"^4"},"_hasShrinkwrap":false,"devDependencies":{"oclif":"^4","eslint":"^8","ts-node":"^10","@types/ejs":"^3.1.5","typescript":"^5","@types/node":"^18","@typescript-eslint/parser":"^6.21.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/oclif-carapace-spec-plugin_0.1.0_1728008347920_0.13306486662547568","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@cristiand391/oclif-carapace-spec-plugin","version":"0.2.0","keywords":["oclif","carapace"],"author":{"url":"https://github.com/cristiand391","name":"Cristian Dominguez"},"license":"MIT","_id":"@cristiand391/oclif-carapace-spec-plugin@0.2.0","maintainers":[{"name":"cristiand391","email":"cristiand391@proton.me"}],"homepage":"https://github.com/cristiand391/oclif-carapace-spec-plugin","bugs":{"url":"https://github.com/cristiand391/oclif-carapace-spec-plugin/issues"},"dist":{"shasum":"fa6eed5032544dd47fa4253b060e04a300595b6e","tarball":"https://registry.npmjs.org/@cristiand391/oclif-carapace-spec-plugin/-/oclif-carapace-spec-plugin-0.2.0.tgz","fileCount":11,"integrity":"sha512-k6nCsmY44WgqlckMZCNTPsMUMdrb3iXLe04Ydp+q0ennedwH8JlSRgQtAHpnTMtqKUg8DTSUIXr2uWtk0mcmkQ==","signatures":[{"sig":"MEUCIQC0SJSk5YQGyyRz/WJmfiBxIap2pnWpKyYv1fZZnp2ZQwIgWefWhUjZSPLFJVbT4zOwMrP1kma7xU3GWvfYVZm2QdM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14137},"main":"dist/index.js","type":"module","oclif":{"bin":"carapace-spec","hooks":{"plugins:postinstall":"./dist/hooks/refresh-cache.js","plugins:postuninstall":"./dist/hooks/refresh-cache.js"},"commands":"./dist/commands","topicSeparator":" "},"types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"379e9b48176ca419577114891c0be38eb3412bbb","scripts":{"lint":"eslint . --ext .ts","build":"rm -rf dist && tsc -b","prepack":"oclif manifest","postpack":"rm -f oclif.manifest.json"},"_npmUser":{"name":"cristiand391","email":"cristiand391@proton.me"},"repository":{"url":"git+https://github.com/cristiand391/oclif-carapace-spec-plugin.git","type":"git"},"_npmVersion":"10.8.2","description":"oclif plugin to generate a carapace spec","directories":{},"_nodeVersion":"20.17.0","dependencies":{"ejs":"^3.1.10","yaml":"^2.5.1","ansis":"^3.3.2","@oclif/core":"^4"},"_hasShrinkwrap":false,"devDependencies":{"oclif":"^4","eslint":"^8","ts-node":"^10","@types/ejs":"^3.1.5","typescript":"^5","@types/node":"^18","@typescript-eslint/parser":"^6.21.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/oclif-carapace-spec-plugin_0.2.0_1729041492722_0.8975715761466594","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"@cristiand391/oclif-carapace-spec-plugin","version":"0.3.0","keywords":["oclif","carapace"],"author":{"url":"https://github.com/cristiand391","name":"Cristian Dominguez"},"license":"MIT","_id":"@cristiand391/oclif-carapace-spec-plugin@0.3.0","maintainers":[{"name":"cristiand391","email":"cristiand391@proton.me"}],"homepage":"https://github.com/cristiand391/oclif-carapace-spec-plugin","bugs":{"url":"https://github.com/cristiand391/oclif-carapace-spec-plugin/issues"},"dist":{"shasum":"2f21167f0969d2e136ca47d78207bfdd7cf59140","tarball":"https://registry.npmjs.org/@cristiand391/oclif-carapace-spec-plugin/-/oclif-carapace-spec-plugin-0.3.0.tgz","fileCount":11,"integrity":"sha512-Wefy0dQEWCVCZ2SCTVp5PbDVSoXzPPLghqX1HQseAVr20RrVvuWL8oRFpcbH5so70biHNQv2bKkmpuhMI0Ajag==","signatures":[{"sig":"MEUCIGBykzaXOXkVquLHNNycpvEwefd9r253Uj3GFBcxodckAiEAr9TpQLgXzBDPO4IuxjGApa4y2sKdqR99BEl6W0dmmBU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19015},"main":"dist/index.js","type":"module","oclif":{"bin":"carapace-spec","hooks":{"plugins:postinstall":"./dist/hooks/refresh-cache.js","plugins:postuninstall":"./dist/hooks/refresh-cache.js"},"commands":"./dist/commands","topicSeparator":" "},"types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"d7dc10407d015065ae66454dedc2d4ab28c95b72","scripts":{"lint":"eslint . --ext .ts","build":"rm -rf dist && tsc -b","prepack":"oclif manifest","postpack":"rm -f oclif.manifest.json"},"_npmUser":{"name":"cristiand391","email":"cristiand391@proton.me"},"repository":{"url":"git+https://github.com/cristiand391/oclif-carapace-spec-plugin.git","type":"git"},"_npmVersion":"10.9.2","description":"oclif plugin to generate a carapace spec","directories":{},"_nodeVersion":"22.13.1","dependencies":{"ejs":"^3.1.10","yaml":"^2.5.1","ansis":"^3.3.2","@oclif/core":"^4"},"_hasShrinkwrap":false,"devDependencies":{"oclif":"^4","eslint":"^8","ts-node":"^10","@types/ejs":"^3.1.5","typescript":"^5","@types/node":"^18","@typescript-eslint/parser":"^6.21.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/oclif-carapace-spec-plugin_0.3.0_1738448295700_0.9050676037317831","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@cristiand391/oclif-carapace-spec-plugin","version":"0.3.1","keywords":["oclif","carapace"],"author":{"url":"https://github.com/cristiand391","name":"Cristian Dominguez"},"license":"MIT","_id":"@cristiand391/oclif-carapace-spec-plugin@0.3.1","maintainers":[{"name":"cristiand391","email":"cristiand391@proton.me"}],"homepage":"https://github.com/cristiand391/oclif-carapace-spec-plugin","bugs":{"url":"https://github.com/cristiand391/oclif-carapace-spec-plugin/issues"},"dist":{"shasum":"514865d597db067aea73ead43d07de673b1b96ed","tarball":"https://registry.npmjs.org/@cristiand391/oclif-carapace-spec-plugin/-/oclif-carapace-spec-plugin-0.3.1.tgz","fileCount":11,"integrity":"sha512-/FiuAfswFhBedwwAm83FlWTSpfoYpqI1nFi8UZlDPoR47uoaPMyZYH1D+9KVDw2qVuwk88PIP5zygqH6Qf/O7Q==","signatures":[{"sig":"MEUCIEHi/+objUt/UFRPaJVpf3txlf6j+kyIPWIoLiU3ZC2CAiEArvV2Uc2BVfssURXrTtPWYSTmQPi+aqtBjsvoxrNBNBU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19047},"main":"dist/index.js","type":"module","oclif":{"bin":"carapace-spec","hooks":{"plugins:postinstall":"./dist/hooks/refresh-cache.js","plugins:postuninstall":"./dist/hooks/refresh-cache.js"},"commands":"./dist/commands","topicSeparator":" "},"types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"19e94bd30bb243f47121b199ae7c3d37f2ca4d29","scripts":{"lint":"eslint . --ext .ts","build":"rm -rf dist && tsc -b","prepack":"oclif manifest","postpack":"rm -f oclif.manifest.json"},"_npmUser":{"name":"cristiand391","email":"cristiand391@proton.me"},"repository":{"url":"git+https://github.com/cristiand391/oclif-carapace-spec-plugin.git","type":"git"},"_npmVersion":"10.9.2","description":"oclif plugin to generate a carapace spec","directories":{},"_nodeVersion":"22.15.0","dependencies":{"ejs":"^3.1.10","yaml":"^2.5.1","ansis":"^3.3.2","@oclif/core":"^4"},"_hasShrinkwrap":false,"devDependencies":{"oclif":"^4","eslint":"^8","ts-node":"^10","@types/ejs":"^3.1.5","typescript":"^5","@types/node":"^18","@typescript-eslint/parser":"^6.21.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/oclif-carapace-spec-plugin_0.3.1_1746402639038_0.225812060910215","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@cristiand391/oclif-carapace-spec-plugin","version":"0.4.1","keywords":["oclif","carapace"],"author":{"url":"https://github.com/cristiand391","name":"Cristian Dominguez"},"license":"MIT","_id":"@cristiand391/oclif-carapace-spec-plugin@0.4.1","maintainers":[{"name":"cristiand391","email":"cristiand391@proton.me"}],"homepage":"https://github.com/cristiand391/oclif-carapace-spec-plugin","bugs":{"url":"https://github.com/cristiand391/oclif-carapace-spec-plugin/issues"},"dist":{"shasum":"b2a11d4e967fc287aa67deb249b82a4e47c6a274","tarball":"https://registry.npmjs.org/@cristiand391/oclif-carapace-spec-plugin/-/oclif-carapace-spec-plugin-0.4.1.tgz","fileCount":13,"integrity":"sha512-cDeYQSjPKMdEj46RWpVuC1f/GHsej8mLgHHzd+5c5exd+XXh3ezPDgCt6ljsMtdgvAXgs9zMZNxD6xcNOcQfHA==","signatures":[{"sig":"MEYCIQCNEIS1UXMfM1FkWynM9OWCYy2GOUTcSw2ZW/+S6lq8OAIhAJHQkcLnZeN3sjl3x9ZUuMscWt9XseHvIqck/VCC4z/x","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20094},"main":"dist/index.js","type":"module","oclif":{"bin":"carapace-spec","hooks":{"plugins:postinstall":"./dist/hooks/refresh-cache.js","plugins:postuninstall":"./dist/hooks/refresh-cache.js"},"commands":"./dist/commands","topicSeparator":" "},"types":"dist/index.d.ts","engines":{"node":">=20"},"gitHead":"8eb4641144446d08a214b041082116eeea92dd57","scripts":{"lint":"eslint . --ext .ts","test":"node --loader ts-node/esm --test test/**/*.test.ts","build":"rm -rf dist && tsc -b","prepack":"oclif manifest","postpack":"rm -f oclif.manifest.json"},"_npmUser":{"name":"cristiand391","email":"cristiand391@proton.me"},"repository":{"url":"git+https://github.com/cristiand391/oclif-carapace-spec-plugin.git","type":"git"},"_npmVersion":"10.9.2","description":"oclif plugin to generate a carapace spec","directories":{},"_nodeVersion":"22.15.0","dependencies":{"ejs":"^3.1.10","yaml":"^2.8.0","@oclif/core":"^4"},"_hasShrinkwrap":false,"devDependencies":{"oclif":"^4","eslint":"^8","ts-node":"^10","@types/ejs":"^3.1.5","typescript":"^5","@types/node":"^22","@typescript-eslint/parser":"^6.21.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/oclif-carapace-spec-plugin_0.4.1_1748810566239_0.5629535093251441","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@cristiand391/oclif-carapace-spec-plugin","description":"oclif plugin to generate a carapace spec","version":"0.5.1","author":{"name":"Cristian Dominguez","url":"https://github.com/cristiand391"},"homepage":"https://github.com/cristiand391/oclif-carapace-spec-plugin","bugs":{"url":"https://github.com/cristiand391/oclif-carapace-spec-plugin/issues"},"engines":{"node":">=20"},"dependencies":{"@oclif/core":"^4","ejs":"^3.1.10","yaml":"^2.8.0"},"devDependencies":{"@types/ejs":"^3.1.5","@types/node":"^22","@typescript-eslint/eslint-plugin":"^6.21.0","@typescript-eslint/parser":"^6.21.0","eslint":"^8","oclif":"^4","ts-node":"^10","typescript":"^5"},"keywords":["oclif","carapace"],"license":"MIT","main":"dist/index.js","type":"module","oclif":{"bin":"carapace-spec","commands":"./dist/commands","topicSeparator":" ","hooks":{"plugins:postinstall":"./dist/hooks/refresh-cache.js","plugins:postuninstall":"./dist/hooks/refresh-cache.js"}},"repository":{"type":"git","url":"git+https://github.com/cristiand391/oclif-carapace-spec-plugin.git"},"scripts":{"build":"rm -rf dist && tsc -b","lint":"eslint . --ext .ts","postpack":"rm -f oclif.manifest.json","prepack":"oclif manifest","test":"node --loader ts-node/esm --test test/**/*.test.ts"},"types":"dist/index.d.ts","gitHead":"ceaea3066efaac2443f0f8a6a44594635b2e006b","_id":"@cristiand391/oclif-carapace-spec-plugin@0.5.1","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-iZtipAeGp/XUlO0C6LnPvtLekXxbc2Q5HXaLs+lqiNErwczd3krzhHEMuKxlzZBtXzSFOREaBqLPK3Wigf1z+A==","shasum":"c6230381ebd50aa52316a1a13cfd2a69cfc3d494","tarball":"https://registry.npmjs.org/@cristiand391/oclif-carapace-spec-plugin/-/oclif-carapace-spec-plugin-0.5.1.tgz","fileCount":15,"unpackedSize":21655,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDTpfbmmP6nN2sOVlDuIGAhdPW7nPExezDyZXgysUJHZwIhANUTRi/mZyt+FSnJgpgZS6BnhK9dL5dAAvnxzc0VvqQR"}]},"_npmUser":{"name":"cristiand391","email":"cristiand391@proton.me"},"directories":{},"maintainers":[{"name":"cristiand391","email":"cristiand391@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/oclif-carapace-spec-plugin_0.5.1_1768348526366_0.015300194996285654"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-04T02:19:07.825Z","modified":"2026-01-13T23:55:26.621Z","0.1.0":"2024-10-04T02:19:08.168Z","0.2.0":"2024-10-16T01:18:12.905Z","0.3.0":"2025-02-01T22:18:15.879Z","0.3.1":"2025-05-04T23:50:39.206Z","0.4.1":"2025-06-01T20:42:46.431Z","0.5.1":"2026-01-13T23:55:26.490Z"},"bugs":{"url":"https://github.com/cristiand391/oclif-carapace-spec-plugin/issues"},"author":{"name":"Cristian Dominguez","url":"https://github.com/cristiand391"},"license":"MIT","homepage":"https://github.com/cristiand391/oclif-carapace-spec-plugin","keywords":["oclif","carapace"],"repository":{"type":"git","url":"git+https://github.com/cristiand391/oclif-carapace-spec-plugin.git"},"description":"oclif plugin to generate a carapace spec","maintainers":[{"name":"cristiand391","email":"cristiand391@proton.me"}],"readme":"oclif-carapace-spec-plugin\n=================\n\nAn oclif plugin to generate a carapace spec!\n\n`carapace` allows to define CLI completions in a spec file, you can use it to get shell completion in all supported shells listed here:\nhttps://carapace-sh.github.io/carapace-spec/carapace-spec/usage.html\n\n\n![image](https://github.com/user-attachments/assets/7d6d1ea3-b1fd-4ffe-a67c-399d4e901199)\n![image](https://github.com/user-attachments/assets/3e9abd02-9a03-4e76-81c1-1e2f90ded73d)\n\n## Supported features\n* Commands\n* Flags\n  * Options\n  * Exclusive relationships\n* Re-generate spec automatically on plugin install/uninstall\n* Completion overrides (see `Macros` section below)\n\n## Requirements\n * `carapace-spec` or `carapace-bin`: [carapace-spec: dowload the binary for your OS](https://github.com/carapace-sh/carapace-spec/releases) and put it in your `PATH`. [carapace: see install instructions](https://carapace-sh.github.io/carapace-bin/install.html)\n * oclif CLI that supports installing plugins via [`plugins install`]([https://github.com/oclif/plugin-plugins](https://github.com/oclif/plugin-plugins?tab=readme-ov-file#what-is-this))\n\n## Install\n\n```bash\n<CLI> plugins install @cristiand391/oclif-carapace-spec-plugin\n```\n\nThen run the `carapace-gen` command and follow the instructions to source the spec in your shell.\n\n## Macros\n`carapace` allows to use macros for customizing completion style and values:\n\nhttps://carapace-sh.github.io/carapace-spec/carapace-spec/macros.html\n\nYou can use macros to define custom flag completion logic for dynamic flag values that can't be hard-coded in CLIs like usernames, IDs, etc.\n\nMacros file example for the Salesforce CLI:\n```yaml\n# this node applies to all commands, define here completion logic for flags that repeat themselves in multiple commands.\npersistentFlagsCompletion:\n  target-org: [\"$(sf org list auth --json | jq -r '.result[].username')\"]\n  target-dev-hub: [\"$(sf org list auth --json | jq -r '.result[] | select(.isDevHub) | .username')\"]\n  definition-file: [\"$files([.json])\"]\n  manifest: [\"$files([.xml])\"]\n  file: [\"$files\"]\n\n# override flag completion for specific commands.\n# important: command ids need to separated by colons.\ncommandOverrides:\n  flags:\n    'project:deploy:start':\n      pre-destructive-changes: [\"$files([.xml])\"]\n      post-destructive-changes: [\"$files([.xml])\"]\n    'org:delete:scratch':\n        target-org: [\"$(sf org list auth --json | jq -r '.result[] | select(.isScratchOrg) | .username')\"]\n    'org:delete:sandbox':\n        target-org: [\"$(sf org list auth --json | jq -r '.result[] | select(.isSandbox) | .username')\"]\n\n```\n\nIt uses the `exec` macro for `--target-org` and `--target-dev-hub` flags to get completion values from a command, and the `files` macro for XML/JSON file completion on specific flags.\n\n### Usage\n\n1. Define a YAML file with completion definitions like in the example above.\n2. Set the `<CLI>_CARAPACE_SPEC_MACROS_FILE` env var to the path to the YAML file.\n3. Run `<CLI> carapace-gen --refresh-cache`.\n   \n> [!NOTE]  \nThe `<CLI>` part in the env var in step 2 refers to the executable name of your oclif CLI. For instance, for the Salesforce CLI (`sf`) the env var should be `SF_CARAPACE_SPEC_MACROS_FILE`.\n\n> [!NOTE]  \nThis plugin re-generates the carapace spec everytime you install/uninstall plugins via `plugins install/uninstall`, make sure to set the `<CLI>_CARAPACE_SPEC_MACROS_FILE` env var in your shell RC file so that you don't miss the custom completions when the automatic re-generation happens under the hood.\n","readmeFilename":"README.md"}