Skip to content

Installation & Setup

Get Rawi up and running on your system in just a few minutes.


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)
Terminal window
node --version

If you need to install or update Node.js, visit nodejs.org.


The easiest way to install Rawi globally:

Terminal window
npm install -g rawi

Use Rawi without installing it globally:

Terminal window
# Run commands directly with npx
npx rawi ask "What is TypeScript?"
npx rawi configure

Install the latest development version from GitHub:

Terminal window
# Clone and install from source
git clone https://github.com/withrawi/rawi.git
cd rawi
npm install
npm run build
npm link

After installing Rawi, you’ll need to configure at least one AI provider to start using it.

npm link

### Interactive Configuration (Recommended)
Run the interactive configuration wizard:
```bash
rawi configure

This will guide you through:

  1. Choosing an AI provider
  2. Selecting a model
  3. Entering API credentials
  4. Setting up basic preferences

Choose one of these popular options for quick setup:

Terminal window
# Get API key from: https://platform.openai.com/api-keys
rawi configure \
--provider openai \
--model gpt-4o \
--api-key sk-your-api-key
Terminal window
# Install Ollama first: https://ollama.com/download
ollama pull llama3.2
rawi configure \
--provider ollama \
--model llama3.2
Terminal window
# Get API key from: https://console.anthropic.com/
rawi configure \
--provider anthropic \
--model claude-3-5-sonnet-20241022 \
--api-key sk-ant-your-key
Terminal window
# Get API key from: https://platform.deepseek.com/api_keys
rawi configure \
--provider deepseek \
--model deepseek-chat \
--api-key sk-your-deepseek-key
Terminal window
# Get API key from: https://console.mistral.ai/api-keys/
rawi configure \
--provider mistral \
--model mistral-large-latest \
--api-key your-mistral-key
Terminal window
# Get API key from: https://aistudio.google.com/app/apikey
rawi configure \
--provider google \
--model gemini-2.0-flash-exp \
--api-key AIza-your-key

After installation and configuration, verify everything is working:

Terminal window
# Check Rawi version
rawi --version
# Show system information
rawi info
# List available commands
rawi --help
Terminal window
# Show current configuration
rawi configure --show
# Test with a simple question
rawi ask "Hello, can you hear me?"
# Test file processing (if you have a text file)
echo "This is a test document" > test.txt
rawi ask --file test.txt "Summarize this content"
# Test template functionality
rawi ask --act linux-terminal "list current directory contents"

If everything is working correctly, you should see:

Terminal window
$ rawi --version
rawi/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?

If you get permission errors during global installation:

Terminal window
# Option 1: Use sudo (not recommended)
sudo npm install -g rawi
# Option 2: Configure npm to use a different directory
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
npm install -g rawi

If you encounter issues on Windows:

Terminal window
# Use PowerShell as Administrator
npm install -g rawi
# Or use Windows Subsystem for Linux (WSL)
wsl
npm install -g rawi

If your Node.js version is too old:

Terminal window
# Update Node.js using nvm (recommended)
nvm install node
nvm use node
# Or download from https://nodejs.org/

If installation fails due to network issues:

Terminal window
# Use a different registry
npm install -g rawi --registry https://registry.npmmirror.com
# Or use npm with retry
npm install -g rawi --maxsockets 1

Once Rawi is installed and configured:

  1. Learn the Basics: Check out the Quick Start Guide
  2. Explore Commands: Read the Commands Reference
  3. Set Up Multiple Providers: Learn about Profile Management
  4. Try Templates: Explore Act Templates
  5. Advanced Usage: Discover Shell Integration


Related Pages: