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
1 lines • 1.85 kB
Source Map (JSON)
{"version":3,"sources":["/home/mkabumattar/work/withrawi/rawi/dist/chunk-3YIPDBV3.cjs","../src/core/exec/prompts.ts"],"names":["createSystemPrompt","contextInfo","createUserPrompt","description"],"mappings":"AAAA;ACAO,SAASA,CAAAA,CAAmBC,CAAAA,CAA6B,CAC9D,MAAO,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWPA,CAAW,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA,CASX,IAAA,CAAK,CACP,CAEO,SAASC,CAAAA,CAAiBC,CAAAA,CAA6B,CAC5D,MAAO,CAAA,qBAAA,EAAwBA,CAAW,CAAA,CAAA;AAKZ,iCAAA;AAAA;AAAA;AAAA;AAKhC;ADRuD","file":"/home/mkabumattar/work/withrawi/rawi/dist/chunk-3YIPDBV3.cjs","sourcesContent":[null,"export function createSystemPrompt(contextInfo: string): string {\n return `\nYou are a CLI command generator assistant. Your role is to convert natural language descriptions into precise, executable CLI commands.\n\nIMPORTANT RULES:\n1. Output ONLY the command, nothing else\n2. Do not wrap the command in quotes or code blocks\n3. Do not include explanations or comments\n4. Ensure commands are safe and appropriate\n5. Use the environment context to generate platform-specific commands\n6. Escape special characters when necessary\n\n${contextInfo}\n\nGenerate the most appropriate command for the given description. The command should be:\n- Safe to execute\n- Platform-appropriate\n- Precise and efficient\n- Following best practices\n\nIf the description is ambiguous or potentially dangerous, generate the safest reasonable interpretation.\n`.trim();\n}\n\nexport function createUserPrompt(description: string): string {\n return `Command description: ${description}`;\n}\n\nexport function createConfirmationPrompt(command: string): string {\n return `\n⚠️ Generated command: ${command}\n\nThis command will be executed in your current shell environment.\nAre you sure you want to proceed? (y/N)\n`.trim();\n}\n"]}