{"_id":"@politty/zod","_rev":"11-c11649236d21e83ad1b62a101ab53738","name":"@politty/zod","dist-tags":{"latest":"0.3.1"},"versions":{"0.0.0":{"name":"@politty/zod","version":"0.0.0","keywords":["argument-parser","cli","command-line","type-safe","typescript","zod"],"author":"toiroakr","license":"MIT","_id":"@politty/zod@0.0.0","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"bin":{"politty":"./bin/cli.mjs"},"dist":{"shasum":"247ef117a944947c533c658f0a8d76bbb7cc6ea4","tarball":"https://registry.npmjs.org/@politty/zod/-/zod-0.0.0.tgz","fileCount":41,"integrity":"sha512-D0S28b7V247jKJpytjLYXTxJ/AqdOLg19pbY3LDU3IIaBmuP/3uCSG72JazPEJDQaN3t9aL04/fKVaVH6qMtcw==","signatures":[{"sig":"MEYCIQCuH/nz+LxxlEkZ3kimBHFsF6h/BenN/rSEt3u+A+P7KAIhAKxq+/TKgjgieOlsXyfo+GEDqRk96Z+mhMFisW6OYlEP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":798145},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.12.0 <21.0.0 || >=21.7.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./docs":{"types":"./dist/docs.d.ts","default":"./dist/docs.js"},"./skill":{"types":"./dist/skill.d.ts","default":"./dist/skill.js"},"./prompt":{"types":"./dist/prompt.d.ts","default":"./dist/prompt.js"},"./augment":{"types":"./dist/augment.d.ts","default":"./dist/augment.js"},"./completion":{"types":"./dist/completion.d.ts","default":"./dist/completion.js"},"./prompt/clack":{"types":"./dist/prompt-clack.d.ts","default":"./dist/prompt-clack.js"},"./compile-cache":{"types":"./dist/compile-cache.d.ts","default":"./dist/compile-cache.js"},"./prompt/inquirer":{"types":"./dist/prompt-inquirer.d.ts","default":"./dist/prompt-inquirer.js"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"toiroakr","email":"toiroakr@gmail.com"},"repository":{"url":"https://github.com/toiroakr/politty.git","type":"git","directory":"packages/zod"},"description":"A lightweight CLI framework inspired by citty with zod v4 registry integration for type-safe metadata management","directories":{},"_nodeVersion":"25.9.0","dependencies":{"yaml":"^2.8.3"},"_hasShrinkwrap":false,"devDependencies":{"zod":"4.4.3","tsdown":"0.22.14","typescript":"7.0.2","@types/node":"25.9.5","@politty/core":"0.1.0","@typescript/native-preview":"7.0.0-dev.20260707.2"},"peerDependencies":{"zod":"^4.2.1","@clack/prompts":"^0.10.0 || ^0.11.0 || ^1.0.0","@inquirer/prompts":"^8.3.2"},"peerDependenciesMeta":{"@clack/prompts":{"optional":true},"@inquirer/prompts":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/zod_0.0.0_1786108131930_0.7838721493884351","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@politty/zod","version":"0.1.0","keywords":["argument-parser","cli","command-line","type-safe","typescript","zod"],"author":"toiroakr","license":"MIT","_id":"@politty/zod@0.1.0","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"bin":{"politty":"./bin/cli.mjs"},"dist":{"shasum":"a105e971c0917245daabbdc655fa684c1eed3051","tarball":"https://registry.npmjs.org/@politty/zod/-/zod-0.1.0.tgz","fileCount":43,"integrity":"sha512-KbQiaxUZjVhapxUcY9qGvTtwbvcswKbL57Dx35cJ7DHHh0KK4wPQ0nh9i5gcn5vh9GhPSXQ/K6FxRmeUBCJ+VQ==","signatures":[{"sig":"MEYCIQCAgc7LgKbmMm3Mlr0b331oNnAV7ppoU8CY3QVTwJHemQIhAMNWwhNi0kHa9YoLeBL0mNQ+4sowu0a8g2XDOZCejLsP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@politty%2fzod@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":806603},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.12.0 <21.0.0 || >=21.7.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./docs":{"types":"./dist/docs.d.ts","default":"./dist/docs.js"},"./skill":{"types":"./dist/skill.d.ts","default":"./dist/skill.js"},"./prompt":{"types":"./dist/prompt.d.ts","default":"./dist/prompt.js"},"./augment":{"types":"./dist/augment.d.ts","default":"./dist/augment.js"},"./completion":{"types":"./dist/completion.d.ts","default":"./dist/completion.js"},"./prompt/clack":{"types":"./dist/prompt-clack.d.ts","default":"./dist/prompt-clack.js"},"./compile-cache":{"types":"./dist/compile-cache.d.ts","default":"./dist/compile-cache.js"},"./prompt/inquirer":{"types":"./dist/prompt-inquirer.d.ts","default":"./dist/prompt-inquirer.js"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58f1e889-0d0d-4245-8074-f43c60384385"}},"repository":{"url":"https://github.com/toiroakr/politty.git","type":"git","directory":"packages/zod"},"description":"A lightweight CLI framework inspired by citty with zod v4 registry integration for type-safe metadata management","directories":{},"_nodeVersion":"26.0.0","dependencies":{"yaml":"^2.8.3"},"_hasShrinkwrap":false,"devDependencies":{"zod":"4.4.3","tsdown":"0.22.14","typescript":"7.0.2","@types/node":"25.9.5","@politty/core":"0.1.0","@typescript/native-preview":"7.0.0-dev.20260707.2"},"peerDependencies":{"zod":"^4.2.1","@clack/prompts":"^0.10.0 || ^0.11.0 || ^1.0.0","@inquirer/prompts":"^8.3.2"},"peerDependenciesMeta":{"@clack/prompts":{"optional":true},"@inquirer/prompts":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/zod_0.1.0_1786320289050_0.265241117948839","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@politty/zod","version":"0.1.1","keywords":["argument-parser","cli","command-line","type-safe","typescript","zod"],"author":"toiroakr","license":"MIT","_id":"@politty/zod@0.1.1","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"bin":{"politty":"./bin/cli.mjs"},"dist":{"shasum":"476f7479d6b039ada08f11f71ab81084523922c4","tarball":"https://registry.npmjs.org/@politty/zod/-/zod-0.1.1.tgz","fileCount":43,"integrity":"sha512-YmmQb+0fuBmBVNlOi8l+RCBo3OCow7WI2uK/mvIcPM6hjY/NYcz+fCckJkGQYPYBU5rZg/L1jQsdMjXJqGI11w==","signatures":[{"sig":"MEYCIQC2zXtd33MV8IUThlUmUfpN014iHwT0Z/NTFVHf6yjsRAIhAMbj6jmIL2Y8Q14JufAWTiYIAdFzqREmxn/VzU2SPPrS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@politty%2fzod@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":807836},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.12.0 <21.0.0 || >=21.7.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./docs":{"types":"./dist/docs.d.ts","default":"./dist/docs.js"},"./skill":{"types":"./dist/skill.d.ts","default":"./dist/skill.js"},"./prompt":{"types":"./dist/prompt.d.ts","default":"./dist/prompt.js"},"./augment":{"types":"./dist/augment.d.ts","default":"./dist/augment.js"},"./completion":{"types":"./dist/completion.d.ts","default":"./dist/completion.js"},"./prompt/clack":{"types":"./dist/prompt-clack.d.ts","default":"./dist/prompt-clack.js"},"./compile-cache":{"types":"./dist/compile-cache.d.ts","default":"./dist/compile-cache.js"},"./prompt/inquirer":{"types":"./dist/prompt-inquirer.d.ts","default":"./dist/prompt-inquirer.js"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58f1e889-0d0d-4245-8074-f43c60384385"}},"repository":{"url":"https://github.com/toiroakr/politty.git","type":"git","directory":"packages/zod"},"description":"A lightweight CLI framework inspired by citty with zod v4 registry integration for type-safe metadata management","directories":{},"_nodeVersion":"26.0.0","dependencies":{"yaml":"^2.9.0"},"_hasShrinkwrap":false,"devDependencies":{"zod":"4.4.3","tsdown":"0.22.14","typescript":"7.0.2","@types/node":"25.9.5","@politty/core":"0.1.0","@typescript/native-preview":"7.0.0-dev.20260707.2"},"peerDependencies":{"zod":"^4.2.1","@clack/prompts":"^0.10.0 || ^0.11.0 || ^1.0.0","@inquirer/prompts":"^8.3.2"},"peerDependenciesMeta":{"@clack/prompts":{"optional":true},"@inquirer/prompts":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/zod_0.1.1_1786546555300_0.4489829497835698","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@politty/zod","version":"0.1.2","keywords":["argument-parser","cli","command-line","type-safe","typescript","zod"],"author":"toiroakr","license":"MIT","_id":"@politty/zod@0.1.2","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"bin":{"politty":"./bin/cli.mjs"},"dist":{"shasum":"2342a6fd3d130cb7ccede8a91ce48a89cdfc1582","tarball":"https://registry.npmjs.org/@politty/zod/-/zod-0.1.2.tgz","fileCount":43,"integrity":"sha512-1SD05W436jr+eIF/41UQFgJXlzmPQGjMcafeiHjnnOPhZldyQ1b9iUDWV6srvB5AX5+kVQCqVZBghhgLqwpM/Q==","signatures":[{"sig":"MEYCIQCF8FHzIldEJY0m4FeZplct8lOPLrjv2j7PKBDrwXH+ZgIhAMBt2L7aCjWoG1r5e/bNrqi2ZvORmNCu7XCnD1tEQHZj","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@politty%2fzod@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":811863},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.12.0 <21.0.0 || >=21.7.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./docs":{"types":"./dist/docs.d.ts","default":"./dist/docs.js"},"./skill":{"types":"./dist/skill.d.ts","default":"./dist/skill.js"},"./prompt":{"types":"./dist/prompt.d.ts","default":"./dist/prompt.js"},"./augment":{"types":"./dist/augment.d.ts","default":"./dist/augment.js"},"./completion":{"types":"./dist/completion.d.ts","default":"./dist/completion.js"},"./prompt/clack":{"types":"./dist/prompt-clack.d.ts","default":"./dist/prompt-clack.js"},"./compile-cache":{"types":"./dist/compile-cache.d.ts","default":"./dist/compile-cache.js"},"./prompt/inquirer":{"types":"./dist/prompt-inquirer.d.ts","default":"./dist/prompt-inquirer.js"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58f1e889-0d0d-4245-8074-f43c60384385"}},"repository":{"url":"https://github.com/toiroakr/politty.git","type":"git","directory":"packages/zod"},"description":"A lightweight CLI framework inspired by citty with zod v4 registry integration for type-safe metadata management","directories":{},"_nodeVersion":"26.0.0","dependencies":{"yaml":"^2.9.0"},"_hasShrinkwrap":false,"devDependencies":{"zod":"4.4.3","tsdown":"0.22.14","typescript":"7.0.2","@types/node":"25.9.5","@politty/core":"0.1.0","@typescript/native-preview":"7.0.0-dev.20260707.2"},"peerDependencies":{"zod":"^4.2.1","@clack/prompts":"^0.10.0 || ^0.11.0 || ^1.0.0","@inquirer/prompts":"^8.3.2"},"peerDependenciesMeta":{"@clack/prompts":{"optional":true},"@inquirer/prompts":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/zod_0.1.2_1787035227879_0.22864785167574975","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@politty/zod","version":"0.2.0","keywords":["argument-parser","cli","command-line","type-safe","typescript","zod"],"author":"toiroakr","license":"MIT","_id":"@politty/zod@0.2.0","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"bin":{"politty":"./bin/cli.mjs"},"dist":{"shasum":"45e705a30c19a9105cc8b235f10838ae7763cfd9","tarball":"https://registry.npmjs.org/@politty/zod/-/zod-0.2.0.tgz","fileCount":46,"integrity":"sha512-q5VxLSYjBFXUsdKvBsoQ2covPWHEw02oYGwwXsJmfmOL+Bkc+DowPsdyG1iIWkBqqzi+4IMipylGyikDWn+AnQ==","signatures":[{"sig":"MEUCIQDItj4iM1hb06Koy+dV4sBDAT7kO+NH4ENF48dMtD3NRwIgblx5BDlqI7klI8tjICLJ5dIO9eiglR4pPsA24tv0Vog=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQC1ovMid8BsYlS4VedijWHQ2sj1T6pSRucYaPvSTspMKAIgDoTuJabQDDz+zPewujHQkudCn4DVRt+xVdPOeH1bTo8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@politty%2fzod@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":463043},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.12.0 <21.0.0 || >=21.7.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./docs":{"types":"./dist/docs.d.ts","default":"./dist/docs.js"},"./skill":{"types":"./dist/skill.d.ts","default":"./dist/skill.js"},"./prompt":{"types":"./dist/prompt.d.ts","default":"./dist/prompt.js"},"./augment":{"types":"./dist/augment.d.ts","default":"./dist/augment.js"},"./completion":{"types":"./dist/completion.d.ts","default":"./dist/completion.js"},"./prompt/clack":{"types":"./dist/prompt-clack.d.ts","default":"./dist/prompt-clack.js"},"./compile-cache":{"types":"./dist/compile-cache.d.ts","default":"./dist/compile-cache.js"},"./prompt/inquirer":{"types":"./dist/prompt-inquirer.d.ts","default":"./dist/prompt-inquirer.js"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58f1e889-0d0d-4245-8074-f43c60384385"}},"repository":{"url":"https://github.com/toiroakr/politty.git","type":"git","directory":"packages/zod"},"description":"A lightweight CLI framework inspired by citty with zod v4 registry integration for type-safe metadata management","directories":{},"_nodeVersion":"26.0.0","dependencies":{"yaml":"^2.9.0"},"_hasShrinkwrap":false,"devDependencies":{"zod":"4.4.3","tsdown":"0.22.14","typescript":"7.0.2","@types/node":"25.9.5","@politty/core":"0.1.0","@typescript/native-preview":"7.0.0-dev.20260707.2"},"peerDependencies":{"zod":"^4.2.1","@clack/prompts":"^0.10.0 || ^0.11.0 || ^1.0.0","@inquirer/prompts":"^8.3.2"},"peerDependenciesMeta":{"@clack/prompts":{"optional":true},"@inquirer/prompts":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/zod_0.2.0_1788440772997_0.283087937421175","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@politty/zod","version":"0.2.1","keywords":["argument-parser","cli","command-line","type-safe","typescript","zod"],"author":"toiroakr","license":"MIT","_id":"@politty/zod@0.2.1","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"bin":{"politty":"./bin/cli.mjs"},"dist":{"shasum":"2ce3eb7a5b33ea53e3fd01e9312fc72b72864092","tarball":"https://registry.npmjs.org/@politty/zod/-/zod-0.2.1.tgz","fileCount":46,"integrity":"sha512-UlzrVAcLE2EOMFJdfF8O2N2iHuabm3dz2W/8OwocKSIBOBuEhNSUob1fKKZrEw9AgjLXqyuZzCJSMOo8iibKRQ==","signatures":[{"sig":"MEQCIEcsHZf3+4Sjkq0KOBYsXM7pIoqiww/8UMIMb47srgIQAiA0kC/zmd0HVSw8HLFmiru9Wz08XtYOfu/NooRRIEEcTQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDnteFjaP++VUwMwa7czlJohEYVGRQpQmRj1cwbXxg25AIgNju1wAXXE/28tb5YWw9JE7tMrBlSAnI6SG1o6R9f34g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@politty%2fzod@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":463812},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.12.0 <21.0.0 || >=21.7.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./docs":{"types":"./dist/docs.d.ts","default":"./dist/docs.js"},"./skill":{"types":"./dist/skill.d.ts","default":"./dist/skill.js"},"./prompt":{"types":"./dist/prompt.d.ts","default":"./dist/prompt.js"},"./augment":{"types":"./dist/augment.d.ts","default":"./dist/augment.js"},"./completion":{"types":"./dist/completion.d.ts","default":"./dist/completion.js"},"./prompt/clack":{"types":"./dist/prompt-clack.d.ts","default":"./dist/prompt-clack.js"},"./compile-cache":{"types":"./dist/compile-cache.d.ts","default":"./dist/compile-cache.js"},"./prompt/inquirer":{"types":"./dist/prompt-inquirer.d.ts","default":"./dist/prompt-inquirer.js"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58f1e889-0d0d-4245-8074-f43c60384385"}},"repository":{"url":"https://github.com/toiroakr/politty.git","type":"git","directory":"packages/zod"},"description":"A lightweight CLI framework inspired by citty with zod v4 registry integration for type-safe metadata management","directories":{},"_nodeVersion":"26.0.0","dependencies":{"yaml":"^2.9.0"},"_hasShrinkwrap":false,"devDependencies":{"zod":"4.4.3","tsdown":"0.22.14","typescript":"7.0.2","@types/node":"25.9.5","@politty/core":"0.1.0","@typescript/native-preview":"7.0.0-dev.20260707.2"},"peerDependencies":{"zod":"^4.2.1","@clack/prompts":"^0.10.0 || ^0.11.0 || ^1.0.0","@inquirer/prompts":"^8.3.2"},"peerDependenciesMeta":{"@clack/prompts":{"optional":true},"@inquirer/prompts":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/zod_0.2.1_1788485362459_0.5607717882407972","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@politty/zod","version":"0.2.2","keywords":["argument-parser","cli","command-line","type-safe","typescript","zod"],"author":"toiroakr","license":"MIT","_id":"@politty/zod@0.2.2","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"bin":{"politty":"./bin/cli.mjs"},"dist":{"shasum":"502aef3a2efb5d9719a1c7c4d42b55502d2946dd","tarball":"https://registry.npmjs.org/@politty/zod/-/zod-0.2.2.tgz","fileCount":46,"integrity":"sha512-oKqrxQ17wjCCxx23ki4Gtf8PDfWTPARIYdPOq4JK6LJT6Kqyb6oV15POmRHKm40tetnfMaiMnfkps1vL7h2nCg==","signatures":[{"sig":"MEUCIQCFS9d51QtzIDkTNwvVYqYwhpsX73sKqZbtSy1SqHqJIwIgHcJifRELSRPCCOowCmkpspudPXNbYLq2inX8AqkF7as=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCOZeFlwBQzIM9CZpeagqY4vQuf/U5lcLN+l7VURZ6W+wIgDx1C+MNQ3liiLm7pfQ9LkWaYcdSnPcKH1iadRromINg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@politty%2fzod@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":463983},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.12.0 <21.0.0 || >=21.7.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./docs":{"types":"./dist/docs.d.ts","default":"./dist/docs.js"},"./skill":{"types":"./dist/skill.d.ts","default":"./dist/skill.js"},"./prompt":{"types":"./dist/prompt.d.ts","default":"./dist/prompt.js"},"./augment":{"types":"./dist/augment.d.ts","default":"./dist/augment.js"},"./completion":{"types":"./dist/completion.d.ts","default":"./dist/completion.js"},"./prompt/clack":{"types":"./dist/prompt-clack.d.ts","default":"./dist/prompt-clack.js"},"./compile-cache":{"types":"./dist/compile-cache.d.ts","default":"./dist/compile-cache.js"},"./prompt/inquirer":{"types":"./dist/prompt-inquirer.d.ts","default":"./dist/prompt-inquirer.js"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58f1e889-0d0d-4245-8074-f43c60384385"}},"repository":{"url":"https://github.com/toiroakr/politty.git","type":"git","directory":"packages/zod"},"description":"A lightweight CLI framework inspired by citty with zod v4 registry integration for type-safe metadata management","directories":{},"_nodeVersion":"26.0.0","dependencies":{"yaml":"^2.9.0"},"_hasShrinkwrap":false,"devDependencies":{"zod":"4.5.4","tsdown":"0.22.14","typescript":"7.0.2","@types/node":"25.9.5","@politty/core":"0.1.0","@typescript/native-preview":"7.0.0-dev.20260707.2"},"peerDependencies":{"zod":"^4.2.1","@clack/prompts":"^0.10.0 || ^0.11.0 || ^1.0.0","@inquirer/prompts":"^8.3.2"},"peerDependenciesMeta":{"@clack/prompts":{"optional":true},"@inquirer/prompts":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/zod_0.2.2_1788767027092_0.49626714074737444","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@politty/zod","version":"0.2.3","keywords":["argument-parser","cli","command-line","type-safe","typescript","zod"],"author":"toiroakr","license":"MIT","_id":"@politty/zod@0.2.3","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"bin":{"politty":"./bin/cli.mjs"},"dist":{"shasum":"119add8a4018f61b3864ba9c18232202fb39c6b6","tarball":"https://registry.npmjs.org/@politty/zod/-/zod-0.2.3.tgz","fileCount":46,"integrity":"sha512-d0QIazE7fd2w26fPyfyIueBcVjqHyG3pont/vnL2V7NMcF/VnbZpj/IAYLx3w1/aivpzs4+Buq7WRenQ+bE2lg==","signatures":[{"sig":"MEUCIQD4vYkeu/cTTdJ2QlMom3NDxTL9SH7edrUcmXH2WYD6DAIgE3Ie1aQthzuG1YvHCLm5IeGN7QDSLWZS6nJBJPaWsr8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIEAtdzVSfw3dd4iHADOSCr5n1kTz2wEGc3dS3R0e+GSjAiEA487MRslZsFmcSdiyv3fUnTWbGFT9roL3iI5e9KYGgDg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@politty%2fzod@0.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":463983},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.12.0 <21.0.0 || >=21.7.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./docs":{"types":"./dist/docs.d.ts","default":"./dist/docs.js"},"./skill":{"types":"./dist/skill.d.ts","default":"./dist/skill.js"},"./prompt":{"types":"./dist/prompt.d.ts","default":"./dist/prompt.js"},"./augment":{"types":"./dist/augment.d.ts","default":"./dist/augment.js"},"./completion":{"types":"./dist/completion.d.ts","default":"./dist/completion.js"},"./prompt/clack":{"types":"./dist/prompt-clack.d.ts","default":"./dist/prompt-clack.js"},"./compile-cache":{"types":"./dist/compile-cache.d.ts","default":"./dist/compile-cache.js"},"./prompt/inquirer":{"types":"./dist/prompt-inquirer.d.ts","default":"./dist/prompt-inquirer.js"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58f1e889-0d0d-4245-8074-f43c60384385"}},"repository":{"url":"https://github.com/toiroakr/politty.git","type":"git","directory":"packages/zod"},"description":"A lightweight CLI framework inspired by citty with zod v4 registry integration for type-safe metadata management","directories":{},"dependencies":{"yaml":"^2.9.0"},"_hasShrinkwrap":false,"devDependencies":{"zod":"4.5.4","tsdown":"0.22.14","typescript":"7.0.2","@types/node":"25.9.5","@politty/core":"0.1.0","@typescript/native-preview":"7.0.0-dev.20260707.2"},"peerDependencies":{"zod":"^4.2.1","@clack/prompts":"^0.10.0 || ^0.11.0 || ^1.0.0","@inquirer/prompts":"^8.3.2"},"peerDependenciesMeta":{"@clack/prompts":{"optional":true},"@inquirer/prompts":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/zod_0.2.3_1788786697754_0.7434806970324996","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@politty/zod","version":"0.2.4","keywords":["argument-parser","cli","command-line","type-safe","typescript","zod"],"author":"toiroakr","license":"MIT","_id":"@politty/zod@0.2.4","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"bin":{"politty":"./bin/cli.mjs"},"dist":{"shasum":"21d56af32144a34eabb517076cbcc69dec584c8e","tarball":"https://registry.npmjs.org/@politty/zod/-/zod-0.2.4.tgz","fileCount":46,"integrity":"sha512-fIvOPBgt0TUFLGjyrqTMLIMOW0GSGczTU5y54gQhZdyyuptt51l5MDP8e1cvEcbT48SyP+jebuQ6Zf7sUE/AKg==","signatures":[{"sig":"MEYCIQDadoWuGKDph8nO0IDZF9EboVw8wtcDJ/PG5Jyf0HKmcwIhAIkhhaLsPaRsK5WFfojLGibTjEmV5qxvaUndUzB2oTO1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCTn0EFp+f/jF+PYqOuSbsFYIvttcNMXXa9B2pv/ar6dwIgFMhu4sm+oULhxQ7r3QVpusthXqgi28WMhbBA0ZWTEiY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@politty%2fzod@0.2.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":468676},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.12.0 <21.0.0 || >=21.7.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./docs":{"types":"./dist/docs.d.ts","default":"./dist/docs.js"},"./skill":{"types":"./dist/skill.d.ts","default":"./dist/skill.js"},"./prompt":{"types":"./dist/prompt.d.ts","default":"./dist/prompt.js"},"./augment":{"types":"./dist/augment.d.ts","default":"./dist/augment.js"},"./completion":{"types":"./dist/completion.d.ts","default":"./dist/completion.js"},"./prompt/clack":{"types":"./dist/prompt-clack.d.ts","default":"./dist/prompt-clack.js"},"./compile-cache":{"types":"./dist/compile-cache.d.ts","default":"./dist/compile-cache.js"},"./prompt/inquirer":{"types":"./dist/prompt-inquirer.d.ts","default":"./dist/prompt-inquirer.js"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58f1e889-0d0d-4245-8074-f43c60384385"}},"repository":{"url":"https://github.com/toiroakr/politty.git","type":"git","directory":"packages/zod"},"description":"A lightweight CLI framework inspired by citty with zod v4 registry integration for type-safe metadata management","directories":{},"dependencies":{"yaml":"^2.9.0"},"_hasShrinkwrap":false,"devDependencies":{"zod":"4.5.4","tsdown":"0.22.14","typescript":"7.0.2","@types/node":"25.9.5","@politty/core":"0.1.0","@typescript/native-preview":"7.0.0-dev.20260707.2"},"peerDependencies":{"zod":"^4.2.1","@clack/prompts":"^0.10.0 || ^0.11.0 || ^1.0.0","@inquirer/prompts":"^8.3.2"},"peerDependenciesMeta":{"@clack/prompts":{"optional":true},"@inquirer/prompts":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/zod_0.2.4_1788877645803_0.6198343681453609","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@politty/zod","version":"0.3.0","keywords":["argument-parser","cli","command-line","type-safe","typescript","zod"],"author":"toiroakr","license":"MIT","_id":"@politty/zod@0.3.0","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"bin":{"politty":"./bin/cli.mjs"},"dist":{"shasum":"c4b23f446c0d941a9663956f836e71aae1e4568f","tarball":"https://registry.npmjs.org/@politty/zod/-/zod-0.3.0.tgz","fileCount":46,"integrity":"sha512-v01p+p4RtBO1hcc2YC9eJ21tesfnkoTyKUp0VFNy+RalvVW2V9yKC5WkSmFdH/PoEcfHJsxkdk+/6mPzycoV6A==","signatures":[{"sig":"MEUCIH6rnYniZ2Q2BsVS7MyLSuPFG1OK0xBcakVIPElmRpUtAiEA3646Z1I9kwkSieDFAbLd+NBZAg8LOhdOhalWnQcAZEQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCID4Hn3eWSucAKWdKqE4NDXScnh1BUP7jJahnBXigJ2aAAiBvVTGeExWATPRtNOxwAWuBEl4KfT8ikBTNq1nSyybDAA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@politty%2fzod@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":482405},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.12.0 <21.0.0 || >=21.7.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./docs":{"types":"./dist/docs.d.ts","default":"./dist/docs.js"},"./skill":{"types":"./dist/skill.d.ts","default":"./dist/skill.js"},"./prompt":{"types":"./dist/prompt.d.ts","default":"./dist/prompt.js"},"./augment":{"types":"./dist/augment.d.ts","default":"./dist/augment.js"},"./completion":{"types":"./dist/completion.d.ts","default":"./dist/completion.js"},"./prompt/clack":{"types":"./dist/prompt-clack.d.ts","default":"./dist/prompt-clack.js"},"./compile-cache":{"types":"./dist/compile-cache.d.ts","default":"./dist/compile-cache.js"},"./prompt/inquirer":{"types":"./dist/prompt-inquirer.d.ts","default":"./dist/prompt-inquirer.js"}},"scripts":{"build":"tsdown"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58f1e889-0d0d-4245-8074-f43c60384385"}},"repository":{"url":"https://github.com/toiroakr/politty.git","type":"git","directory":"packages/zod"},"description":"A lightweight CLI framework inspired by citty with zod v4 registry integration for type-safe metadata management","directories":{},"dependencies":{"yaml":"^2.9.0"},"_hasShrinkwrap":false,"devDependencies":{"zod":"4.5.4","tsdown":"0.23.0","typescript":"7.0.2","@types/node":"25.9.5","@politty/core":"0.1.0","@typescript/native-preview":"7.0.0-dev.20260707.2"},"peerDependencies":{"zod":"^4.2.1","@clack/prompts":"^0.10.0 || ^0.11.0 || ^1.0.0","@inquirer/prompts":"^8.3.2"},"peerDependenciesMeta":{"@clack/prompts":{"optional":true},"@inquirer/prompts":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/zod_0.3.0_1789520675427_0.7539498132838254","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"_id":"@politty/zod@0.3.1","bin":{"politty":"./bin/cli.mjs"},"dist":{"shasum":"c26e41da42d262375fac417fb128cd93a9409fee","tarball":"https://registry.npmjs.org/@politty/zod/-/zod-0.3.1.tgz","fileCount":46,"integrity":"sha512-xDf7ewLfojCbplj3dIyve4B0Bg7RX17XJ0Kstasz8+YljB/LLMtjbZULEiijZPgiRkblFXbS4X422cLceBIGpA==","signatures":[{"sig":"MEUCIH81gUjhEkEhTU1VpeTqN9MmPvlXTKT1T2b3c/adPpfyAiEA+YL4ZE0zHs8IReEP2vaV3T3SAlRdHIwfltJPG8XOcbA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCyQB7WEjsov1YdMDAiBTMIDTfN+5MoACTEd9cmcEDIcwIhAJUUXlk1FNBHIZCBd81fCoXZbQi1iK39vT5Qh1zcHbkv"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@politty%2fzod@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":483401},"main":"./dist/index.js","name":"@politty/zod","type":"module","types":"./dist/index.d.ts","author":"toiroakr","engines":{"node":">=20.12.0 <21.0.0 || >=21.7.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./cli":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./docs":{"types":"./dist/docs.d.ts","default":"./dist/docs.js"},"./skill":{"types":"./dist/skill.d.ts","default":"./dist/skill.js"},"./prompt":{"types":"./dist/prompt.d.ts","default":"./dist/prompt.js"},"./augment":{"types":"./dist/augment.d.ts","default":"./dist/augment.js"},"./completion":{"types":"./dist/completion.d.ts","default":"./dist/completion.js"},"./prompt/clack":{"types":"./dist/prompt-clack.d.ts","default":"./dist/prompt-clack.js"},"./compile-cache":{"types":"./dist/compile-cache.d.ts","default":"./dist/compile-cache.js"},"./prompt/inquirer":{"types":"./dist/prompt-inquirer.d.ts","default":"./dist/prompt-inquirer.js"}},"license":"MIT","scripts":{"build":"tsdown"},"version":"0.3.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58f1e889-0d0d-4245-8074-f43c60384385"}},"keywords":["argument-parser","cli","command-line","type-safe","typescript","zod"],"repository":{"url":"https://github.com/toiroakr/politty.git","type":"git","directory":"packages/zod"},"description":"A lightweight CLI framework inspired by citty with zod v4 registry integration for type-safe metadata management","directories":{},"maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"dependencies":{"yaml":"^2.9.1"},"_hasShrinkwrap":false,"devDependencies":{"zod":"4.6.5","tsdown":"0.23.0","typescript":"7.0.2","@types/node":"25.9.7","@politty/core":"0.1.0","@typescript/native-preview":"7.0.0-dev.20260707.2"},"peerDependencies":{"zod":"^4.2.1","@clack/prompts":"^0.10.0 || ^0.11.0 || ^1.0.0","@inquirer/prompts":"^8.3.2"},"peerDependenciesMeta":{"@clack/prompts":{"optional":true},"@inquirer/prompts":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/zod_0.3.1_1790259540880_0.5471507074970303"}}},"time":{"created":"2026-08-07T13:08:51.638Z","modified":"2026-09-24T14:19:01.394Z","0.0.0":"2026-08-07T13:08:52.105Z","0.1.0":"2026-08-10T00:04:49.216Z","0.1.1":"2026-08-12T14:55:55.502Z","0.1.2":"2026-08-18T06:40:28.025Z","0.2.0":"2026-09-03T13:06:13.107Z","0.2.1":"2026-09-04T01:29:22.548Z","0.2.2":"2026-09-07T07:43:47.234Z","0.2.3":"2026-09-07T13:11:37.874Z","0.2.4":"2026-09-08T14:27:25.885Z","0.3.0":"2026-09-16T01:04:35.596Z","0.3.1":"2026-09-24T14:19:00.981Z"},"author":"toiroakr","license":"MIT","keywords":["argument-parser","cli","command-line","type-safe","typescript","zod"],"repository":{"url":"https://github.com/toiroakr/politty.git","type":"git","directory":"packages/zod"},"description":"A lightweight CLI framework inspired by citty with zod v4 registry integration for type-safe metadata management","maintainers":[{"name":"toiroakr","email":"toiroakr@gmail.com"}],"readme":"# politty\n\n**politty** is a lightweight, type-safe CLI framework for Node.js built on **Zod v4**.\n\nFrom simple scripts to complex CLI tools with subcommands, validation, and auto-generated help, you can build them all with a developer-friendly API.\n\n## Features\n\n- **Zod Native**: Use Zod schemas directly for argument definition and validation\n- **Type Safety**: Full TypeScript support with automatic type inference for parsed arguments\n- **Flexible Argument Definition**: Support for positional arguments, flags, aliases, arrays, and environment variable fallbacks\n- **Subcommands**: Build Git-style nested subcommands (with lazy loading and alias support)\n- **Lifecycle Management**: Guaranteed `setup` → `run` → `cleanup` execution order\n- **Signal Handling**: Proper SIGINT/SIGTERM handling with guaranteed cleanup execution\n- **Auto Help Generation**: Automatically generate help text from definitions, plus a `--help-json` flag for structured (JSON) help\n- **Interactive Prompts**: Prompt for missing arguments with pluggable adapters (clack, inquirer)\n- **Discriminated Union**: Support for mutually exclusive argument sets\n- **Skill Management**: Manage agent skills (SKILL.md) with file-based install/uninstall\n- **Fast Startup**: Automatic Node.js compile cache (V8 code cache) integration, with a `generate-shim` command to cache the whole CLI graph\n\n## Requirements\n\n- Node.js >= 20.12.0 (excluding 21.0.0 - 21.6.x)\n- Zod >= 4.2.1\n\n## Installation\n\n```bash\nnpm install politty zod\n# or\npnpm add politty zod\n# or\nyarn add politty zod\n```\n\n### Using valibot instead of zod\n\npolitty is also available as [`@politty/valibot`](https://www.npmjs.com/package/@politty/valibot), built on [valibot](https://valibot.dev/) schemas — same API (`defineCommand`, `arg`, `runMain`, and all subpath modules), and its published build never loads zod:\n\n```bash\nnpm install @politty/valibot valibot\n```\n\n```typescript\nimport * as v from \"valibot\";\nimport { defineCommand, runMain, arg } from \"@politty/valibot\";\n\nconst command = defineCommand({\n  name: \"greet\",\n  args: v.object({\n    name: arg(v.string(), { description: \"Name to greet\", positional: true }),\n    loud: arg(v.optional(v.boolean(), false), { alias: \"l\" }),\n  }),\n  run: (args) => {\n    const greeting = `Hello, ${args.name}!`;\n    console.log(args.loud ? greeting.toUpperCase() : greeting);\n  },\n});\n\nrunMain(command);\n```\n\nField descriptions can also come from valibot's own metadata actions. They are actions, not schemas, so they belong inside `v.pipe(...)`: `v.pipe(v.string(), v.description(\"...\"))` or `v.pipe(v.string(), v.metadata({ description: \"...\" }))`. The one zod-only feature without a valibot counterpart is the `politty/augment` module (zod `GlobalMeta` interface augmentation) — use `arg()` or `v.metadata()` instead. The `politty` package itself remains the zod flavor (an alias of `@politty/zod`).\n\n### Using zod/mini instead of zod\n\npolitty is also available as [`@politty/zod-mini`](https://www.npmjs.com/package/@politty/zod-mini), built on [`zod/mini`](https://zod.dev/) — the same `zod` package's minimal, function-style entry point instead of its chainable classic API — for a smaller bundle. Same API (`defineCommand`, `arg`, `runMain`, and all subpath modules):\n\n```bash\nnpm install @politty/zod-mini zod\n```\n\n```typescript\nimport * as z from \"zod/mini\";\nimport { defineCommand, runMain, arg } from \"@politty/zod-mini\";\n\nconst command = defineCommand({\n  name: \"greet\",\n  args: z.object({\n    name: arg(z.string(), { description: \"Name to greet\", positional: true }),\n    loud: arg(z._default(z.boolean(), false), { alias: \"l\" }),\n  }),\n  run: (args) => {\n    const greeting = `Hello, ${args.name}!`;\n    console.log(args.loud ? greeting.toUpperCase() : greeting);\n  },\n});\n\nrunMain(command);\n```\n\n`zod/mini` drops classic zod's chainable sugar (`.optional()`, `.default()`, `.describe()`, `.meta()`), so schemas are built with functions instead (`z.optional(z.string())`, `z._default(z.string(), \"x\")`). Field descriptions come from `arg()` or from zod's own metadata registry: `schema.register(z.globalRegistry, { description: \"...\" })`. The `politty/augment` module (classic zod's `GlobalMeta` interface augmentation) has no `@politty/zod-mini` counterpart for the same reason it has none for valibot — use `arg()` or the registry instead.\n\nYou can write your schemas against either `import * as z from \"zod/mini\"` or [`import * as z from \"@zod/mini\"`](https://zod.dev/packages/mini) — `@zod/mini` re-exports `zod/mini` (same classes, same `globalRegistry`), so schemas built either way are fully interchangeable. Per zod's own installation instructions, install `@zod/mini` alongside `zod` (`npm install zod @zod/mini`), not instead of it — `@zod/mini` only re-exports `zod/mini` from a peer dependency on `zod`, so `zod` still needs to be resolvable in your project either way.\n\n## Quick Start\n\n```typescript\nimport { z } from \"zod\";\nimport { defineCommand, runMain, arg } from \"politty\";\n\nconst command = defineCommand({\n  name: \"greet\",\n  description: \"A CLI tool that displays greetings\",\n  args: z.object({\n    name: arg(z.string(), {\n      positional: true,\n      description: \"Name of the person to greet\",\n    }),\n    greeting: arg(z.string().default(\"Hello\"), {\n      alias: \"g\",\n      description: \"Greeting phrase\",\n    }),\n    loud: arg(z.boolean().default(false), {\n      alias: \"l\",\n      description: \"Output in uppercase\",\n    }),\n  }),\n  run: (args) => {\n    let message = `${args.greeting}, ${args.name}!`;\n    if (args.loud) {\n      message = message.toUpperCase();\n    }\n    console.log(message);\n  },\n});\n\nrunMain(command);\n```\n\nExample usage:\n\n```bash\n$ my-cli World\nHello, World!\n\n$ my-cli World -g \"Hi\" -l\nHI, WORLD!\n\n$ my-cli --help\ngreet\n\nA CLI tool that displays greetings\n\nUsage: greet [options] <name>\n\nArguments:\n  <name>                          Name of the person to greet\n\nOptions:\n  -h, --help                      Show help\n  -H, --help-all                  Show help with all subcommand options\n  --help-json                     Show help as JSON\n  -g, --greeting <GREETING>       Greeting phrase (default: \"Hello\")\n  -l, --loud                      Output in uppercase (default: false)\n```\n\nEvery command also accepts `--help-json`, which prints the same information as a single JSON object instead of formatted text — useful for tools that consume a CLI's help programmatically (e.g. generating docs or another UI) rather than parsing `--help`'s output:\n\n```bash\n$ my-cli --help-json\n{\"name\":\"greet\",\"commandPath\":[],\"rootName\":\"greet\",\"description\":\"A CLI tool that displays greetings\",\"usage\":{\"commandName\":\"greet\",\"hasGlobalOptions\":false,\"hasOptions\":true,\"positionals\":[{\"name\":\"name\",\"required\":true}]},\"builtinOptions\":{\"help\":\"Show help\",\"helpAll\":\"Show help with all subcommand options\",\"helpJson\":\"Show help as JSON\"},\"schemaType\":\"object\",\"positionals\":[{\"name\":\"name\",\"cliName\":\"name\",\"positional\":true,\"required\":true,\"type\":\"string\",\"description\":\"Name of the person to greet\"}],\"options\":[{\"name\":\"greeting\",\"cliName\":\"greeting\",\"positional\":false,\"required\":false,\"type\":\"string\",\"alias\":[\"g\"],\"description\":\"Greeting phrase\",\"defaultValue\":\"Hello\"},{\"name\":\"loud\",\"cliName\":\"loud\",\"positional\":false,\"required\":false,\"type\":\"boolean\",\"alias\":[\"l\"],\"description\":\"Output in uppercase\",\"defaultValue\":false}]}\n```\n\nUnlike `--help-all` (which only expands subcommand options when asked), `--help-json` always includes the full recursive subcommand tree — except for legacy subcommands registered without `lazy()`, which have no synchronous metadata available and appear only as `{ name, unresolved: true }`. Call `generateHelpData(command, options?)` directly to get the same `HelpData` object without going through argv parsing — see [API Reference](./docs/api-reference.md#generatehelpdata).\n\n## Basic Usage\n\n### Defining Arguments\n\nUse the `arg()` function to define argument metadata:\n\n```typescript\nimport { z } from \"zod\";\nimport { arg, defineCommand } from \"politty\";\n\nconst command = defineCommand({\n  name: \"example\",\n  args: z.object({\n    // Positional argument (required)\n    input: arg(z.string(), {\n      positional: true,\n      description: \"Input file\",\n    }),\n\n    // Optional positional argument\n    output: arg(z.string().optional(), {\n      positional: true,\n      description: \"Output file\",\n    }),\n\n    // Flag (with alias)\n    verbose: arg(z.boolean().default(false), {\n      alias: \"v\",\n      description: \"Verbose output\",\n    }),\n\n    // Environment variable fallback\n    apiKey: arg(z.string().optional(), {\n      env: \"API_KEY\",\n      description: \"API key\",\n    }),\n\n    // Array argument (--file a.txt --file b.txt)\n    files: arg(z.array(z.string()).default([]), {\n      alias: \"f\",\n      description: \"Files to process\",\n    }),\n  }),\n  run: (args) => {\n    console.log(args);\n  },\n});\n```\n\nUse `args.$source(name)` to check whether a value came from an explicit CLI token, an `env` fallback, or neither (e.g. a schema default). It's typed as optional since directly-constructed args objects (e.g. in unit tests) won't have it:\n\n```typescript\nrun: (args) => {\n  args.$source?.(\"apiKey\"); // \"cli\" | \"env\" | \"default\"\n},\n```\n\nIt is also available on an `effect`'s context args, which is how a flag whose parsed value cannot reveal its own origin — a boolean, say — tells an explicitly typed `--flag=false` apart from the schema default:\n\n```typescript\njson: arg(z.boolean().default(false), {\n  effect: (value, { args }) => {\n    if (args.$source?.(\"json\") !== \"cli\") applyDefaultFromEnvironment();\n  },\n}),\n```\n\n### Subcommands\n\nDefine Git-style subcommands:\n\n```typescript\nimport { z } from \"zod\";\nimport { arg, defineCommand, runMain } from \"politty\";\n\nconst initCommand = defineCommand({\n  name: \"init\",\n  description: \"Initialize a project\",\n  aliases: [\"i\"],\n  args: z.object({\n    template: arg(z.string().default(\"default\"), {\n      alias: \"t\",\n      description: \"Template name\",\n    }),\n  }),\n  run: (args) => {\n    console.log(`Initializing with template: ${args.template}`);\n  },\n});\n\nconst buildCommand = defineCommand({\n  name: \"build\",\n  description: \"Build the project\",\n  aliases: [\"b\"],\n  args: z.object({\n    output: arg(z.string().default(\"dist\"), {\n      alias: \"o\",\n      description: \"Output directory\",\n    }),\n    minify: arg(z.boolean().default(false), {\n      alias: \"m\",\n      description: \"Minify output\",\n    }),\n  }),\n  run: (args) => {\n    console.log(`Building to: ${args.output}`);\n  },\n});\n\nconst cli = defineCommand({\n  name: \"my-cli\",\n  description: \"Example CLI with subcommands\",\n  subCommands: {\n    init: initCommand,\n    build: buildCommand,\n  },\n});\n\nrunMain(cli, { version: \"1.0.0\" });\n```\n\nExample usage:\n\n```bash\n$ my-cli init -t react\n$ my-cli i -t react        # alias for init\n$ my-cli build -o out -m\n$ my-cli b -o out -m        # alias for build\n$ my-cli --help\n```\n\n### Lifecycle Hooks\n\nExecute hooks in `setup` → `run` → `cleanup` order. The `cleanup` hook is always executed, even if an error occurs:\n\n```typescript\nconst command = defineCommand({\n  name: \"db-query\",\n  description: \"Execute database queries\",\n  args: z.object({\n    database: arg(z.string(), {\n      alias: \"d\",\n      description: \"Database connection string\",\n    }),\n    query: arg(z.string(), {\n      alias: \"q\",\n      description: \"SQL query\",\n    }),\n  }),\n  setup: async ({ args }) => {\n    console.log(\"[setup] Connecting to database...\");\n    // Establish DB connection\n  },\n  run: async (args) => {\n    console.log(\"[run] Executing query...\");\n    // Execute query\n    return { rowCount: 42 };\n  },\n  cleanup: async ({ args, error }) => {\n    console.log(\"[cleanup] Closing connection...\");\n    if (error) {\n      console.error(`Error occurred: ${error.message}`);\n    }\n    // Close connection\n  },\n});\n```\n\n## API\n\n### `defineCommand(options)`\n\nDefine a command.\n\n| Option        | Type                          | Description         |\n| ------------- | ----------------------------- | ------------------- |\n| `name`        | `string`                      | Command name        |\n| `description` | `string?`                     | Command description |\n| `args`        | `ZodSchema`                   | Argument schema     |\n| `aliases`     | `string[]?`                   | Command aliases     |\n| `subCommands` | `Record<string, Command>?`    | Subcommands         |\n| `setup`       | `(context) => Promise<void>?` | Setup hook          |\n| `run`         | `(args) => T?`                | Run function        |\n| `cleanup`     | `(context) => Promise<void>?` | Cleanup hook        |\n\n### `runMain(command, options?)`\n\nCLI entry point. Handles signals and calls `process.exit()`.\n\n```typescript\nrunMain(command, {\n  version: \"1.0.0\", // Displayed with --version flag\n});\n```\n\n### `runCommand(command, argv, options?)`\n\nProgrammatic/testing entry point. Does not call `process.exit()` and returns a result object.\n\n```typescript\nconst result = await runCommand(command, [\"arg1\", \"--flag\"]);\nif (result.success) {\n  console.log(result.result);\n} else {\n  console.error(result.error);\n}\n```\n\n### `arg(schema, meta)`\n\nAttach metadata to an argument.\n\n| Metadata      | Type          | Description                                                              |\n| ------------- | ------------- | ------------------------------------------------------------------------ |\n| `positional`  | `boolean?`    | Treat as positional argument                                             |\n| `alias`       | `string?`     | Short alias (e.g., `-v`)                                                 |\n| `description` | `string?`     | Argument description                                                     |\n| `placeholder` | `string?`     | Placeholder shown in help                                                |\n| `env`         | `string?`     | Environment variable name (fallback)                                     |\n| `completion`  | `object?`     | Shell completion configuration                                           |\n| `prompt`      | `PromptMeta?` | Interactive prompt configuration ([docs](./docs/interactive-prompts.md)) |\n\n## Shell Completion\n\npolitty provides automatic shell completion generation for bash, zsh, and fish.\nThe default generated script is a small runtime dispatcher: when the user\npresses TAB, it resolves the executable currently visible on `PATH` and uses a\nbundled static worker from that executable's package when one is available. If\nno package-relative bundled worker is found, it falls back to a per-binary\nstatic worker cache and regenerates that cache from the hidden\n`__refresh-completion` command when needed. Sourced workers are memoized for the\nshell session, so warm completions call the worker function directly.\nCompletion fields that require runtime JavaScript still delegate to the\nbinary's hidden `__complete` command.\nWhen `NODE_COMPILE_CACHE` is unset, the dispatcher sets it to a\nprogram-specific cache directory before invoking `__complete`, letting Node.js\n22+ reuse V8 module compile cache across repeated completion requests.\n\n### Quick Setup\n\nUse `withCompletionCommand` to add completion support to your CLI:\n\n```typescript\nimport { defineCommand, runMain, withCompletionCommand } from \"politty\";\n\nconst mainCommand = withCompletionCommand(\n  defineCommand({\n    name: \"mycli\",\n    subCommands: {\n      build: buildCommand,\n      test: testCommand,\n    },\n  }),\n);\n\nrunMain(mainCommand);\n```\n\nThen users can enable completions:\n\n```bash\n# Bash\neval \"$(mycli completion bash)\"\n\n# Zsh\neval \"$(mycli completion zsh)\"\n\n# Fish\nmycli completion fish | source\n```\n\nFor project-local CLIs, put the local binary directory in `PATH` with your\nenvironment manager, for example:\n\n```sh\n# .envrc\nPATH_add node_modules/.bin\n```\n\nCompletion then follows the same executable the shell would run.\n\nPublished CLIs can ship a fast worker artifact:\n\n```bash\npolitty generate-worker --bin dist/cli/index.mjs --program mycli --shell zsh --verify\n```\n\nor call `generateBundledCompletionWorker()` from `politty/completion` in your\nown build script. The default output path is\n`dist/completion/<shell>-worker.<ext>`.\n\nThe dispatcher looks for common package-relative worker paths such as\n`dist/completion/zsh-worker.zsh` from the visible binary. Use\n`withCompletionCommand({ bundledWorker: { relativePaths: { zsh: [...] } } })`\nto customize the package-relative lookup. For package layouts that cannot be\nexpressed with relative paths, `bundledWorker.queryCommand: true` lets the\ndispatcher ask the binary's hidden `__completion-worker-path` command on the\nmiss path.\n\nTo generate the older static script with command metadata baked in, use:\n\n```bash\neval \"$(mycli completion bash --static)\"\neval \"$(mycli completion zsh --static)\"\n```\n\n### Value Completion\n\nDefine completion hints for arguments:\n\n```typescript\nconst command = defineCommand({\n  name: \"build\",\n  args: z.object({\n    // Auto-detected from z.enum()\n    format: arg(z.enum([\"json\", \"yaml\", \"xml\"]), {\n      alias: \"f\",\n      description: \"Output format\",\n    }),\n\n    // File completion\n    config: arg(z.string(), {\n      completion: { type: \"file\", extensions: [\"json\", \"yaml\"] },\n    }),\n\n    // Directory completion\n    outputDir: arg(z.string(), {\n      completion: { type: \"directory\" },\n    }),\n\n    // Custom shell command\n    branch: arg(z.string().optional(), {\n      completion: {\n        custom: { shellCommand: \"git branch --format='%(refname:short)'\" },\n      },\n    }),\n\n    // Static choices\n    environment: arg(z.string(), {\n      completion: {\n        custom: { choices: [\"development\", \"staging\", \"production\"] },\n      },\n    }),\n  }),\n  run: (args) => {\n    /* ... */\n  },\n});\n```\n\n## Faster Startup (Compile Cache)\n\npolitty integrates Node.js's on-disk compile cache (V8 code cache, Node >= 22.8.0) so warm starts skip recompilation; older runtimes are a silent no-op. `runMain` enables it automatically, which covers dynamically imported modules such as `lazy()` subcommands. To cache the whole CLI graph — politty, zod, and your command definitions — generate a bin shim as part of your build:\n\n```jsonc\n// package.json\n{\n  \"bin\": { \"my-cli\": \"./dist/bin.js\" },\n  \"scripts\": {\n    \"build\": \"tsdown\", // builds src/cli.ts -> dist/cli.js\n    \"postbuild\": \"politty generate-shim --entry ./cli.js\",\n  },\n}\n```\n\n`generate-shim` writes an executable shim that enables the cache and loads `--entry` (a specifier relative to the shim) with a dynamic import. The output path and program name come from `package.json` (the `bin` path and the `bin` name), and the shim imports the cache helper from the politty package whose `politty` bin you ran — the one you installed, so it resolves from your package. Packages with multiple bins pass `--entry` once per bin, and `--entry` itself can be omitted when the entry sits next to the shim under a conventional name (`./cli.js`, `./index.js`, ...). See [Faster Startup (Compile Cache)](./docs/recipes.md#faster-startup-compile-cache) for the flags, the opt-out (`compileCache: false`), and the hand-written shim variant.\n\n## Skill Management\n\npolitty manages SKILL.md-based agent skills distributed via npm packages.\n\n### Quick Setup\n\nUse `withSkillCommand` to add skill management to your CLI:\n\n```typescript\nimport { dirname, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { defineCommand, runMain } from \"politty\";\nimport { withSkillCommand } from \"politty/skill\";\n\n// Resolves to ../skills from both src/ and dist/\nconst sourceDir = resolve(dirname(fileURLToPath(import.meta.url)), \"../skills\");\n\nconst cli = withSkillCommand(\n  defineCommand({\n    name: \"my-agent\",\n    subCommands: {/* ... */},\n  }),\n  { sourceDir, package: \"@my-agent/skills\" },\n);\n\nrunMain(cli);\n```\n\n`package` identifies who owns these skills. It is combined with the command name as `\"{package}:{cliName}\"` and must match the `metadata[\"politty-cli\"]` stamp pre-declared in each source SKILL.md — `skills add`/`sync` refuse mismatches, and `remove`/`sync` refuse to delete skills belonging to another tool. The default install mode is `\"symlink\"` (`.agents/skills/<name>` -> source, `.claude/skills/<name>` -> canonical), so source updates propagate live; on filesystems without symlink support (e.g. Windows without Developer Mode) install throws with guidance to retry with `mode: \"copy\"`, which recursively copies instead (source updates then require re-running `sync`). See [Skill Management](./docs/skill-management.md) for details.\n\nSkills are SKILL.md files with YAML frontmatter (spec-compliant: https://agentskills.io/specification). The `metadata[\"politty-cli\"]` stamp is authored by the skill package:\n\n```markdown\n---\nname: commit\ndescription: Git commit message generation\nlicense: MIT\nmetadata:\n  politty-cli: \"@my-agent/skills:my-agent\"\n---\n\n# Instructions for the agent...\n```\n\nThen users can manage skills:\n\n```bash\nmy-agent skills sync              # Remove and reinstall all skills\nmy-agent skills add commit        # Install a specific skill\nmy-agent skills remove commit     # Remove a specific skill\nmy-agent skills list              # List available skills\n```\n\n## Documentation\n\nFor detailed documentation, see the `docs/` directory:\n\n- [Getting Started](./docs/getting-started.md) - Installation and creating your first command\n- [Essentials](./docs/essentials.md) - Core concepts explained\n- [Advanced Features](./docs/advanced-features.md) - Subcommands, Discriminated Union\n- [Interactive Prompts](./docs/interactive-prompts.md) - Prompt for missing arguments interactively\n- [Recipes](./docs/recipes.md) - Testing, configuration, error handling, faster startup (compile cache)\n- [Skill Management](./docs/skill-management.md) - Agent skill management (SKILL.md-based)\n- [API Reference](./docs/api-reference.md) - Detailed API reference\n- [Doc Generation](./docs/doc-generation.md) - Automatic documentation generation\n\n## Examples\n\nThe `playground/` directory contains many examples:\n\n- `01-hello-world` - Minimal command configuration\n- `02-greet` - Positional arguments and flags\n- `03-array-args` - Array arguments\n- `05-lifecycle-hooks` - Lifecycle hooks\n- `10-subcommands` - Subcommands\n- `12-discriminated-union` - Discriminated Union\n- `21-lazy-subcommands` - Lazy loading\n- `26-command-alias` - Command aliases\n\n## License\n\nMIT\n","readmeFilename":""}