Skip to content

Rawi (راوي) Documentation | Getting Started

To use the Rawi CLI, you need to meet a few prerequisites depending on the AI provider you want to access. Rawi supports multiple providers, each with its own requirements for credentials and setup.

  • Node.js: Version 18.0.0 or higher
  • Package Manager: npm, pnpm, or yarn
  • Operating System: Linux, macOS, or Windows

To access AI services with Rawi, you need credentials for the provider you want to use. For security, do not share your API keys or credentials.

ProviderPrerequisite Account / CredentialsNotes
OpenAIOpenAI account, API keyGet API key from OpenAI Platform
AnthropicAnthropic account, API keyGet API key from Anthropic Console
Google GeminiGoogle account, API keyGet API key from Google AI Studio
Ollama (local)None (runs locally)Install Ollama and pull models
Azure OpenAIAzure subscription, API key, resource nameSee Azure OpenAI docs
Amazon BedrockAWS account, IAM credentials or access keysUse IAM user or AWS credential chain
Qwen (Alibaba)Alibaba Cloud account, API key
xAIxAI account, API key
  • Do not use root or admin credentials for daily tasks.
  • Create provider-specific users or API keys with least privilege.
  • Store credentials securely (Rawi stores them encrypted in ~/.rawi/).
  • For AWS Bedrock, use IAM roles or the AWS credential provider chain.

After you have the required credentials:

  1. Install Rawi CLI:

    Terminal window
    npm install -g rawi
  2. Configure your first provider (interactive):

    Terminal window
    rawi configure

    Or configure via command line for automation:

    Terminal window
    rawi configure --provider openai --api-key <your-key> --model gpt-4o
  3. Verify installation:

    Terminal window
    rawi --version
    rawi info
  4. Start using Rawi:

    Terminal window
    rawi ask "What is TypeScript?"