rawi
Version:
Rawi (راوي) is the developer-friendly AI CLI that brings the power of 11 major AI providers directly to your terminal. With seamless shell integration, persistent conversations, and 200+ specialized prompt templates, Rawi transforms your command line into
4 lines • 1.67 kB
JavaScript
/* Rawi (راوي) is the developer-friendly AI CLI that brings the power of 11 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,b as m}from"./chunk-RAPYU56U.js";import{f as d}from"./chunk-LRM7AD6A.js";import{a as c,b as u}from"./chunk-3A2UFOTH.js";import{c as o}from"./chunk-HI45C3TT.js";async function x(e){let t=await a(),n=m(t),r=c(n),s=u(e.description),i=await o({credentials:e.credentials,systemPrompt:r,userPrompt:s});return{command:i.command,description:e.description,context:n,generationTime:i.generationTime}}function C(e){let t=[],n=d(e),r=[/rm\s+-rf\s*\/\s*$/,/rm\s+-rf\s*\*\s*$/,/>\s*\/dev\/sda/,/dd\s+.*of=\/dev/,/mkfs/,/fdisk/,/:(){ :|:& };:/,/sudo\s+rm/,/sudo\s+dd/,/curl.*\|\s*sh/,/wget.*\|\s*sh/];for(let s of r)if(s.test(e)){n=!0,t.push("This command may be dangerous and could cause system damage");break}return!e||e.trim()===""?{isValid:!1,isDangerous:!1,warnings:["Generated command is empty"]}:(e.length>1e3&&t.push("Generated command is unusually long"),(e.includes(";")||e.includes("&&")||e.includes("||"))&&t.push("Command contains multiple operations"),{isValid:!0,isDangerous:n,warnings:t})}export{x as a,C as b};
/* Rawi (راوي) is the developer-friendly AI CLI that brings the power of 11 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-DOCDUULR.js.map