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.
📋 Table of Contents
Section titled “📋 Table of Contents”- Prerequisites
- Your First Question
- Understanding Profiles
- Using Act Templates
- Session Management
- Shell Integration Basics
- Next Steps
Prerequisites
Section titled “Prerequisites”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
Quick Check
Section titled “Quick Check”Verify your setup:
# Check versionrawi --version
# Verify configurationrawi infoYour First Question
Section titled “Your First Question”Let’s start with a simple question to test your setup:
rawi ask "What is the difference between JavaScript and TypeScript?"What You’ll See
Section titled “What You’ll See”$ rawi ask "What is the difference between JavaScript and TypeScript?"
🤖 JavaScript and TypeScript are both programming languages, but TypeScriptis essentially JavaScript with static type checking. Here are the keydifferences:
**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 safetyhelps prevent common programming errors.🎉 Congratulations! You’ve just had your first AI conversation with Rawi.
Understanding Profiles
Section titled “Understanding Profiles”Profiles allow you to use different AI providers for different tasks. Let’s explore your current setup:
Check Your Current Profile
Section titled “Check Your Current Profile”# Show current configurationrawi configure --show
# List all profilesrawi configure --listUsing Different Profiles
Section titled “Using Different Profiles”If you have multiple profiles configured:
# Use a specific profilerawi ask "Explain React hooks" --profile work
# Shorter versionrawi ask "Explain React hooks" -p workCreate Additional Profiles
Section titled “Create Additional Profiles”# Create a profile for local AIrawi configure --profile local --provider ollama --model llama3.2
# Create a profile for analysis workrawi configure --profile analysis --provider anthropic --model claude-3-5-sonnet-20241022Using Act Templates
Section titled “Using Act Templates”Act templates are pre-built prompts that make the AI behave like different experts. They’re one of Rawi’s most powerful features!
Browse Available Templates
Section titled “Browse Available Templates”# List all templates (interactive)rawi act --list
# Show details of a specific templaterawi act --show code-reviewerUse Templates in Questions
Section titled “Use Templates in Questions”# Get a Linux terminal simulationrawi ask --act linux-terminal "list files in home directory with details"
# Code review assistancerawi ask --act code-reviewer "Review this Python function for improvements"
# Security expert analysisrawi ask --act security-expert "What are common web vulnerabilities?"
# Ethereum developer guidancerawi ask --act ethereum-developer "Explain smart contract security best practices"Popular Templates for Developers
Section titled “Popular Templates for Developers”code-reviewer— Code analysis and optimizationlinux-terminal— Terminal command simulationsecurity-expert— Security analysis and auditingtech-writer— Technical documentationdatabase-admin— SQL optimization and database managementapi-documenter— API documentation and examples
Session Management
Section titled “Session Management”Sessions allow you to have continuous conversations with context. Each question remembers previous ones in the same session.
Basic Session Usage
Section titled “Basic Session Usage”# Start a new sessionrawi ask "I'm building a React app with TypeScript" --new-session
# Continue the conversation (automatically uses current session)rawi ask "How should I structure my components?"
# Ask a follow-uprawi ask "What about state management?"Working with Specific Sessions
Section titled “Working with Specific Sessions”# Continue a specific session laterrawi ask "What about testing strategies?" --session abc123-def456
# Start a new session for a different topicrawi ask "Now I want to learn Python" --new-sessionView Your Sessions
Section titled “View Your Sessions”# Show recent conversationsrawi history
# Show sessions onlyrawi history sessions
# Show details of a specific sessionrawi history show abc123-def456Shell Integration Basics
Section titled “Shell Integration Basics”Rawi integrates seamlessly with your shell, making it perfect for developer workflows.
Pipe Input to Rawi
Section titled “Pipe Input to Rawi”# Pipe file content for analysiscat server.js | rawi ask "Review this Express.js server for security issues"
# Analyze git changesgit diff | rawi ask "Review these changes and suggest improvements"
# Process command outputls -la | rawi ask "Explain these file permissions"
# Analyze logstail -100 app.log | rawi ask "Summarize these log entries"Save Output to Files
Section titled “Save Output to Files”# Generate and save coderawi ask "Create a TypeScript interface for a User" > user.ts
# Create documentationrawi ask "Write README for a CLI tool" > README.md
# Generate configurationsrawi ask "Create ESLint config for React TypeScript" > .eslintrc.jsCombine with Other Tools
Section titled “Combine with Other Tools”# Search and analyzegrep ERROR app.log | rawi ask "Categorize these errors by type"
# Process API responsescurl -s api.example.com/data | rawi ask "Explain this API structure"
# Database analysisecho "SELECT * FROM users LIMIT 5" | rawi ask --act database-admin "Optimize this query"File Processing
Section titled “File Processing”Rawi can directly process various file types including documents, spreadsheets, and presentations:
# Analyze PDF documentsrawi ask --file report.pdf "Summarize the key findings in this report"
# Process Word documentsrawi ask --file requirements.docx "Extract all functional requirements"
# Analyze Excel spreadsheetsrawi ask --file data.xlsx "What trends do you see in this data?"
# Review multiple filesrawi ask --files package.json README.md "Compare this project's setup with its documentation"
# Batch process source coderawi ask --batch "src/**/*.js" --act code-reviewer "Review all JavaScript files for security issues"
# Process files in parallel for speedrawi ask --batch "docs/**/*.md" --parallel "Create a documentation index"Essential Commands Cheat Sheet
Section titled “Essential Commands Cheat Sheet”Basic Usage
Section titled “Basic Usage”# Simple questionrawi ask "Your question here"
# With specific profilerawi ask "Your question" --profile work
# With expert templaterawi ask --act code-reviewer "Your code question"
# Start new sessionrawi ask "Your question" --new-sessionConfiguration
Section titled “Configuration”# Interactive setuprawi configure
# Show current configrawi configure --show
# List all profilesrawi configure --listHistory & Sessions
Section titled “History & Sessions”# Show recent conversationsrawi history
# Search conversationsrawi history --search "docker"
# Show session detailsrawi history show session-idInformation
Section titled “Information”# System inforawi info
# Available providersrawi provider --list
# Available templatesrawi act --listCommon Use Cases
Section titled “Common Use Cases”Code Development
Section titled “Code Development”# Debug an errorrawi ask "Fix this Python error: NameError: name 'x' is not defined"
# Code reviewgit diff | rawi ask --act code-reviewer "Review these changes"
# Review source code filesrawi ask --file src/app.js --act code-reviewer "Review this code for best practices"
# Generate testscat utils.js | rawi ask "Generate unit tests for these functions"
# Create documentationrawi ask --act tech-writer "Document this API endpoint" < api.js
# Batch process source filesrawi ask --batch "src/**/*.{js,ts}" --act code-reviewer "Find potential security issues"Document Processing
Section titled “Document Processing”# Analyze PDF reportsrawi ask --file quarterly-report.pdf "Extract key performance metrics"
# Process Word documentsrawi ask --file meeting-notes.docx "Create action items from these meeting notes"
# Analyze Excel datarawi ask --file sales-data.xlsx "Identify top-performing products and regions"
# Compare multiple documentsrawi ask --files proposal-v1.docx proposal-v2.docx "What are the key differences?"
# Process presentationsrawi ask --file slides.pptx "Summarize the main points from this presentation"Learning & Research
Section titled “Learning & Research”# Quick explanationsrawi ask "Explain async/await in JavaScript"
# Compare technologiesrawi ask "Compare React vs Vue.js for a small project"
# Best practicesrawi ask --act security-expert "Web security best practices for Node.js"Data Analysis
Section titled “Data Analysis”# Analyze CSV datacat data.csv | rawi ask "Analyze this sales data and identify trends"
# Process logsgrep ERROR app.log | rawi ask "What types of errors are most common?"
# Explain data structuresecho '{"users": [{"id": 1, "name": "John"}]}' | rawi ask "Explain this JSON structure"Tips for Better Results
Section titled “Tips for Better Results”1. Be Specific
Section titled “1. Be Specific”# ❌ Vaguerawi ask "Help with code"
# ✅ Specificrawi ask "Review this React component for performance issues" < component.jsx2. Use Templates for Expertise
Section titled “2. Use Templates for Expertise”# ❌ Genericrawi ask "Check my database query"
# ✅ With expert templaterawi ask --act database-admin "Optimize this SQL query for performance" < query.sql3. Provide Context
Section titled “3. Provide Context”# ❌ No contextrawi ask "Fix this error"
# ✅ With contextrawi ask "Fix this Python Flask error in a REST API: AttributeError: 'NoneType'"4. Use Sessions for Complex Topics
Section titled “4. Use Sessions for Complex Topics”# Start a session for a projectrawi ask "I'm building a microservices architecture with Node.js" --new-session
# Continue building contextrawi ask "How should I handle authentication between services?"rawi ask "What about database design for this architecture?"Next Steps
Section titled “Next Steps”Now that you’re familiar with the basics, explore these advanced features:
- Configuration Guide — Set up multiple providers and profiles
- Act Templates — Master the 200+ expert templates
- Shell Integration — Advanced terminal workflows
- Session Management — Deep dive into conversations
- Commands Reference — Complete command documentation
Explore Comprehensive Workflows
Section titled “Explore Comprehensive Workflows”Ready to integrate Rawi into your daily work? Check out these comprehensive workflow guides:
🛠️ Development Workflows
Section titled “🛠️ Development Workflows”- Code Review Workflow — Automated code analysis and security auditing
- Git Integration Workflow — Smart commit messages and repository insights
- API Development Workflow — Design, implement, and document APIs
- Testing Workflow — Comprehensive testing strategies and automation
- Documentation Generation — Auto-generate project documentation
📊 Data & Analysis
Section titled “📊 Data & Analysis”- Data Analysis Workflow — Statistical analysis, ML, and data visualization
✍️ Content & Research
Section titled “✍️ Content & Research”- Content Creation Workflow — Research, write, and optimize content
- Research Workflow — Information gathering and analysis
Each workflow includes step-by-step instructions, automation scripts, and best practices for integrating AI assistance into your specific domain.
Need Help?
Section titled “Need Help?”- Stuck? Check the Troubleshooting Guide
- Questions? Browse the FAQ
- More Examples? See Workflow Guides
- Community? Join GitHub Discussions
Navigation
Section titled “Navigation”Related Pages: