[project]
name = "contextfs"
version = "0.1.28"
description = "Universal AI memory layer - cross-client, cross-repo context management with RAG"
readme = "README.md"
license = { text = "MIT" }
authors = [
{ name = "Matthew Long", email = "mlong@contextfs.ai" },
{ name = "The YonedaAI Collaboration" }
]
requires-python = ">=3.10"
keywords = ["ai", "memory", "context", "mcp", "rag", "llm", "agents", "claude", "gemini", "codex"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
# MCP Protocol
"mcp>=1.0.0",
# Vector Store & Embeddings
"chromadb>=1.0.0",
"sentence-transformers>=3.0.0",
# LLM APIs
"anthropic>=0.40.0",
"openai>=1.50.0",
# Data & Validation
"pydantic>=2.10.0",
"pydantic-settings>=2.6.0",
# Tokenization
"tiktoken>=0.8.0",
# Web/API
"fastapi>=0.115.0",
"uvicorn>=0.32.0",
# CLI
"typer>=0.15.0",
"rich>=13.9.0",
# Git integration
"gitpython>=3.1.43",
# Utilities
"python-dotenv>=1.0.1",
# JSON Schema validation
"jsonschema>=4.23.0",
# Database migrations
"alembic>=1.14.0",
]
[project.optional-dependencies]
web = [
"fastapi>=0.115.0",
"uvicorn>=0.32.0",
"websockets>=14.0",
]
postgres = [
"asyncpg>=0.30.0",
"psycopg2-binary>=2.9.10",
]
# Fast embedding backend (recommended for large repos)
fast = [
"fastembed>=0.4.0",
]
# GPU acceleration (optional)
gpu = [
"fastembed-gpu>=0.4.0",
]
all = [
"contextfs[web,postgres,fast]",
]
dev = [
"pytest>=8.3.0",
"pytest-asyncio>=0.24.0",
"pytest-cov>=6.0.0",
"mypy>=1.13.0",
"ruff>=0.8.0",
"pre-commit>=4.0.0",
]
docs = [
"mkdocs-material>=9.5.0",
"mkdocstrings[python]>=0.27.0",
"pymdown-extensions>=10.12",
]
[project.scripts]
contextfs = "contextfs.cli:app"
ctx = "contextfs.cli:app"
contextfs-mcp = "contextfs.mcp_server:main"
[project.urls]
Homepage = "https://github.com/MagnetonIO/contextfs"
Repository = "https://github.com/MagnetonIO/contextfs"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/contextfs"]
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # function call in default argument
"B904", # raise from in except
"B007", # unused loop variable (common in parsing)
"ARG001", # unused function argument
"ARG002", # unused method argument (API contracts)
"SIM105", # contextlib.suppress vs try-except-pass (readability)
]
[tool.ruff.lint.isort]
known-first-party = ["contextfs"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.mypy]
python_version = "3.10"
warn_return_any = false
warn_unused_ignores = false
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = false
ignore_missing_imports = true
exclude = [
"tests/",
"build/",
"dist/",
]
[[tool.mypy.overrides]]
module = "chromadb.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "sentence_transformers.*"
ignore_missing_imports = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks integration tests",
"postgres: marks tests requiring PostgreSQL",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::UserWarning",
]
[tool.coverage.run]
source = ["src/contextfs"]
branch = true
omit = [
"*/tests/*",
"*/__pycache__/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
]