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

13 lines 3.7 kB
/* 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 l}from"./chunk-OIOQX4NN.js";import{a}from"./chunk-ZNEVPN2P.js";import{e as s}from"./chunk-LDSHVY7O.js";import{b as n}from"./chunk-U7K37PAJ.js";import o from"chalk";import{Command as c}from"commander";var y=()=>{let e=new c("info");return e.description([o.bold("Display information about Rawi and its capabilities."),"",o.gray("Show version, author, license, configuration status, and more.")].join(` `)).option("--profiles",o.white("Show configured profiles")).action(async r=>{try{if(r.profiles){await f();return}await g()}catch(i){console.error(o.red(`Error displaying information: ${i}`))}}),e},g=async()=>{n.start("info-load","Loading system information...");try{let r=new a().listProfiles(),i=s();n.succeed("info-load","System information loaded"),console.log(`${o.bold.blue(` \u{1F680} About Rawi (\u0631\u0627\u0648\u064A)`)} ${o.gray("https://rawi.mkabumattar.com")}`),console.log(o.whiteBright("A developer-friendly AI-powered CLI tool for clear answers, summaries, and analyses.")),console.log(o.gray("Supports OpenAI, Google, Amazon Bedrock, and more.")),l.homepage&&console.log(o.bold("\u{1F4DA} Docs: ")+o.underline.cyan(l.homepage)),console.log(` ${o.bold.blue("\u{1F4CB} System Information")}`),console.log(`${o.blue(" Version:")} ${o.whiteBright(l.version)}`),console.log(`${o.blue(" Author: ")} ${o.whiteBright(l.author?.name||"Mohammad Abu Mattar")}`),console.log(`${o.blue(" License:")} ${o.whiteBright(l.license||"MIT")}`),console.log(` ${o.bold.blue("\u2699\uFE0F Configuration Status")}`),console.log(`${o.blue(" Profiles:")} ${o.whiteBright(r.length>0?`${r.length} configured`:"No profiles configured")}`),console.log(`${o.blue(" Providers:")} ${o.whiteBright(`${i.length} supported`)}`),r.length>0?console.log(o.gray(" \u2022 Run ")+o.cyan("rawi info --profiles")+o.gray(" to see profile details")):console.log(o.yellow(' \u2022 Run "rawi configure" to set up your first profile')),console.log(o.gray(" \u2022 Run ")+o.cyan("rawi provider --list")+o.gray(" to see supported providers")),console.log(` ${o.bold.blue("\u2500".repeat(50))}`)}catch(e){throw n.fail("info-load","Failed to load system information"),e}},f=async()=>{n.start("profiles-load","Loading profile information...");try{let e=new a,r=e.listProfiles();if(r.length===0){n.succeed("profiles-load","No profiles found"),console.log(o.yellow(` \u274C No profiles configured.`)),console.log(o.gray('Run "rawi configure" to set up your first profile.'));return}n.succeed("profiles-load",`Found ${r.length} profile(s)`),console.log(o.bold.blue(` \u{1F464} Configured Profiles (${r.length})`));for(let i of r){let t=e.getCredentials(i);t&&(console.log(o.bold(` [${i}]`)),console.log(o.blue(" Provider:")+o.white(` ${t.provider}`)),console.log(o.blue(" Model:")+o.white(` ${t.model}`)),console.log(o.blue(" Language:")+o.white(` ${t.language||"english"}`)))}console.log(o.gray(` Run "rawi configure --show" for detailed configuration`))}catch(e){throw n.fail("profiles-load","Failed to load profile information"),e}};export{y 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-GB62DDK2.js.map