Skip to content

Import Wizard

Import your AI programming conversations into Mantra and start Time Traveling.

Overview

The Import Wizard helps you import conversation logs from AI programming tools into Mantra, allowing you to review, search, and analyze these conversations.

Import Wizard Features

  • Auto Detect Projects: Mantra automatically scans for AI tool projects on your computer.
  • Incremental Import: Only imports new conversations, avoiding duplicates.
  • Data Integrity: Preserves full conversation context and code snippets.
  • Batch Operation: Supports importing multiple projects at once.

Supported AI Tools

ToolVersion ReqLog FormatStatus
Claude Code1.0.0+JSONL✅ Supported
Gemini CLI0.20.0+JSON✅ Supported
Cursor0.40.0+SQLite✅ Supported
Codex1.0.0+JSONL✅ Supported
GitHub Copilot ChatlatestJSONL✅ Supported (v0.12.0+)
OpenCodelatestSQLite✅ Supported (v0.12.0+)

Tip

Claude Code is the most common import source, and most users start here.

General Import Flow

The import flow is consistent 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 Project - Choose projects from the detected list.
  4. Wait for Completion - Import usually takes just a few seconds.
  5. Auto-linking (v0.7.0+) - After import, Mantra automatically guides you to link new sessions to existing Logical Projects based on Git Remote URLs or paths, enabling seamless multi-source aggregation.

Claude Code Import

About Claude Code

Claude Code is Anthropic's official AI programming CLI tool, offering powerful code assistance. It stores conversation logs in local project directories.

Version Requirements

  • Minimum Version: 1.0.0
  • Recommended: Latest stable

Check Version

Run claude --version to check your Claude Code version.

Log Location

Claude Code stores logs at:

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, click Import button at the top.
  1. Select Claude Code as source.
  1. Wait for Scan, Mantra auto-detects your Claude Code projects.

  2. Select Projects, choose one or more.

  1. Click Import, wait for completion.

FAQ

Project not in list?

Possible Reasons:

  1. Non-standard Path - Claude Code might be using a custom path.

    • Solution: Add custom scan path in Settings.
  2. No Conversations - New projects might not have logs yet.

    • Solution: Have a conversation in Claude Code first, then rescan.
  3. Permission Issues - Mantra might lack read permissions.

    • Solution: Check directory permissions.
Conversation incomplete?

Possible Reasons:

  1. Corrupted File - JSONL file might be malformed.

    • Solution: Try re-importing or checking original file.
  2. Version Compatibility - Older versions might differ.

    • Solution: Upgrade Claude Code and retry.
Import slow?

Tips:

  1. Check conversation count; large projects take longer.
  2. Ensure disk read speed is normal.
  3. Close other disk-intensive apps.

Gemini CLI Import

About Gemini CLI

Gemini CLI is Google's command-line AI assistant, supporting code generation and Q&A.

Version Requirements

  • Minimum Version: 0.20.0
  • Recommended: Latest stable

Check Version

Run gemini --version to check your Gemini CLI version.

Log Location

Gemini CLI stores logs at:

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, click Import button.

  2. Select Gemini CLI as source.

  3. Wait for Scan, Mantra auto-detects Gemini CLI logs.

  4. Select Sessions, choose some or all.

  5. Click Import, wait for completion.

FAQ

No Gemini CLI logs found?

Possible Reasons:

  1. No Conversations - Gemini CLI creates directory only after first chat.

    • Solution: Have a conversation in Gemini CLI first.
  2. Custom Path - You might have changed default storage.

    • Solution: Check Gemini CLI config.
Missing content?

Possible Reasons:

  1. Abnormal Exit - Session might not have saved completely.

    • Solution: Check JSON file integrity.
  2. Incompatible Format - Older versions might not be supported.

    • Solution: Upgrade Gemini CLI.

Cursor Import

About Cursor

Cursor is an AI-powered code editor based on VS Code.

Version Requirements

  • Minimum Version: 0.40.0
  • Recommended: Latest stable

Check Version

In Cursor, go to Help > About.

Log Location

Cursor stores logs in SQLite database:

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 SQLite. Please ensure Cursor is closed during import to avoid database lock issues.

Import Steps

  1. Close Cursor (Recommended).

  2. Open Mantra, click Import.

  3. Select Cursor as source.

  4. Wait for Parsing, Mantra reads SQLite DB.

  5. Select Projects/Conversations.

  6. Click Import.

FAQ

"Database Locked"?

Solution:

  1. Completely close Cursor (check system tray).
  2. Wait a few seconds and retry.
  3. Reboot if issue persists.
Cursor DB not found?

Possible Reasons:

  1. Fresh Install - No logs yet.

    • Solution: Use AI features in Cursor first.
  2. Custom Install Location.

    • Solution: Manually specify DB path in Settings.
Incorrect Project Association?

Note:

Cursor logs might span multiple projects. Mantra tries to identify context. You can manually adjust project association after import.

Codex Import

About Codex

Codex is OpenAI's command-line AI assistant.

Version Requirements

  • Minimum Version: 0.75.0+
  • Recommended: Latest stable

Check Version

Run codex --version.

Log Location

Codex stores logs at:

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

Directory Structure Example:

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

Tip

Codex organizes sessions by date. Each JSONL file is a session.

Import Steps

  1. Open Mantra, click Import.

  2. Select Codex as source.

  1. Wait for Scan, Mantra auto-detects Codex logs.

  2. Select Sessions.

  3. Click Import.

FAQ

Codex logs not found?

Possible Reasons:

  1. No Conversations - Directory created after first chat.

    • Solution: Have a conversation first.
  2. Custom Path.

    • Solution: Check Codex config.
  3. Windows non-WSL - Only WSL supported currently.

    • Solution: Run Codex in WSL.
Incomplete logs?

Possible Reasons:

  1. Corrupted File.

    • Solution: Check JSONL integrity.
  2. Interrupted Session.

    • Solution: Normal behavior, Mantra recovers what it can.
Support reasoning models (o1/o3)?

Yes!

Mantra fully supports importing and displaying thinking processes from OpenAI reasoning models.

GitHub Copilot Chat Import

About GitHub Copilot Chat

GitHub Copilot Chat is GitHub's AI programming chat assistant, integrated into VSCode, JetBrains, and other major IDEs. It has 20M+ active users worldwide.

Version Requirements

  • Recommended: Latest stable
  • Supported IDEs: VSCode, VSCode Insiders, JetBrains IntelliJ, PyCharm, etc.

Log Location

GitHub Copilot Chat stores conversation logs in the IDE's extension storage directory:

bash
~/Library/Application Support/Code/User/globalStorage/github.copilot-chat/
bash
~/.config/Code/User/globalStorage/github.copilot-chat/
bash
%APPDATA%\Code\User\globalStorage\github.copilot-chat\

Multi-IDE Auto-Scan

Mantra automatically scans for Copilot Chat data across VSCode, VSCode Insiders, and JetBrains IDEs, and distinguishes sources via distribution subtitle chips (e.g., VSCode / JetBrains) in the Import Wizard.

Import Steps

  1. Open Mantra, click the Import button.

  2. Select GitHub Copilot Chat as source.

  3. Wait for scan — Mantra auto-detects Copilot Chat sessions across IDEs.

  4. Select projects, choose one or more.

  5. Click Import, wait for completion.

FAQ

Multiple cards for the same tool?

This is expected.

If you use Copilot Chat in multiple IDEs (e.g., both VSCode and JetBrains), Mantra detects each separately and shows a distribution subtitle to distinguish them. Select the ones you want.

No Copilot Chat sessions found?

Possible Reasons:

  1. Never used Chat — you may only have used code completion, not the Chat panel.

    • Solution: Start a conversation in the IDE's Copilot Chat panel first.
  2. Outdated version — older versions may not store exportable chat history.

    • Solution: Update to the latest GitHub Copilot Chat extension.

OpenCode Import

About OpenCode

OpenCode is an open-source AI coding CLI developed by the SST team, distributed as both opencode and opencode-ai. It stores conversation logs in a SQLite database.

Version Requirements

  • Recommended: Latest stable
  • Database file: opencode.db

Check Version

Run opencode --version to check your version.

Log Location

OpenCode stores logs in the following SQLite database:

bash
~/Library/Application Support/opencode/opencode.db
bash
~/.local/share/opencode/opencode.db
bash
%APPDATA%\opencode\opencode.db

Import Steps

  1. Open Mantra, click the Import button.

  2. Select OpenCode as source.

  3. Wait for parsing — Mantra reads opencode.db.

  4. Select projects/sessions.

  5. Click Import, wait for completion.

FAQ

Database not found?

Possible Reasons:

  1. Never used OpenCode — the database is created only after the first session.

    • Solution: Run a session in OpenCode first.
  2. Custom data path — you may have set $XDG_DATA_HOME or another custom location.

    • Solution: Add the custom path in Mantra Settings.
Import slow?

Tips:

  1. Large SQLite databases take more time to parse.
  2. No need to close OpenCode — Mantra accesses the database read-only.

Advanced Config

Custom Log Paths

If your AI tools use non-default paths, you can add custom scan paths in Mantra settings:

  1. Open Settings (click gear icon or Cmd/Ctrl + ,).
  2. Select "Development" in the sidebar.
  3. Find the "Tool Configuration Paths" section.
  4. Click the "Add Path" button next to the corresponding tool (e.g., Claude Code).
  5. Select your custom log storage folder.

Once added, Mantra will immediately rescan for projects in that path.

Batch Import

To import multiple projects:

  1. Select multiple projects in the list.
  2. Or click "Select All".
  3. Click "Batch Import".

Tip

Batch import processes projects sequentially.

Troubleshooting

General Issues

IssuePossible CauseSolution
No projects scannedTool unusedUse tool first
Import button disabledNo selectionSelect at least one
Import interruptedDisk fullFree up space
No conversations shownRefresh delayRestart or Refresh

Tool Specific Issues

Claude Code:

  • Check ~/.claude/projects/ exists.
  • Check JSONL format.
  • Check permissions.

Gemini CLI:

  • Check ~/.gemini/ exists.
  • Check JSON format.
  • Update tool.

Cursor:

  • Ensure Cursor closed.
  • Check SQLite DB exists.
  • Check DB integrity.

Codex:

  • Check ~/.codex/sessions/ exists.
  • Check JSONL format.
  • Windows users check WSL.

GitHub Copilot Chat:

  • Make sure you've used the Chat panel in your IDE (not just code completion).
  • macOS: check ~/Library/Application Support/Code/User/globalStorage/github.copilot-chat/ exists.
  • Multiple IDE users: seeing separate cards per IDE distribution is expected behavior.

OpenCode:

  • Check ~/.local/share/opencode/opencode.db (Linux) or ~/Library/Application Support/opencode/opencode.db (macOS) exists.
  • No need to close OpenCode; Mantra accesses the database read-only.

Get Help

If issues persist:

  1. Check FAQ.
  2. Search GitHub Issues.
  3. Join Discord Community.
  4. Submit new Issue with details.