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
6 lines • 2.4 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{a as i}from"./chunk-74WQMBHW.js";import{select as g}from"@inquirer/prompts";import e from"chalk";import m from"cli-table3";var p=a=>i.find(t=>t.id===a),y=async()=>{let t=i.slice().sort((o,l)=>o.label.localeCompare(l.label)),s=Math.ceil(t.length/10),n=0,r=o=>{let l=new m({head:[e.cyan("ID"),e.cyan("Label"),e.cyan("Category"),e.cyan("Description")],style:{head:["cyan"]},colWidths:[16,22,16,36],wordWrap:!0});t.slice(o*10,(o+1)*10).forEach(c=>{l.push([e.green(c.id),c.label,e.blue(c.category),""])}),console.log(e.bold.cyan(`
\u{1F3AD} Available Act Templates:`)),console.log(l.toString()),console.log(e.gray(`Page ${o+1} of ${s}`))};if(t.length>10){let o=!1;for(;!o;){r(n);let l=[];n>0&&l.push({name:"Previous",value:"prev"}),n<s-1&&l.push({name:"Next",value:"next"}),l.push({name:"Exit",value:"exit"});let c=await g({message:"Navigate pages:",choices:l,default:n<s-1?"next":"exit"});c==="prev"?n--:c==="next"?n++:o=!0,o||console.clear()}}else r(0);console.log(),console.log(e.dim('Usage: rawi ask --act <template-id> "your question"')),console.log(e.dim("Show template: rawi act --show <template-id>"))},b=a=>{let t=p(a);if(!t){console.error(e.red(`\u274C Act template '${a}' not found.`)),console.log(e.yellow('\u{1F4A1} Use "rawi act --list" to see available templates.'));return}console.log(e.bold.cyan(`
\u{1F3AD} Act Template: ${t.label}`)),console.log(e.blue(`ID: ${t.id}`)),console.log(e.blue(`Category: ${t.category}`)),console.log(),console.log(e.bold("Template:")),console.log(e.white(t.template)),console.log(),console.log(e.dim(`Usage: rawi ask --act ${t.id} "{userInput}"`))},w=(a,t)=>{let s=p(a);if(!s)throw new Error(`Act template '${a}' not found`);return s.template.replace("{userInput}",t)};export{p as a,y as b,b as c,w as d};
/* 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-D5ICEXBJ.js.map