Add memvid .mv2 export — portable AI memory layer for packed repos
Author: fuleinistCreated Jun 4, 2026Updated Jun 5, 2026
Labelsenhancementneeds discussionidea
Feature Request: Add memvid .mv2 export — portable AI memory layer for packed repos
Thank you for helping improve Repomix!
We appreciate your feedback and will review your request as soon as possible.
Description
Repomix currently outputs packed repos as XML, Markdown, or plain text. This is great for feeding code to LLMs in a single prompt — but once packed, the output is opaque to search and retrieval.
Proposed: Add an optional --output-format mv2 flag that pipes the packed output directly into a memvid .mv2 file.
Motivation
memvid is a single-file memory layer for AI agents that:
- Packages data + embeddings + search index into one portable
.mv2file - Supports hybrid search (BM25 lexical + vector similarity) out of the box
- Provides O(1) entity lookups via Memory Cards (SPO triplets)
- Includes time-travel debugging — replay retrieval sessions
- Works offline, no server, no Docker, no infrastructure
Repomix + memvid would enable:
- Portable semantic repo memory —
repomix --output-format mv2 --include "**/*.ts"→repo.mv2anyone canmemvid find repo.mv2 --query "where is auth handled?" - Zero-infrastructure RAG — commit
.mv2files to git, share with team, query with any LLM without rebuilding a vector index - Versioned codebase snapshots — each
.mv2is a point-in-time memory of the repo that can be diffed via time-travel - Multi-repo composite memory — pack multiple repos into one
.mv2, query across all of them with hybrid search
Use Case
A developer clones a large repo they've never seen before. Instead of reading files manually:
# Pack and memorize
npx repomix --output-format mv2 --output repo-memory.mv2
# Ask questions instantly
memvid find repo-memory.mv2 --query "how does the auth middleware work?"
# → Returns relevant code chunks with BM25 + vector hybrid ranking
# Entity lookup
memvid state repo-memory.mv2 "JWTValidator"
# → { expiresIn: '24h', issuer: 'auth-service', algorithm: 'RS256' }Technical Approach
- Add
--output-format mv2option insrc/config.ts - Use memvid SDK (Node.js
@memvid/sdkor CLImemvid) after repomix completes the pack - Repomix output (XML/MD/plain) becomes the
textfield inmemvid.put() - Repo file paths stored as
metadata.path, line numbers asmetadata.line - Auto-generate entity candidates from function/class names and export declarations
// Example integration sketch
import { create } from '@memvid/sdk';
import { pack } from 'repomix';
const mem = await create('repo-memory.mv2', 'basic');
const packed = await pack({ directory: './src' });
for (const file of packed.files) {
await mem.put({
title: file.path,
label: 'source',
text: file.content,
metadata: { path: file.path, lines: file.content.split('\n').length }
});
}Alternatives Considered
| Approach | Downsides |
|---|---|
| JSON Lines + ChromaDB | Requires running a Chroma server; not portable |
| GitHub Co-Pilot memory | Proprietary; requires login; not local |
| Pinecone / Weaviate | Cloud-only or Docker required; not single-file |
| memvid | Zero infrastructure, single .mv2 file, works offline |
Labels
- enhancement
- triage
Checklist
- Check existing issues for similar proposals (none found for
memvidormv2) - Verify
@memvid/sdkis TypeScript-compatible (yes — official JS/TS SDK) - Consider CLI fallback:
repomix --output-format mv2shells out tomemvid create
Source: yamadashy/repomix