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
4 lines • 2.94 kB
JavaScript
/* 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{input as s}from"@inquirer/prompts";import n from"chalk";var a=class{async getBaseURL(t){console.log(n.gray("\\nNote: The Base URL is where your service is running.")),console.log(n.gray("Leave empty to use the default endpoint."));let e=(await s({message:"Base URL:",default:t||"",validate:r=>{if(!r.trim())return!0;try{return new URL(r.trim()),!0}catch{return"Please enter a valid URL (e.g., https://api.example.com)"}}})).trim();return e===""?void 0:e}async getAPIEndpoint(t){console.log(n.gray("\\nNote: API endpoint for custom deployments.")),console.log(n.gray("Leave empty to use the default endpoint."));let e=(await s({message:"API Endpoint:",default:t||"",validate:r=>{if(!r.trim())return!0;let o=r.trim();return!o.startsWith("http://")&&!o.startsWith("https://")?"Endpoint must start with http:// or https://":!0}})).trim();return e===""?void 0:e}async getRegion(t){return console.log(n.gray("\\nSelect the region for your cloud provider:")),(await s({message:"Region:",default:t||"us-east-1",validate:e=>e.trim()?!0:"Region is required"})).trim()}async getProjectId(t){return console.log(n.gray("\\nNote: Project ID from your cloud provider console.")),(await s({message:"Project ID:",default:t||"",validate:e=>{if(!e.trim())return"Project ID is required";let r=e.trim();return/^[a-zA-Z0-9-]+$/.test(r)?!0:"Project ID can only contain letters, numbers, and hyphens"}})).trim()}async getAccessKey(t){return console.log(n.gray("\\nNote: AWS Access Key ID from your AWS console.")),(await s({message:"Access Key ID:",default:t||"",validate:e=>{if(!e.trim())return"Access Key ID is required";let r=e.trim();return r.length<16||r.length>32?"Access Key ID should be 16-32 characters long":!0}})).trim()}async getSecretAccessKey(t){return console.log(n.gray("\\nNote: AWS Secret Access Key from your AWS console.")),(await s({message:"Secret Access Key:",default:t||"",validate:e=>e.trim()?e.trim().length<16?"Secret Access Key seems too short":!0:"Secret Access Key is required"})).trim()}async getSessionToken(t){console.log(n.gray("\\nNote: Optional session token for temporary AWS credentials.")),console.log(n.gray("Leave empty if using permanent credentials."));let e=(await s({message:"Session Token (optional):",default:t||""})).trim();return e===""?void 0:e}};export{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-47WZZKSY.js.map