Skip to content

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

ToolVersion RequiredLog FormatSupport Status
Claude Code1.0.0+JSONL✅ Fully Supported
Gemini CLI0.20.0+JSON✅ Fully Supported
Cursor0.40.0+SQLite✅ Fully Supported
Codex1.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:

  1. Open Import Wizard - Click the "Import" button at the top of Mantra
  2. Select AI Tool - Choose the tool type you want to import from
  3. Select Projects - Pick the projects to import from the detected list
  4. 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:

bash
~/.claude/projects/
bash
%USERPROFILE%\.claude\projects\
bash
~/.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.jsonl

Import Steps

  1. Open Mantra and click the Import button at the top
  1. Select Claude Code as the import source
  1. Wait for project scanning - Mantra will automatically detect your Claude Code projects

  2. Select projects to import - You can select one or multiple

  1. Click Import and wait for completion

Common Issues

Project not appearing in the list?

Possible Causes:

  1. Project path not in default location - Claude Code may be using a non-default path

    • Solution: Add a custom scan path in settings
  2. No conversation records yet - New projects may not have any conversations

    • Solution: Have a conversation in Claude Code first, then rescan
  3. Permission issues - Mantra may not have permission to read the directory

    • Solution: Check directory permission settings
Conversations appear incomplete after import?

Possible Causes:

  1. Corrupted conversation file - JSONL file may have formatting issues

    • Solution: Try reimporting or check the original file
  2. 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:

  1. Check the number of conversations in the project - large projects take longer
  2. Ensure normal disk read speed
  3. 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:

bash
~/.gemini/
bash
%USERPROFILE%\.gemini\
bash
~/.gemini/

Directory Structure Example:

~/.gemini/
├── tmp/
│   └── <project_hash>/
│       ├── checkpoint_1.json
│       └── checkpoint_2.json
├── settings.json
└── history/
    ├── session_20250115.json
    └── session_20250116.json

Import Steps

  1. Open Mantra and click the Import button at the top

  2. Select Gemini CLI as the import source

  3. Wait for project scanning - Mantra will automatically detect your Gemini CLI conversation records

  4. Select sessions to import - You can choose some or all

  5. Click Import and wait for completion

Common Issues

Can't find Gemini CLI conversation records?

Possible Causes:

  1. No conversations yet - Gemini CLI only creates the directory after the first conversation

    • Solution: Have a conversation in Gemini CLI first
  2. 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:

  1. Conversation didn't end properly - Abnormal exit may cause incomplete saves

    • Solution: Check the integrity of the original JSON file
  2. 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:

bash
~/Library/Application Support/Cursor/
bash
%APPDATA%\Cursor\
bash
~/.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

  1. Close Cursor (recommended) to ensure the database isn't locked

  2. Open Mantra and click the Import button at the top

  3. Select Cursor as the import source

  4. Wait for database parsing - Mantra will read and parse the SQLite database

  5. Select projects/conversations to import

  6. Click Import and wait for completion

Common Issues

Getting "Database is locked" error?

Solutions:

  1. Completely close Cursor (check the system tray)
  2. Wait a few seconds and retry
  3. If the issue persists, restart your computer and try again
Can't find Cursor database location?

Possible Causes:

  1. Fresh Cursor installation - No conversation records generated yet

    • Solution: Use Cursor's AI features to have a conversation first
  2. 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:

bash
~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl
bash
/mnt/c/Users/{username}/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl
bash
~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl

Example directory structure:

~/.codex/
├── sessions/
│   └── 2025/
│       └── 01/
│           └── 15/
│               ├── rollout-1705312800000-abc123.jsonl
│               └── rollout-1705316400000-def456.jsonl

TIP

Codex organizes session files by date (year/month/day). Each JSONL file corresponds to an independent coding session.

Import Steps

  1. Open Mantra and click the Import button at the top

  2. Select Codex as the import source

  1. Wait for session scan - Mantra will automatically detect your Codex session records

  2. Select sessions to import - You can select some or all

  3. Click Import and wait for completion

Common Issues

Can't find Codex session records?

Possible causes:

  1. No conversations yet - Codex only creates the sessions directory after your first conversation

    • Solution: Have a conversation in Codex first
  2. Custom path configured - You may have modified the default storage location

    • Solution: Check the storage path settings in Codex configuration
  3. 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:

  1. Corrupted JSONL file - The file may have format issues

    • Solution: Check the integrity of the original JSONL file
  2. 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:

  1. Open Mantra settings (click the gear icon in the top right)
  2. Find the "Import Settings" section
  3. Add your paths in "Custom Paths"

Example Configuration:

json
{
  "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:

  1. In the project selection interface, check multiple projects
  2. Or click the "Select All" button to select all detected projects
  3. Click "Batch Import" to start importing

TIP

Batch import processes each project in sequence, with real-time progress display.

Troubleshooting

Common Import Issues

IssuePossible CauseSolution
No projects detectedAI tool never usedHave a conversation in the AI tool first
Import button grayed outNo projects selectedSelect at least one project from the list
Import interruptedInsufficient disk spaceFree up disk space and retry
Can't see conversations after importRefresh delayRestart 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:

  1. Check the FAQ for more help
  2. Search for similar issues on GitHub Issues
  3. Join our Discord community to discuss with other users
  4. Submit a new Issue with detailed error information and steps taken