Skip to content

history — Conversation Management

The history command lets you search, manage, and analyze your AI conversation history with separate views for ask, chat, and exec sessions.

rawi history <subcommand> [options]

View your AI conversation history organized by session type:

Terminal window
# Show ask session history
rawi history ask
# Show chat session history
rawi history chat
# Show exec session history
rawi history exec
Terminal window
# Search ask sessions
rawi history ask --search "docker"
# Show recent chat sessions
rawi history chat --limit 10
# Show recent exec commands
rawi history exec --limit 20
# Filter by profile
rawi history ask --profile work

Show ask session history. View and search your ask sessions and messages.

Terminal window
rawi history ask [options]

Purpose: View all your one-off questions and quick interactions with AI models.

Show chat session history. View and search your chat sessions and messages.

Terminal window
rawi history chat [options]

Purpose: View all your interactive chat conversations and longer discussions.

Show exec session history. View and search your exec sessions and generated commands.

Terminal window
rawi history exec [options]

All options are available for both ask and chat subcommands:

OptionAliasDescriptionDefault
--profile <profile>-pProfile to show history fordefault
--limit <number>-lNumber of sessions to show50
--search <query>-sSearch messages containing text
--provider <provider>Filter by AI provider
--model <model>Filter by AI model
--from <date>Show sessions from date (YYYY-MM-DD)
--to <date>Show sessions to date (YYYY-MM-DD)
--allShow all sessions without pagination limit
--all-profilesShow sessions from all profiles

Search for specific content in your ask or chat sessions:

Terminal window
# Search ask sessions
rawi history ask --search "docker deployment"
# Search chat sessions
rawi history chat --search "debugging"
# Case-insensitive search
rawi history ask --search "TypeScript"

Filter conversations by AI provider or model:

Terminal window
# Filter ask sessions by provider
rawi history ask --provider openai
rawi history chat --provider anthropic
# Filter by model
rawi history ask --model gpt-4o
rawi history chat --model claude-3-5-sonnet
# Combine filters
rawi history ask --provider openai --model gpt-4o

Filter conversations by date:

Terminal window
# Show ask sessions from specific date
rawi history ask --from 2024-01-01
# Show chat sessions within date range
rawi history chat --from 2024-01-01 --to 2024-12-31

Filter by specific profiles:

Terminal window
# Show ask sessions from work profile
rawi history ask --profile work
# Show chat sessions from all profiles
rawi history chat --all-profiles

Terminal window
# Show recent ask sessions
rawi history ask
# Show recent chat sessions
rawi history chat
# Show recent exec sessions
rawi history exec
# Limit results
rawi history ask --limit 5
rawi history chat --limit 10
rawi history exec --limit 15

Example output:

Terminal window
📚 Ask Session History (3 sessions):
┌──────────────────────┬──────────────────────────────────────┬────────────┬──────────┬──────────────────┐
Title ID Profile Messages Updated
├──────────────────────┼──────────────────────────────────────┼────────────┼──────────┼──────────────────┤
Create React comp... abc123-def456-ghi789 default 2 1 hour ago
Docker deployment def456-ghi789-jkl012 work 4 2 hours ago
TypeScript types ghi789-jkl012-mno345 default 6 1 day ago
└──────────────────────┴──────────────────────────────────────┴────────────┴──────────┴──────────────────┘
💡 Tips:
Use --session <id> with ask command to continue a session
Use --search <query> to search message content
Terminal window
# Search for Docker-related ask sessions
rawi history ask --search "docker"
# Search for debugging in chat sessions
rawi history chat --search "debugging"
# Search for file operations in exec sessions
rawi history exec --search "file"
# Search across all profiles
rawi history ask --search "react" --all-profiles
rawi history exec --search "git" --all-profiles
Terminal window
# Ask sessions using OpenAI from January 2024
rawi history ask --provider openai --from 2024-01-01
# Chat sessions using GPT-4 in work profile
rawi history chat --model gpt-4 --profile work
# Exec sessions with commands from last week
rawi history exec --from $(date -d '1 week ago' +%Y-%m-%d)
# All exec sessions without pagination
rawi history exec --all
# Recent ask sessions from specific date range
rawi history ask --from 2024-01-01 --to 2024-01-31 --limit 20
Terminal window
# All ask sessions without pagination
rawi history ask --all
# All chat sessions without pagination
rawi history chat --all
# Recent ask sessions from specific date range
rawi history ask --from 2024-01-01 --to 2024-01-31 --limit 20
Terminal window
# Compare ask vs chat vs exec activity
rawi history ask --limit 10
rawi history chat --limit 10
rawi history exec --limit 10
# Search same topic across all types
rawi history ask --search "kubernetes"
rawi history chat --search "kubernetes"
rawi history exec --search "kubernetes"
# Find all OpenAI interactions
rawi history ask --provider openai
rawi history chat --provider openai
rawi history exec --provider openai
Terminal window
# Review recent coding help
rawi history ask --search "code review"
rawi history chat --search "debugging"
# Review command generation history
rawi history exec --search "docker"
rawi history exec --search "git"
# Find specific technology discussions
rawi history ask --search "typescript"
rawi history chat --search "react"
rawi history exec --search "npm"
Terminal window
# Separate work and personal conversations
rawi history ask --profile work
rawi history chat --profile personal
# Find discussions about specific projects
rawi history ask --search "project-alpha"
rawi history chat --search "project-alpha"
Terminal window
# Track learning sessions
rawi history chat --search "tutorial"
rawi history ask --search "how to"
# Find AI model comparisons
rawi history ask --provider anthropic
rawi history ask --provider openai
Terminal window
# Usage patterns by provider
rawi history ask --provider ollama --limit 100
rawi history chat --provider gpt-4 --limit 100
# Time-based analysis
rawi history ask --from 2024-01-01 --to 2024-01-31
rawi history chat --from 2024-01-01 --to 2024-01-31

Both ask and chat history views support interactive navigation:

  • Pagination: Navigate through multiple pages of results
  • Session details: View complete session information
  • Smart filtering: Results update based on your criteria

When you have more sessions than the display limit, you’ll see pagination options:

Terminal window
Page 1 of 3 | Total: 25 sessions
? What would you like to do?
Next page
Previous page
Exit

Each session shows:

  • Title: Auto-generated or custom session name
  • ID: Unique session identifier
  • Profile: The profile used for the session
  • Messages: Number of messages in the session
  • Updated: Last activity timestamp
Terminal window
# Use limits for faster results
rawi history ask --limit 20
# Filter by recent dates
rawi history chat --from 2024-08-01
# Search specific profiles
rawi history ask --profile work
Terminal window
# Use specific search terms
rawi history ask --search "docker compose"
# Combine filters to narrow results
rawi history chat --search "error" --provider openai --from 2024-08-01