Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

memvid/memvid-extension

Repository files navigation

AI-powered codebase search and Q&A for VS Code, powered byMemvid.

Index your workspace once, then ask questions about your code in natural language.

Features

  • One-Click Indexing - Index your entire workspace with a single button click
  • Incremental Indexing - Only re-index changed files for faster updates
  • Natural Language Q&A - Ask questions about your codebase in plain English
  • Semantic Search - Find code by meaning, not just keywords
  • Sidebar Chat - Interactive chat panel for ongoing conversations
  • Context Menu Actions - Right-click on code to ask questions, explain, or find similar code
  • Cloud Sync - Sync your index to Memvid cloud for backup and sharing
  • Keyboard Shortcuts - Quick access withCmd+Shift+M (macOS) orCtrl+Shift+M

Quick Start

  1. Install the extension
  2. Open a workspace/folder
  3. Click "Index Workspace" in the Memvid sidebar
  4. Start asking questions!

Requirements

  • Node.js 18+
  • OpenAI API Key (required for Q&A, optional for local embeddings)

Setup

Set your OpenAI API Key

Add to your VS Code settings (Cmd+,):

{"memvid.openaiApiKey":"sk-..."}

Or set the environment variable:

export OPENAI_API_KEY="sk-..."

Commands

CommandShortcutDescription
Memvid: Index Workspace-Index all code files in workspace
Memvid: Ask QuestionCmd+Shift+AAsk a question about your code
Memvid: Open Chat PanelCmd+Shift+MOpen the sidebar chat
Memvid: Search Codebase-Search your indexed code
Memvid: Show Index Stats-View index statistics
Memvid: Clear Index-Delete the index and start fresh
Memvid: Sync to Cloud-Sync your index to Memvid cloud
Memvid: Configure Cloud Sync-Set up API key and Memory ID
Memvid: Show Sync Status-View cloud sync status
Memvid: Set OpenAI API Key-Set your OpenAI API key
Memvid: Clear OpenAI API Key-Clear your OpenAI API key
Memvid: Report Issue-Report a bug or issue
Memvid: Ask about this code-Ask a question about selected code (context menu)
Memvid: Explain this code-Get an explanation of selected code (context menu)
Memvid: Find similar code-Find similar code in your codebase (context menu)
Memvid: Add to context-Add selected code to chat context (context menu)

Configuration

SettingDefaultDescription
memvid.indexPath.memvid/codebase.mv2Path to the index file
memvid.openaiApiKey-OpenAI API key for embeddings and Q&A
memvid.embeddingModelbge-smallEmbedding model (bge-small,nomic,openai-small)
memvid.llmModelopenai:gpt-4o-miniLLM for answering questions
memvid.includePatterns["**/*.ts", ...]File patterns to index
memvid.excludePatterns["**/node_modules/**", ...]File patterns to exclude
memvid.autoIndexfalseAuto-index on workspace open
memvid.maxFileSize100000Max file size in bytes to index
memvid.apiKey-Memvid API key for cloud sync
memvid.memoryId-Memory ID for cloud sync
memvid.autoSyncfalseAuto-sync to cloud after indexing
memvid.batchSize100Batch size for indexing (higher = faster)
memvid.parallelReads10Number of files to read in parallel during indexing
memvid.incrementalIndexingtrueEnable incremental indexing (only index changed files)
memvid.dashboardUrlhttps://api.memvid.comMemvid API endpoint URL

Example Questions

  • "How does authentication work in this project?"
  • "Where is the database connection configured?"
  • "What API endpoints are available?"
  • "Explain the user registration flow"
  • "Find all error handling code"

How It Works

  1. Indexing: Memvid reads your source files, generates embeddings, and stores them in a portable.mv2 file
    • Supports incremental indexing to only process changed files
    • Parallel file reading for faster indexing
    • Configurable batch sizes for optimal performance
  2. Search: Uses hybrid BM25 + vector search to find relevant code
  3. Q&A: Retrieves relevant code snippets and uses an LLM to synthesize answers
  4. Cloud Sync: Syncs your index to Memvid cloud using tickets for version control

Cloud Sync

Sync your indexed codebase to Memvid cloud for backup, sharing, and access from other devices.

Setup Cloud Sync

  1. Get your API key frommemvid.com/dashboard
  2. Create a Memory in the dashboard to get a Memory ID
  3. RunMemvid: Configure Cloud Sync and enter your credentials
  4. RunMemvid: Sync to Cloud to sync your index

Settings

{"memvid.apiKey":"mv2_your_api_key_here","memvid.memoryId":"mem_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","memvid.autoSync":true}

Privacy

  • Your code stays local - only indexed in a local.mv2 file
  • Search queries are processed locally using embeddings
  • Only Q&A requests are sent to OpenAI (with relevant code context)
  • No telemetry or analytics by default

Development

# Install dependenciesnpm install# Compile TypeScriptnpm run compile# Watch modenpm run watch# Package extensionnpm run package

Testing

Quick Test

  1. Build and Run:

    npm run compile# Press F5 in VS Code to launch extension in development mode
  2. Test Features:

    • Set API key viaMemvid: Set OpenAI API Key
    • Index workspace viaMemvid: Index Workspace
    • Ask questions via chat panel orMemvid: Ask Question
    • Test context menu actions (right-click on selected code):
      • Ask about this code
      • Explain this code
      • Find similar code
      • Add to context
    • Test cloud sync functionality
    • View index statistics

Troubleshooting

"No documents indexed"

RunMemvid: Index Workspace command first.

"API key not configured"

Setmemvid.openaiApiKey in settings orOPENAI_API_KEY env var.

Large workspaces are slow

  • Increasememvid.maxFileSize threshold
  • Add more patterns tomemvid.excludePatterns
  • Consider indexing specific folders only

License

Licensed under the Apache License, Version 2.0. SeeLICENSE for details.

Links

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2026 Movatter.jp