var o={script:e=>{let t=e[e.length-1];if(!!t)return["ipatool","search",t,"--limit","10","--format","json"]},postProcess:e=>{if(!e)return[];try{let{apps:t}=JSON.parse(e);return t.map(n=>({name:n.bundleID,description:`${n.name} - ${n.version}`}))}catch(t){return[]}}},i={name:["-b","--bundle-identifier"],description:"Bundle identifier of the app",isRequired:!0,args:{name:"identifier",generators:o,filterStrategy:"fuzzy",debounce:!0}},r={name:"ipatool",displayName:"IPATool",description:"IPATool is a command line tool that allows you to search for iOS apps on the App Store and download a copy of the app package, known as an ipa file",subcommands:[{name:"auth",description:"Authenticate with the App Store",subcommands:[{name:"info",description:"Show current account info"},{name:"login",description:"Login to the App Store",options:[{name:"--auth-code",description:"2FA code for the Apple ID",args:{name:"2FA code"}},{name:["-e","--email"],description:"Apple ID email address",isRequired:!0},{name:["-p","--password"],description:"Apple ID password",isRequired:!0}]},{name:"revoke",description:"Revoke your App Store credentials"}]},{name:"completion",description:"Generate shell completion script",subcommands:[{name:"bash",description:"Generate the autocompletion script for bash"},{name:"fish",description:"Generate the autocompletion script for fish"},{name:"powershell",description:"Generate the autocompletion script for powershell"},{name:"zsh",description:"Generate the autocompletion script for zsh"}]},{name:"download",description:"Download (encrypted) iOS app packages from the App Store",options:[i,{name:["-o","--output"],description:"The destination path of the downloaded app package",args:{name:"output path",template:"folders"}},{name:"--purchase",description:"Obtain a license for the app if needed"}]},{name:"help",description:"Display help for command",args:{name:"command",isOptional:!0,template:"help"}},{name:"purchase",description:"Obtain a license for the app from the App Store",options:[i]},{name:"search",description:"Search for iOS apps available on the App Store",args:{name:"query"},options:[{name:["-l","--limit"],description:"Limit the number of results",args:{name:"limit",default:"5"}}]}],options:[{name:["-h","--help"],description:"Show help for ipatool",isPersistent:!0},{name:"--non-interactive",description:"Run in non-interactive session",isPersistent:!0},{name:"--verbose",description:"Enables verbose logs",isPersistent:!0},{name:"--format",description:"Output format",isPersistent:!0,args:{name:"format",suggestions:["text","json"],default:"text"}},{name:["-v","--version"],description:"Show version for ipatool"}]},a=r;export{a as default};
