Skip to content

vectorlessflow/vectorless-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vectorless-code

PyPI PyPI Downloads

Code-aware search and navigation engine, powered by vectorless.

vectorless-code is built on top of vectorless. The vectorless project is currently under active development. Once it reaches a stable release, vectorless-code will fully inherit its capabilities and deliver the intended search experience.

Install

pip install vectorless-code

Quick start

# Initialize in your project
vcc init

# Compile the codebase
vcc compile

# Search
vcc ask "where is the authentication logic"

Commands

Core commands

Command Description
vcc init Initialize project (creates .vectorless_code/settings.yml)
vcc compile Compile codebase into searchable index
vcc ask <question> Ask a question about the codebase
vcc status Show compilation status and index statistics

Daemon management

Command Description
vcc daemon status Show daemon status and loaded projects
vcc daemon restart Restart the daemon
vcc daemon stop Stop the daemon

Utilities

Command Description
vcc doctor Check system health and report issues
vcc reset [--all] Reset project databases and optionally settings
vcc mcp Run as MCP server (stdio mode)

MCP Server

vectorless-code includes a built-in MCP (Model Context Protocol) server for integration with AI assistants:

# Run MCP server manually
vcc mcp

# Or use as module
python -m vectorless_code

The MCP server provides an ask tool for semantic code search with:

  • Natural language questions
  • Configurable result limits
  • Incremental index updates

Environment Variables

Variable Description
VECTORLESS_API_KEY API key for vectorless service
VECTORLESS_MODEL Model to use (e.g., gpt-4o)
VECTORLESS_ENDPOINT API endpoint URL
VECTORLESS_DAEMON_SUPERVISED Set to 1 when daemon is managed externally (e.g., Docker)
VECTORLESS_HOST_CWD Host working directory (for containerized environments)
VECTORLESS_HOST_PATH_MAPPING Path mappings for Docker (format: /host:/container)

Docker Support

vectorless-code supports containerized environments with automatic path mapping:

docker run -v /host/project:/project \
  -e VECTORLESS_HOST_PATH_MAPPING=/host/project:/project \
  vectorless-code

Development

Requirements

  • Python 3.11+
  • uv (recommended)

Setup

# Clone
git clone https://github.com/vectorlessflow/vectorless-code.git
cd vectorless-code

# Install with dev dependencies
uv sync --all-extras

# Or install specific extra group
uv sync --extra dev

Run tests

# Run all tests
python -m pytest tests/ -v

# Run a specific test
python -m pytest tests/test_compile.py::TestDetectLanguage -v

Lint and format

ruff check src/ tests/ --fix
ruff format src/ tests/

Type check

mypy src/

License

Apache-2.0

Releases

No releases published