UNPKG

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 3.03 kB
"use strict";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 _chunk7D7CXXN7cjs = require('./chunk-7D7CXXN7.cjs');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 _commander = require('commander');var P=()=>{let i=new (0, _commander.Command)("act");return i.description([_chalk2.default.bold("List and explore act templates for specialized prompts."),"",_chalk2.default.gray("Use these to quickly apply expert prompt patterns."),_chalk2.default.gray("Use --list to see all templates, --show <template> for details.")].join(` `)).option("-l, --list",_chalk2.default.white("List all available act templates")).option("-s, --show <template>",_chalk2.default.white("Show details of a specific act template")).addHelpText("after",[_chalk2.default.bold.cyan(` See also:`),_chalk2.default.gray(" rawi ask --profile <profile> --act <template> <query>"),_chalk2.default.gray(" rawi configure --show"),_chalk2.default.gray(" rawi provider --list"),_chalk2.default.gray(" rawi act --list")].join(` `)).action(async s=>{if(s.list){let r=_chunk6RL24HUMcjs.a;if(!r||r.length===0){console.log(_chalk2.default.yellow("No act templates found."));return}let l=6,o=0,n=Math.ceil(r.length/l),c=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:[40,22,18,36],wordWrap:!0}),p=a=>{c.length=0,r.slice(a*l,(a+1)*l).forEach(t=>{c.push([_chalk2.default.cyan(t.id),t.label,t.category,t.description||""])}),console.log(c.toString()),console.log(_chalk2.default.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 _prompts.select.call(void 0, {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){_chunk7D7CXXN7cjs.c.call(void 0, s.show);return}i.help()}),i};exports.a = P; /* 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-IAC4SQQC.cjs.map