Standalone semantic search over workspace .md files. Uses an OpenAI-compatible embedding API and SQLite for vector storage. No external dependencies beyond Python 3 stdlib + the embedding API.
Set these environment variables (or pass as CLI args):
export EMBEDDING_API_KEY="sk-xxx"
export EMBEDDING_API_BASE="https://api.openai.com/v1" # any OpenAI-compatible endpoint
export EMBEDDING_MODEL="text-embedding-3-small" # optional, this is the default
python3 scripts/index.py /path/to/workspace
Options:
--force — full reindex (clear existing data)--db PATH — custom SQLite path (default: memory_search.sqlite in skill dir)--api-base, --api-key, --model — override env varsIncremental: only new/changed chunks are embedded. Deleted files are cleaned up automatically.
python3 scripts/search.py "your query here"
Options:
--top-k N — number of results (default: 5)--min-score F — minimum cosine similarity threshold (default: 0.3)--json — output as JSON--db, --api-base, --api-key, --model — same as indexindex.py on the workspace (once, or after file changes)search.py "query" to find relevant snippetsread tool to load full context from the returned file paths and line numbers共 1 个版本