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 • 3.11 kB
JavaScript
;Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/* 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. */
var _chunk6RL24HUMcjs = require('./chunk-6RL24HUM.cjs');var _prompts = require('@inquirer/prompts');var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);var _clitable3 = require('cli-table3'); var _clitable32 = _interopRequireDefault(_clitable3);var p=a=>_chunk6RL24HUMcjs.a.find(t=>t.id===a),y= exports.b =async()=>{let t=_chunk6RL24HUMcjs.a.slice().sort((o,l)=>o.label.localeCompare(l.label)),s=Math.ceil(t.length/10),n=0,r=o=>{let l=new (0, _clitable32.default)({head:[_chalk2.default.cyan("ID"),_chalk2.default.cyan("Label"),_chalk2.default.cyan("Category"),_chalk2.default.cyan("Description")],style:{head:["cyan"]},colWidths:[16,22,16,36],wordWrap:!0});t.slice(o*10,(o+1)*10).forEach(c=>{l.push([_chalk2.default.green(c.id),c.label,_chalk2.default.blue(c.category),""])}),console.log(_chalk2.default.bold.cyan(`
\u{1F3AD} Available Act Templates:`)),console.log(l.toString()),console.log(_chalk2.default.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 _prompts.select.call(void 0, {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(_chalk2.default.dim('Usage: rawi ask --act <template-id> "your question"')),console.log(_chalk2.default.dim("Show template: rawi act --show <template-id>"))},b= exports.c =a=>{let t=p(a);if(!t){console.error(_chalk2.default.red(`\u274C Act template '${a}' not found.`)),console.log(_chalk2.default.yellow('\u{1F4A1} Use "rawi act --list" to see available templates.'));return}console.log(_chalk2.default.bold.cyan(`
\u{1F3AD} Act Template: ${t.label}`)),console.log(_chalk2.default.blue(`ID: ${t.id}`)),console.log(_chalk2.default.blue(`Category: ${t.category}`)),console.log(),console.log(_chalk2.default.bold("Template:")),console.log(_chalk2.default.white(t.template)),console.log(),console.log(_chalk2.default.dim(`Usage: rawi ask --act ${t.id} "{userInput}"`))},w= exports.d =(a,t)=>{let s=p(a);if(!s)throw new Error(`Act template '${a}' not found`);return s.template.replace("{userInput}",t)};exports.a = p; exports.b = y; exports.c = b; exports.d = w;
/* 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-7D7CXXN7.cjs.map