How to Switch from ChatGPT to Claude Code Without Losing Your Context
More developers are switching from ChatGPT to Claude Code in 2026. But after months of teaching ChatGPT how you code, starting fresh with Claude feels like losing everything. Here's how to bring your context with you.
Why Developers Are Switching
Claude Code has become the most-used AI coding assistant in 2026, with 46% of developers preferring it over alternatives. The reasons are clear: it runs in your terminal, understands your entire codebase, and its agentic capabilities let it make multi-file changes autonomously.
But if you've been using ChatGPT for months, you've built up a library of custom instructions, coding preferences, and project context. Manually rewriting all of that for Claude's format is tedious and error-prone.
The Problem: Different Formats
ChatGPT and Claude store instructions in completely different ways:
- ChatGPT uses custom instructions and memory stored server-side, plus CHATGPT.md project files
- Claude Code uses CLAUDE.md files (project-level) and ~/.claude/ (global settings)
It's not just the file format that differs — the conventions are different too. ChatGPT instructions tend to be conversational, while Claude Code's CLAUDE.md follows a specific markdown structure with rules, preferences, and project context.
Copy-pasting doesn't work. You need a translation layer.
The Solution: One Command
memoir can translate your ChatGPT instructions into Claude Code format automatically using AI:
memoir migrate --from chatgpt --to claudeThis doesn't just copy your text. It actually rewrites your instructions to follow Claude Code's conventions:
- Converts conversational instructions into structured CLAUDE.md format
- Maps ChatGPT "custom instructions" to Claude's project rules
- Preserves your coding style preferences, language choices, and patterns
- Handles format differences (ChatGPT's free-form vs Claude's markdown structure)
Step-by-Step Migration
1. Install memoir
npm install -g memoir-cli2. Export your ChatGPT instructions
Create a file called CHATGPT.md in your project root with your custom instructions. You can export these from ChatGPT's settings under "Customization" → "Custom Instructions."
# My ChatGPT Custom Instructions
## How would you like ChatGPT to respond?
- Always use TypeScript, never plain JavaScript
- Prefer functional components with hooks
- Use Tailwind CSS for styling
- Write concise code with minimal comments
- When debugging, check the simplest explanation first
## What would you like ChatGPT to know about you?
- I'm a full-stack developer working with Next.js
- My projects use Supabase for the backend
- I prefer bun over npm
- I deploy to Vercel3. Run the migration
memoir migrate --from chatgpt --to claudememoir reads your CHATGPT.md and generates a properly formatted CLAUDE.md with your preferences translated to Claude's conventions.
4. Preview before applying
memoir migrate --from chatgpt --to claude --dry-runUse --dry-run to preview the generated CLAUDE.md without writing it to disk.
Migrate to Any Tool, Not Just Claude
memoir supports migration between any combination of 11 tools:
# ChatGPT → Cursor
memoir migrate --from chatgpt --to cursor
# Claude → Gemini
memoir migrate --from claude --to gemini
# Cursor → Claude
memoir migrate --from cursor --to claude
# One tool → all tools
memoir migrate --from chatgpt --to allEach migration uses AI to translate between the specific conventions of each tool, not just copy-paste.
Keep Both Tools in Sync
Many developers use ChatGPT and Claude together. memoir lets you maintain configs for both and keep them synchronized:
# Back up everything
memoir push
# Restore on a new machine (both tools get their configs)
memoir restore70% of developers use 2-4 AI tools. memoir is built for this reality.
FAQ
Do I need an API key for migration?
The AI-powered translation uses a Gemini API key for the rewriting step. memoir will prompt you if one isn't configured. Basic file-format conversion works without any API key.
Will this overwrite my existing CLAUDE.md?
memoir will ask for confirmation before overwriting. Use --dry-run to preview first.
Can I migrate conversation history?
memoir migrates instructions and preferences, not conversation history. Your coding style, rules, and preferences transfer — individual conversations do not.
Switch AI tools without starting over.
memoir translates your instructions between any AI coding assistant.
npm install -g memoir-cli