Import Wizard
Import your AI programming conversations into Mantra and start time traveling.
Overview
The Import Wizard helps you import conversation records from AI programming tools into Mantra, allowing you to review, search, and analyze these conversations.
Import Wizard Features
- Auto-detect Projects: Mantra automatically scans your computer for AI tool projects
- Incremental Import: Only imports new conversations, avoiding duplicates
- Data Integrity: Preserves complete conversation context and code snippets
- Batch Operations: Supports importing multiple projects at once
Supported AI Tools
| Tool | Version Required | Log Format | Support Status |
|---|---|---|---|
| Claude Code | 1.0.0+ | JSONL | ✅ Fully Supported |
| Gemini CLI | 0.20.0+ | JSON | ✅ Fully Supported |
| Cursor | 0.40.0+ | SQLite | ✅ Fully Supported |
| Codex | 1.0.0+ | JSONL | ✅ Fully Supported |
| Antigravity | - | - | 🔜 Coming Soon |
TIP
Claude Code is the most common import source - most users start here.
General Import Flow
The import process is similar for all tools:
- Open Import Wizard - Click the "Import" button at the top of Mantra
- Select AI Tool - Choose the tool type you want to import from
- Select Projects - Pick the projects to import from the detected list
- Wait for Completion - Import usually takes just a few seconds
Claude Code Import
About Claude Code
Claude Code is the official AI programming CLI tool from Anthropic, offering powerful code assistance features. It stores conversation records in local project directories.
Version Requirements
- Minimum Supported Version: 1.0.0
- Recommended Version: Latest stable release
Version Check
Run claude --version to check your Claude Code version.
Log File Locations
Claude Code stores conversation records in the following locations:
~/.claude/projects/%USERPROFILE%\.claude\projects\~/.claude/projects/Directory Structure Example:
~/.claude/projects/
├── my-project-1/
│ ├── conversations/
│ │ ├── 2025-01-15_session1.jsonl
│ │ └── 2025-01-16_session2.jsonl
│ └── settings.json
└── my-project-2/
└── conversations/
└── 2025-01-17_session1.jsonlImport Steps
- Open Mantra and click the Import button at the top
- Select Claude Code as the import source
Wait for project scanning - Mantra will automatically detect your Claude Code projects
Select projects to import - You can select one or multiple
- Click Import and wait for completion
Common Issues
Project not appearing in the list?
Possible Causes:
Project path not in default location - Claude Code may be using a non-default path
- Solution: Add a custom scan path in settings
No conversation records yet - New projects may not have any conversations
- Solution: Have a conversation in Claude Code first, then rescan
Permission issues - Mantra may not have permission to read the directory
- Solution: Check directory permission settings
Conversations appear incomplete after import?
Possible Causes:
Corrupted conversation file - JSONL file may have formatting issues
- Solution: Try reimporting or check the original file
Version compatibility issue - Older Claude Code versions may have slightly different formats
- Solution: Upgrade Claude Code to the latest version and retry
Import is very slow?
Optimization Tips:
- Check the number of conversations in the project - large projects take longer
- Ensure normal disk read speed
- Close other programs using the disk
Gemini CLI Import
About Gemini CLI
Gemini CLI is Google's command-line AI assistant tool, supporting code generation, Q&A, and more.
Version Requirements
- Minimum Supported Version: 0.20.0
- Recommended Version: Latest stable release
Version Check
Run gemini --version to check your Gemini CLI version.
Log File Locations
Gemini CLI stores conversation records in the following locations:
~/.gemini/%USERPROFILE%\.gemini\~/.gemini/Directory Structure Example:
~/.gemini/
├── tmp/
│ └── <project_hash>/
│ ├── checkpoint_1.json
│ └── checkpoint_2.json
├── settings.json
└── history/
├── session_20250115.json
└── session_20250116.jsonImport Steps
Open Mantra and click the Import button at the top
Select Gemini CLI as the import source
Wait for project scanning - Mantra will automatically detect your Gemini CLI conversation records
Select sessions to import - You can choose some or all
Click Import and wait for completion
Common Issues
Can't find Gemini CLI conversation records?
Possible Causes:
No conversations yet - Gemini CLI only creates the directory after the first conversation
- Solution: Have a conversation in Gemini CLI first
Custom path configured - You may have changed the default storage location
- Solution: Check the storage path setting in Gemini CLI config file
Some conversation content is missing?
Possible Causes:
Conversation didn't end properly - Abnormal exit may cause incomplete saves
- Solution: Check the integrity of the original JSON file
Old format incompatibility - Earlier versions may not be fully supported
- Solution: Upgrade Gemini CLI and retry
Cursor Import
About Cursor
Cursor is an AI programming IDE based on VS Code, with powerful integrated AI coding assistance.
Version Requirements
- Minimum Supported Version: 0.40.0
- Recommended Version: Latest stable release
Version Check
In Cursor, click Help > About to view version information.
Log File Locations
Cursor stores conversation records in an SQLite database at the following locations:
~/Library/Application Support/Cursor/%APPDATA%\Cursor\~/.config/Cursor/Directory Structure Example:
~/Library/Application Support/Cursor/
├── User/
│ ├── workspaceStorage/
│ │ └── <workspace_id>/
│ │ └── state.vscdb
│ ├── globalStorage/
│ │ └── state.vscdb
│ └── settings.json
└── Cache/Note
Cursor uses an SQLite database to store conversations. Make sure Cursor is closed during import to avoid database locking issues.
Import Steps
Close Cursor (recommended) to ensure the database isn't locked
Open Mantra and click the Import button at the top
Select Cursor as the import source
Wait for database parsing - Mantra will read and parse the SQLite database
Select projects/conversations to import
Click Import and wait for completion
Common Issues
Getting "Database is locked" error?
Solutions:
- Completely close Cursor (check the system tray)
- Wait a few seconds and retry
- If the issue persists, restart your computer and try again
Can't find Cursor database location?
Possible Causes:
Fresh Cursor installation - No conversation records generated yet
- Solution: Use Cursor's AI features to have a conversation first
Non-default installation location - If you customized Cursor's install path
- Solution: Manually specify the database path in Mantra settings
Imported conversations not correctly associated with projects?
Explanation:
Cursor's conversation records may span multiple projects. Mantra tries to identify project associations based on context. If the association is incorrect, you can manually adjust project ownership after import.
Codex Import
About Codex
Codex is OpenAI's command-line AI programming assistant, supporting code generation, debugging, and automation tasks. It stores conversation records in a local directory, organized by date.
Version Requirements
- Minimum version: 0.75.0+
- Recommended version: Latest stable release
Version Check
Run codex --version to check your Codex version.
Log File Location
Codex stores conversation records in the following locations:
~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl/mnt/c/Users/{username}/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonlExample directory structure:
~/.codex/
├── sessions/
│ └── 2025/
│ └── 01/
│ └── 15/
│ ├── rollout-1705312800000-abc123.jsonl
│ └── rollout-1705316400000-def456.jsonlTIP
Codex organizes session files by date (year/month/day). Each JSONL file corresponds to an independent coding session.
Import Steps
Open Mantra and click the Import button at the top
Select Codex as the import source
Wait for session scan - Mantra will automatically detect your Codex session records
Select sessions to import - You can select some or all
Click Import and wait for completion
Common Issues
Can't find Codex session records?
Possible causes:
No conversations yet - Codex only creates the sessions directory after your first conversation
- Solution: Have a conversation in Codex first
Custom path configured - You may have modified the default storage location
- Solution: Check the storage path settings in Codex configuration
Windows non-WSL environment - Currently only supports Codex in WSL environment
- Solution: Ensure you're running Codex in WSL
Some conversation content missing after import?
Possible causes:
Corrupted JSONL file - The file may have format issues
- Solution: Check the integrity of the original JSONL file
Session interrupted - Abnormal exit may cause incomplete records
- Solution: This is normal behavior - Mantra will recover as much usable content as possible
Does it support reasoning model (o1/o3) thinking processes?
Yes!
When Codex uses OpenAI's reasoning models, the thinking process is recorded. Mantra fully supports importing and displaying this content. You can see the AI's reasoning steps during time travel.
Advanced Configuration
Custom Log Paths
If your AI tools use non-default storage paths, you can add custom scan paths in Mantra settings:
- Open Mantra settings (click the gear icon in the top right)
- Find the "Import Settings" section
- Add your paths in "Custom Paths"
Example Configuration:
{
"customPaths": {
"claude": [
"~/work/.claude/projects/",
"/data/ai-projects/claude/"
],
"gemini": [
"~/custom/.gemini/"
],
"cursor": [
"/opt/cursor-data/"
],
"codex": [
"~/custom/.codex/sessions/"
]
}
}Batch Import
If you have multiple projects to import, you can use the batch import feature:
- In the project selection interface, check multiple projects
- Or click the "Select All" button to select all detected projects
- Click "Batch Import" to start importing
TIP
Batch import processes each project in sequence, with real-time progress display.
Troubleshooting
Common Import Issues
| Issue | Possible Cause | Solution |
|---|---|---|
| No projects detected | AI tool never used | Have a conversation in the AI tool first |
| Import button grayed out | No projects selected | Select at least one project from the list |
| Import interrupted | Insufficient disk space | Free up disk space and retry |
| Can't see conversations after import | Refresh delay | Restart Mantra or refresh the page |
Tool-Specific Issues Summary
Claude Code:
- Verify
~/.claude/projects/directory exists - Check JSONL file format is correct
- Confirm read permissions
Gemini CLI:
- Verify
~/.gemini/directory exists - Check JSON file format is correct
- Upgrade to latest version
Cursor:
- Ensure Cursor is closed
- Check SQLite database file exists
- Verify database file isn't corrupted
Codex:
- Verify
~/.codex/sessions/directory exists - Check JSONL file format is correct
- Windows users must run in WSL environment
Getting Help
If none of the above solutions work, please:
- Check the FAQ for more help
- Search for similar issues on GitHub Issues
- Join our Discord community to discuss with other users
- Submit a new Issue with detailed error information and steps taken
