Skip to main content

Universal LLM context portability - take your AI conversations anywhere

Project description

OmniContext �

Your AI conversations belong to you, not your provider.

OmniContext is the universal standard for AI memory portability. It allows you to freely move your chat history, context, and learned preferences between ChatGPT, Claude, Gemini, Grok, and local tools like Cursor.

License: MIT Version: 1.0.0 Status: Production Ready Privacy: Local First


🌟 Why OmniContext?

  • Zero Lock-in: Don't lose your coding history just because you switched models.
  • Unified Memory: Search across all your different AI tools in one place.
  • Smart Migration: Summarize weeks of work into a single context prompt for a new agent.
  • Privacy First: Everything runs on your machine. No cloud sync. No tracking.

📦 Installation

Via Pip (Recommended)

pip install omnicontext
omni --help

Run Locally (Development)

git clone https://github.com/uejsh/omnicontext
cd omnicontext
pip install -e .

🚀 Quick Start Guide

1. Import Your History

Load data from your varied sources. OmniContext normalizes them into a universal format.

# Import from a file
omni import chatgpt ./conversations.json
omni import claude ./claude_export.zip

# Auto-detect local context
omni import cursor    # Imports from Cursor IDE
omni import claude-code # Imports from Claude Code CLI

2. Find What Matters

Filter your massive history down to the relevant context.

# Search for specific concepts
omni search "react hooks"

# Select conversations for export
omni select --search "react"
omni select --after 2026-01-01

3. Move Context

Export your selected memory to use elsewhere.

# 📋 Copy for pasting into a new LLM (Optimized!)
omni export prompt | clip

# 💾 Save full backup to file
omni export markdown -o backup.md

🛠️ CLI Reference

omni import <source> [path]

Ingest data from an external provider.

Source Instructions
chatgpt SettingsData ControlsExport Data. Wait for email. Download ZIP. Extract conversations.json.
claude ProfileSettingsData ControlExport Data. Wait for email. Use the ZIP file directly.
gemini Google Takeout. Select only "Gemini". Download ZIP. Use the ZIP file directly.
grok X SettingsAccountDownload Archive. Use the twitter-...zip directly.
cursor Automatic. Reads from %APPDATA%/Cursor/User/globalStorage/state.vscdb.
claude-code Automatic. Reads from ~/.claude/.

omni list / omni search

Browse your database.

  • omni list: Show all conversations (ID, Date, Title).
  • omni list --source chatgpt: Filter by platform.
  • omni list --selected: Show only what you have currently picked.
  • omni search "query": Full-text search with highlighting.

omni select

Build your working set of conversations. (These are persistent until you clear them).

  • omni select --all: Select everything (Careful!).
  • omni select --search "foo": Select all matches.
  • omni select --clean: Reset/Clear your selection.
  • omni select id1 id2: Select specific IDs from the list.

omni export <format>

Output your selected conversations.

  • Formats:
    • markdown: Readable text. Best for reading or archiving code.
    • prompt: Optimized XML format (<context>...) with message truncation (500 chars). Best for pasting into AI.
    • json: Raw data dump.
  • Flags:
    • -o, --output <file>: Write results to file instead of screen.
    • -t, --max-tokens <n>: (Prompt only) Hard limit on output size.

omni ask "<question>" (New! ✨)

Use RAG (Retrieval Augmented Generation) to query your own history. Creates a temporary agent with your selected history as its memory.

  • Requires Config: You must set an API key first.
  • Example: omni ask "What was the solution to the Redis bug I had last week?"

omni summarize

Uses AI to analyze your history and extract key learnings and user preferences.

  • Useful for creating a "Memory File" to give to new agents.

omni config

Manage your AI settings.

omni config set api-key sk-proj-123456...   # OpenAI or Anthropic Key
omni config set provider openai              # or 'anthropic'
omni config set model gpt-4o                 # Custom model selection

💡 Advanced Workflows

The "Project Migration" Protocol

Moving a specific coding project from ChatGPT to Claude?

  1. omni select --clean (Start fresh)
  2. omni select --search "ProjectName" (Find relevant chats)
  3. omni export prompt | clip (Copy context)
  4. Paste into Claude: "Here is the context of what we've done so far..."

The "Personal Wiki" Protocol

Treat your AI history as a knowledge base.

  1. omni select --all
  2. omni ask "Summarize my political views based on my chat history"
  3. omni ask "List all the Python libraries I have used"

The "Digital Hoarder" Protocol

Archive everything locally forever.

  1. Import from all 5 sources.
  2. omni select --all
  3. omni export json -o full_backup_2026.json

🔒 Security & Privacy

OmniContext is Local-First Software.

  • Database: All data resides in a SQLite file at ~/.omni.db or %USERPROFILE%/.omni.db.
  • Egress: No data leaves your machine unless you explicitly run omni ask or omni summarize, which sends only the selected context to your configured API provider (OpenAI/Anthropic).
  • Keys: API keys are stored in the local database.

❓ Troubleshooting

"Error: Claude Code directory not found"

  • Ensure you have actually run claude (the CLI) on this machine. If you only use the web version, use omni import claude with a zip export instead.

"Imported 0 conversations"

  • Check if you are pointing to the correct file.
  • For ChatGPT: Must be conversations.json.
  • For Google: Must be the specific Takeout zip or extracted folder.

"Output is too large for clipboard"

  • Use file output: omni export prompt -o context.txt

📄 License

MIT © 2026 OmniContext Contributors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omnicontext-1.0.0.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omnicontext-1.0.0-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file omnicontext-1.0.0.tar.gz.

File metadata

  • Download URL: omnicontext-1.0.0.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for omnicontext-1.0.0.tar.gz
Algorithm Hash digest
SHA256 345c5bd4725cc71724807292b72d45d10dbd48b305505ec3555b3f1fb45c9937
MD5 e6736cf40db78342e11cadf7c1492af4
BLAKE2b-256 fc8817d7039efaaf25d83afb4d95902fafb624ba8035099d6aea2ba4870f2f06

See more details on using hashes here.

File details

Details for the file omnicontext-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: omnicontext-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for omnicontext-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05f10427ee12c5692c8fcb5ec1d0b178f55799fadae4b2e882bb730497bd28a4
MD5 d663d3e4257b45730de0412db3a556de
BLAKE2b-256 35aa15ecd95bb80066316d9a918c5d5c5abd54d17f0d5fed092abb011fe212b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page