rawi
Version:
Rawi (راوي) is the developer-friendly AI CLI that brings the power of 12 major AI providers directly to your terminal. With seamless shell integration, persistent conversations, and 200+ specialized prompt templates, Rawi transforms your command line into
7 lines • 2.35 kB
JavaScript
/* Rawi (راوي) is the developer-friendly AI CLI that brings the power of 12 major AI providers directly to your terminal. With seamless shell integration, persistent conversations, and 200+ specialized prompt templates, Rawi transforms your command line into an intelligent development workspace. */
import{c as f}from"./chunk-D5ICEXBJ.js";import{a as g}from"./chunk-74WQMBHW.js";import{select as h}from"@inquirer/prompts";import e from"chalk";import y from"cli-table3";import{Command as d}from"commander";var P=()=>{let i=new d("act");return i.description([e.bold("List and explore act templates for specialized prompts."),"",e.gray("Use these to quickly apply expert prompt patterns."),e.gray("Use --list to see all templates, --show <template> for details.")].join(`
`)).option("-l, --list",e.white("List all available act templates")).option("-s, --show <template>",e.white("Show details of a specific act template")).addHelpText("after",[e.bold.cyan(`
See also:`),e.gray(" rawi ask --profile <profile> --act <template> <query>"),e.gray(" rawi configure --show"),e.gray(" rawi provider --list"),e.gray(" rawi act --list")].join(`
`)).action(async s=>{if(s.list){let r=g;if(!r||r.length===0){console.log(e.yellow("No act templates found."));return}let l=6,o=0,n=Math.ceil(r.length/l),c=new y({head:[e.cyan("ID"),e.cyan("Label"),e.cyan("Category"),e.cyan("Description")],style:{head:["cyan"]},colWidths:[40,22,18,36],wordWrap:!0}),p=a=>{c.length=0,r.slice(a*l,(a+1)*l).forEach(t=>{c.push([e.cyan(t.id),t.label,t.category,t.description||""])}),console.log(c.toString()),console.log(e.gray(`Page ${a+1} of ${n}`))};if(r.length>l){let a=!1;for(;!a;){p(o);let t=[];o>0&&t.push({name:"Previous",value:"prev"}),o<n-1&&t.push({name:"Next",value:"next"}),t.push({name:"Exit",value:"exit"});let m=await h({message:"Navigate pages:",choices:t,default:o<n-1?"next":"exit"});m==="prev"?o--:m==="next"?o++:a=!0,a||console.clear()}}else p(0);return}if(s.show){f(s.show);return}i.help()}),i};export{P as a};
/* Rawi (راوي) is the developer-friendly AI CLI that brings the power of 12 major AI providers directly to your terminal. With seamless shell integration, persistent conversations, and 200+ specialized prompt templates, Rawi transforms your command line into an intelligent development workspace. */
//# sourceMappingURL=chunk-O2V7PARJ.js.map