Installation & Setup
Installation & Setup
Section titled “Installation & Setup”Get Rawi up and running on your system in just a few minutes.
📋 Table of Contents
Section titled “📋 Table of Contents”System Requirements
Section titled “System Requirements”Before installing Rawi, ensure your system meets these requirements:
- Node.js: Version 18.0.0 or higher
- Operating System: Windows, macOS, or Linux
- Terminal: Any modern terminal (Terminal.app, iTerm2, Windows Terminal, PowerShell, etc.)
- Internet Connection: Required for cloud AI providers (optional for local providers like Ollama)
Check Your Node.js Version
Section titled “Check Your Node.js Version”node --version
If you need to install or update Node.js, visit nodejs.org.
Installation Methods
Section titled “Installation Methods”NPM (Recommended)
Section titled “NPM (Recommended)”The easiest way to install Rawi globally:
npm install -g rawi
pnpm add -g rawi
yarn global add rawi
bun add -g rawi
No Installation Required (npx)
Section titled “No Installation Required (npx)”Use Rawi without installing it globally:
# Run commands directly with npxnpx rawi ask "What is TypeScript?"npx rawi configure
Development Version
Section titled “Development Version”Install the latest development version from GitHub:
# Clone and install from sourcegit clone https://github.com/withrawi/rawi.gitcd rawinpm installnpm run buildnpm link
Post-Installation Setup
Section titled “Post-Installation Setup”After installing Rawi, you’ll need to configure at least one AI provider to start using it.
Link for global usage
Section titled “Link for global usage”npm link
### Interactive Configuration (Recommended)
Run the interactive configuration wizard:
```bashrawi configure
This will guide you through:
- Choosing an AI provider
- Selecting a model
- Entering API credentials
- Setting up basic preferences
Quick Setup Examples
Section titled “Quick Setup Examples”Choose one of these popular options for quick setup:
OpenAI (Best for General Use)
Section titled “OpenAI (Best for General Use)”# Get API key from: https://platform.openai.com/api-keysrawi configure \ --provider openai \ --model gpt-4o \ --api-key sk-your-api-key
Ollama (Free & Private)
Section titled “Ollama (Free & Private)”# Install Ollama first: https://ollama.com/downloadollama pull llama3.2rawi configure \ --provider ollama \ --model llama3.2
Anthropic Claude (Great for Analysis)
Section titled “Anthropic Claude (Great for Analysis)”# Get API key from: https://console.anthropic.com/rawi configure \ --provider anthropic \ --model claude-3-5-sonnet-20241022 \ --api-key sk-ant-your-key
DeepSeek (Cost-Effective with Reasoning)
Section titled “DeepSeek (Cost-Effective with Reasoning)”# Get API key from: https://platform.deepseek.com/api_keysrawi configure \ --provider deepseek \ --model deepseek-chat \ --api-key sk-your-deepseek-key
Mistral (European AI)
Section titled “Mistral (European AI)”# Get API key from: https://console.mistral.ai/api-keys/rawi configure \ --provider mistral \ --model mistral-large-latest \ --api-key your-mistral-key
Google Gemini (Fast & Efficient)
Section titled “Google Gemini (Fast & Efficient)”# Get API key from: https://aistudio.google.com/app/apikeyrawi configure \ --provider google \ --model gemini-2.0-flash-exp \ --api-key AIza-your-key
Verification
Section titled “Verification”After installation and configuration, verify everything is working:
Check Installation
Section titled “Check Installation”# Check Rawi versionrawi --version
# Show system informationrawi info
# List available commandsrawi --help
Test Configuration
Section titled “Test Configuration”# Show current configurationrawi configure --show
# Test with a simple questionrawi ask "Hello, can you hear me?"
# Test file processing (if you have a text file)echo "This is a test document" > test.txtrawi ask --file test.txt "Summarize this content"
# Test template functionalityrawi ask --act linux-terminal "list current directory contents"
Expected Output
Section titled “Expected Output”If everything is working correctly, you should see:
$ rawi --versionrawi/1.0.0 linux-x64 node-18.17.0
$ rawi ask "Hello"🤖 Hello! I can hear you perfectly. I'm ready to help you with questions,code review, analysis, or any other tasks you'd like assistance with.What can I help you with today?
Common Installation Issues
Section titled “Common Installation Issues”Permission Errors (Linux/macOS)
Section titled “Permission Errors (Linux/macOS)”If you get permission errors during global installation:
# Option 1: Use sudo (not recommended)sudo npm install -g rawi
# Option 2: Configure npm to use a different directorymkdir ~/.npm-globalnpm config set prefix '~/.npm-global'echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrcsource ~/.bashrcnpm install -g rawi
Windows Installation Issues
Section titled “Windows Installation Issues”If you encounter issues on Windows:
# Use PowerShell as Administratornpm install -g rawi
# Or use Windows Subsystem for Linux (WSL)wslnpm install -g rawi
Node.js Version Issues
Section titled “Node.js Version Issues”If your Node.js version is too old:
# Update Node.js using nvm (recommended)nvm install nodenvm use node
# Or download from https://nodejs.org/
Network Issues
Section titled “Network Issues”If installation fails due to network issues:
# Use a different registrynpm install -g rawi --registry https://registry.npmmirror.com
# Or use npm with retrynpm install -g rawi --maxsockets 1
Next Steps
Section titled “Next Steps”Once Rawi is installed and configured:
- Learn the Basics: Check out the Quick Start Guide
- Explore Commands: Read the Commands Reference
- Set Up Multiple Providers: Learn about Profile Management
- Try Templates: Explore Act Templates
- Advanced Usage: Discover Shell Integration
Need Help?
Section titled “Need Help?”- Troubleshooting: Check our Troubleshooting Guide
- FAQ: Browse Frequently Asked Questions
- Community: Join the GitHub Discussions
- Issues: Report bugs on GitHub Issues
Navigation
Section titled “Navigation”Related Pages: