var m=(s,t,e)=>new Promise((a,n)=>{var o=r=>{try{c(e.next(r))}catch(p){n(p)}},i=r=>{try{c(e.throw(r))}catch(p){n(p)}},c=r=>r.done?a(r.value):Promise.resolve(r.value).then(o,i);c((e=e.apply(s,t)).next())});var d={custom:(s,t,e)=>m(void 0,null,function*(){let{stdout:a}=yield t({command:"cat",args:[`${e.environmentVariables.HOME}/.projj/cache.json`]}),n=JSON.parse(a);return Object.keys(n).map(o=>({name:o.split("/").pop(),description:n[o].repo}))})},g={custom:(s,t,e)=>m(void 0,null,function*(){let{stdout:a}=yield t({command:"cat",args:[`${e.environmentVariables.HOME}/.projj/config.json`]}),o=JSON.parse(a).hooks;return Object.keys(o).map(i=>({name:i,description:o[i]}))})},y={name:"projj",description:"Manage repository easily",subcommands:[{name:"completion",description:"Generate completion script"},{name:"add",description:"Add repository",args:{name:"repository url"}},{name:"find",description:"Find repository",args:{name:"repository name",generators:d}},{name:"import",description:"Import repositories from existing directory",args:{name:"directory",template:"folders"}},{name:"init",description:"Initialize configuration"},{name:"remove",description:"Remove repository",args:{name:"repository name",generators:d}},{name:"run",description:"Run hook in current directory",args:{name:"hook name",generators:g}},{name:"runall",description:"Run hook in every repository",args:{name:"hook name",generators:g}},{name:"sync",description:"Sync data from directory",args:{name:"directory",template:"folders"}}],options:[{name:["--help","-h"],description:"Show help for projj"},{name:["--version","-v"],description:"Show version number"}]},h=y;export{h as default};
