Skip to content

Quick Start Guide

Get started with Rawi in just a few minutes! This guide will walk you through your first AI conversation and essential features.

Before starting, make sure you have:

Rawi installed — See Installation Guide
At least one provider configured — Run rawi configure if needed
Terminal open — Any modern terminal will work

Verify your setup:

Terminal window
# Check version
rawi --version
# Verify configuration
rawi info

Let’s start with a simple question to test your setup:

Terminal window
rawi ask "What is the difference between JavaScript and TypeScript?"
Terminal window
$ rawi ask "What is the difference between JavaScript and TypeScript?"
🤖 JavaScript and TypeScript are both programming languages, but TypeScript
is essentially JavaScript with static type checking. Here are the key
differences:
**JavaScript:**
- Dynamic typing (variables can change types)
- Runtime error detection
- No compilation step required
- Runs directly in browsers and Node.js
- More flexible but potentially error-prone
**TypeScript:**
- Static typing (types are checked at compile time)
- Compile-time error detection
- Compiles to JavaScript
- Better IDE support and autocomplete
- More verbose but safer for large applications
TypeScript is particularly useful for larger projects where type safety
helps prevent common programming errors.

🎉 Congratulations! You’ve just had your first AI conversation with Rawi.

Profiles allow you to use different AI providers for different tasks. Let’s explore your current setup:

Terminal window
# Show current configuration
rawi configure --show
# List all profiles
rawi configure --list

If you have multiple profiles configured:

Terminal window
# Use a specific profile
rawi ask "Explain React hooks" --profile work
# Set a default profile
rawi configure --profile personal --set-default
Terminal window
# Create a work profile
rawi configure --profile work --provider anthropic --model claude-3-5-sonnet-20241022
# Create a local profile for privacy
rawi configure --profile local --provider ollama --model llama2

Act templates are pre-written prompts that make Rawi behave like specific experts:

Terminal window
# Show all available act templates
rawi act --list
Terminal window
# Act as a code reviewer
rawi ask "Review this function" --act code_reviewer --file mycode.js
# Act as a Linux terminal
rawi ask "ls -la" --act linux_terminal
# Act as a technical writer
rawi ask "Document this API" --act technical_writer
  • code_reviewer — Expert code analysis and suggestions
  • linux_terminal — Simulates Linux command execution
  • javascript_console — JavaScript interpreter behavior
  • english_translator — Translation and language help
  • plagiarism_checker — Content originality analysis
  • cyber_security_specialist — Security-focused advice

Rawi automatically manages conversation sessions for context continuity:

Terminal window
# Start a conversation
rawi ask "Explain REST APIs"
# Continue the conversation (automatic session)
rawi ask "Now show me an example in Node.js"
# Explicitly continue a specific session
rawi ask "Add error handling" --continue abc123-def456
Terminal window
# List recent sessions
rawi history
# Show specific session
rawi history show abc123-def456
# Search conversations
rawi history --search "REST API"

Rawi can analyze and work with your files:

Terminal window
# Code review
rawi ask "Review this code for bugs" --file src/app.js
# Documentation
rawi ask "Generate README for this project" --file package.json
# Explanation
rawi ask "Explain what this function does" --file utils.py
Terminal window
# Analyze multiple files
rawi ask "Review these components" --file src/Header.jsx --file src/Footer.jsx
# Compare files
rawi ask "What's the difference between these implementations?" --file old.js --file new.js

Rawi works with any text-based file:

  • Source code (.js, .py, .java, .cpp, etc.)
  • Configuration files (.json, .yaml, .toml)
  • Documentation (.md, .txt, .rst)
  • Data files (.csv, .sql, .xml)

Enhance your terminal workflow with shell integration:

Add these to your shell profile (.bashrc, .zshrc):

Terminal window
# Quick ask alias
alias ask='rawi ask'
# Code review workflow
alias review='rawi ask --act code_reviewer'
# Terminal simulation
alias term='rawi ask --act linux_terminal'
# Quick continuation
alias chat='rawi ask --continue'
Terminal window
# Git commit message helper
git diff --cached | rawi ask "Write a commit message for these changes"
# Log analysis
tail -f /var/log/app.log | rawi ask "Analyze these logs for errors"
# Quick documentation
ls -la | rawi ask "Explain what these files do" --act technical_writer
Terminal window
# Pipe output to Rawi
echo "console.log('hello')" | rawi ask "Explain this code"
# Combine with other tools
curl -s https://api.github.com/repos/microsoft/vscode | rawi ask "Summarize this repo data"
Terminal window
# Code review
rawi ask "Review this PR for security issues" --file changes.diff --act cyber_security_specialist
# Debug assistance
rawi ask "Why is this code throwing an error?" --file buggy.py
# Optimization
rawi ask "How can I optimize this database query?" --file slow_query.sql
Terminal window
# Concept explanation
rawi ask "Explain microservices architecture with examples"
# Technology comparison
rawi ask "Compare React vs Vue.js for a new project" --profile work
# Tutorial creation
rawi ask "Create a beginner's guide to Docker" --act technical_writer
Terminal window
# Blog writing
rawi ask "Write a blog post about AI in software development" --act content_writer
# Documentation
rawi ask "Create API documentation for this endpoint" --file api.js --act technical_writer
# README generation
rawi ask "Generate a comprehensive README" --file package.json
Terminal window
# CSV analysis
rawi ask "Analyze this sales data and find trends" --file sales.csv --act data_analyst
# Log interpretation
rawi ask "Find error patterns in these logs" --file error.log
# Performance review
rawi ask "Analyze this performance report" --file metrics.json
Terminal window
# Fast responses for quick questions
rawi configure --profile quick --provider openai --model gpt-3.5-turbo --temperature 0.3
# Cost-effective with reasoning
rawi configure --profile budget --provider deepseek --model deepseek-chat --temperature 0.2
# European AI with GDPR compliance
rawi configure --profile europe --provider mistral --model mistral-large-latest --temperature 0.5
# Ultra-fast inference
rawi configure --profile speed --provider cerebras --model llama3.1-70b --temperature 0.7
# Detailed analysis
rawi configure --profile detailed --provider anthropic --model claude-3-5-sonnet-20241022 --temperature 0.1
# Local privacy-focused
rawi configure --profile local --provider ollama --model llama3.2
# Work environment
rawi configure --profile work --provider azure --model gpt-4 --resource-name company-ai
Terminal window
# Development environment
rawi configure --profile dev --provider openai --model gpt-4o --temperature 0.2
# Production support
rawi configure --profile prod --provider anthropic --model claude-3-5-sonnet-20241022 --temperature 0.1
# Research and experimentation
rawi configure --profile research --provider google --model gemini-1.5-pro --temperature 0.8

Command not found:

Terminal window
# Verify installation
which rawi
rawi --version

No providers configured:

Terminal window
# Run interactive configuration
rawi configure
# Check current status
rawi info

API key issues:

Terminal window
# Test configuration
rawi configure --test
# Reconfigure provider
rawi configure --provider openai --api-key sk-new-key

Session not found:

Terminal window
# List available sessions
rawi history
# Start new session
rawi ask "Hello" --new-session
Terminal window
# Command help
rawi --help
rawi ask --help
# Provider information
rawi info --providers
# Debug mode
rawi --debug ask "test question"

Now that you’re comfortable with the basics:

  1. Explore Advanced Features:

  2. Learn Workflows:

  3. Configure More Providers:

  4. Join the Community:

Terminal window
# Configuration
rawi configure # Interactive setup
rawi configure --list # List profiles
rawi info # System information
# Conversations
rawi ask "question" # Basic question
rawi ask "question" --file code.js # With file context
rawi ask "question" --act expert # With act template
rawi ask "question" --profile work # Specific profile
# History
rawi history # List sessions
rawi history --search "keyword" # Search conversations
rawi history show session-id # Show specific session
# Templates
rawi act --list # List all templates
rawi act --search "code" # Search templates
Terminal window
alias ask='rawi ask'
alias review='rawi ask --act code_reviewer'
alias explain='rawi ask --act explainer'
alias fix='rawi ask --act debugger'

Happy chatting with AI! 🤖✨

TypeScript:

  • Superset of JavaScript with static typing
  • Compile-time type checking
  • Compiles to JavaScript
  • Helps catch errors early in development
  • Better tooling and IDE support

The main advantage of TypeScript is that it helps prevent common programming errors by catching them during development rather than at runtime.

## Understanding Profiles
Profiles let you use different AI providers and settings for different projects:
```bash
# List available profiles
rawi configure --list
# Create a new profile for work projects
rawi configure --profile work --provider openai --model gpt-4
# Use a specific profile
rawi ask --profile work "How do I optimize this SQL query?"

Act templates transform your AI into specialized experts:

Terminal window
# Browse available templates
rawi act --list
# Use a template for code review
rawi ask --act code-reviewer "Review this Python function for improvements"
# Get help with Linux commands
rawi ask --act linux-terminal "Find all files larger than 100MB"
  • software-engineer — General development help
  • code-reviewer — Code analysis and improvements
  • linux-terminal — Command line assistance
  • technical-writer — Documentation help
  • data-scientist — Data analysis and visualization

Sessions maintain conversation context across multiple questions:

Terminal window
# Start a new session
rawi ask --new-session "I'm building a REST API in Node.js"
# Continue the conversation (Rawi remembers the context)
rawi ask "What's the best way to handle authentication?"
rawi ask "How do I add rate limiting?"
# List your sessions
rawi history --sessions
# Continue a previous session
rawi ask --session abc123 "Can you explain JWT tokens?"

Rawi works perfectly with shell pipes and redirects:

Terminal window
# Analyze log files
tail -f app.log | rawi ask "Summarize any errors in this log"
# Code analysis
cat src/app.js | rawi ask --act code-reviewer "Review this code"
# Save AI responses
rawi ask "Explain Docker containers" > docker-notes.txt
# Process data
curl -s api/data.json | rawi ask "Analyze this JSON data"

Here are the commands you’ll use most often:

Terminal window
# Basic question
rawi ask "your question here"
# With template
rawi ask --act template-name "your question"
# With profile
rawi ask --profile work "your question"
# Continue session
rawi ask --session session-id "follow-up question"
# Get help
rawi --help
rawi ask --help

Now that you’re familiar with the basics:

  1. Explore Templates — Run rawi act --list to see all available expert templates
  2. Set Up Multiple Profiles — Configure different providers for different projects
  3. Learn Advanced Features — Check out Shell Integration and Workflows
  4. Join the Community — Visit our GitHub repository for updates and discussions

“No provider configured”

Terminal window
rawi configure # Run interactive setup

“API key not found”

Terminal window
rawi configure --provider openai --api-key your-key-here

“Command not found”

Terminal window
npm install -g rawi # Reinstall globally

Happy coding with Rawi! 🚀