kodit 0.2.4__tar.gz → 0.2.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of kodit might be problematic. Click here for more details.
- {kodit-0.2.4 → kodit-0.2.6}/PKG-INFO +1 -1
- {kodit-0.2.4 → kodit-0.2.6}/alembic.ini +1 -1
- {kodit-0.2.4 → kodit-0.2.6}/docs/reference/configuration/index.md +1 -1
- {kodit-0.2.4 → kodit-0.2.6}/docs/reference/deployment/index.md +1 -2
- kodit-0.2.6/docs/reference/indexing/index.md +279 -0
- {kodit-0.2.4 → kodit-0.2.6}/pyproject.toml +2 -0
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/_version.py +2 -2
- kodit-0.2.6/src/kodit/application/__init__.py +1 -0
- kodit-0.2.6/src/kodit/application/commands/__init__.py +1 -0
- kodit-0.2.6/src/kodit/application/commands/snippet_commands.py +22 -0
- kodit-0.2.6/src/kodit/application/services/__init__.py +1 -0
- kodit-0.2.6/src/kodit/application/services/indexing_application_service.py +387 -0
- kodit-0.2.6/src/kodit/application/services/snippet_application_service.py +149 -0
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/cli.py +118 -82
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/database.py +0 -22
- kodit-0.2.6/src/kodit/domain/__init__.py +1 -0
- kodit-0.2.4/src/kodit/source/source_models.py → kodit-0.2.6/src/kodit/domain/entities.py +88 -19
- kodit-0.2.6/src/kodit/domain/enums.py +9 -0
- kodit-0.2.6/src/kodit/domain/errors.py +5 -0
- kodit-0.2.6/src/kodit/domain/interfaces.py +27 -0
- kodit-0.2.6/src/kodit/domain/repositories.py +95 -0
- kodit-0.2.6/src/kodit/domain/services/__init__.py +1 -0
- kodit-0.2.6/src/kodit/domain/services/bm25_service.py +124 -0
- kodit-0.2.6/src/kodit/domain/services/embedding_service.py +155 -0
- kodit-0.2.6/src/kodit/domain/services/enrichment_service.py +48 -0
- kodit-0.2.6/src/kodit/domain/services/ignore_service.py +45 -0
- kodit-0.2.6/src/kodit/domain/services/indexing_service.py +203 -0
- kodit-0.2.6/src/kodit/domain/services/snippet_extraction_service.py +89 -0
- kodit-0.2.6/src/kodit/domain/services/source_service.py +85 -0
- kodit-0.2.6/src/kodit/domain/value_objects.py +215 -0
- kodit-0.2.6/src/kodit/infrastructure/__init__.py +1 -0
- kodit-0.2.6/src/kodit/infrastructure/bm25/__init__.py +1 -0
- kodit-0.2.6/src/kodit/infrastructure/bm25/bm25_factory.py +28 -0
- kodit-0.2.4/src/kodit/bm25/local_bm25.py → kodit-0.2.6/src/kodit/infrastructure/bm25/local_bm25_repository.py +33 -22
- kodit-0.2.4/src/kodit/bm25/vectorchord_bm25.py → kodit-0.2.6/src/kodit/infrastructure/bm25/vectorchord_bm25_repository.py +40 -35
- kodit-0.2.6/src/kodit/infrastructure/cloning/__init__.py +1 -0
- kodit-0.2.6/src/kodit/infrastructure/cloning/folder/__init__.py +1 -0
- kodit-0.2.6/src/kodit/infrastructure/cloning/folder/factory.py +128 -0
- kodit-0.2.6/src/kodit/infrastructure/cloning/folder/working_copy.py +38 -0
- kodit-0.2.6/src/kodit/infrastructure/cloning/git/__init__.py +1 -0
- kodit-0.2.6/src/kodit/infrastructure/cloning/git/factory.py +147 -0
- kodit-0.2.6/src/kodit/infrastructure/cloning/git/working_copy.py +32 -0
- kodit-0.2.6/src/kodit/infrastructure/cloning/metadata.py +127 -0
- kodit-0.2.6/src/kodit/infrastructure/embedding/__init__.py +1 -0
- kodit-0.2.6/src/kodit/infrastructure/embedding/embedding_factory.py +87 -0
- kodit-0.2.6/src/kodit/infrastructure/embedding/embedding_providers/__init__.py +1 -0
- kodit-0.2.6/src/kodit/infrastructure/embedding/embedding_providers/batching.py +93 -0
- kodit-0.2.6/src/kodit/infrastructure/embedding/embedding_providers/hash_embedding_provider.py +79 -0
- kodit-0.2.6/src/kodit/infrastructure/embedding/embedding_providers/local_embedding_provider.py +129 -0
- kodit-0.2.6/src/kodit/infrastructure/embedding/embedding_providers/openai_embedding_provider.py +113 -0
- kodit-0.2.6/src/kodit/infrastructure/embedding/local_vector_search_repository.py +114 -0
- kodit-0.2.4/src/kodit/embedding/vectorchord_vector_search_service.py → kodit-0.2.6/src/kodit/infrastructure/embedding/vectorchord_vector_search_repository.py +65 -46
- kodit-0.2.6/src/kodit/infrastructure/enrichment/__init__.py +1 -0
- {kodit-0.2.4/src/kodit → kodit-0.2.6/src/kodit/infrastructure}/enrichment/enrichment_factory.py +28 -12
- kodit-0.2.6/src/kodit/infrastructure/enrichment/legacy_enrichment_models.py +42 -0
- {kodit-0.2.4/src/kodit/enrichment/enrichment_provider → kodit-0.2.6/src/kodit/infrastructure/enrichment}/local_enrichment_provider.py +38 -26
- kodit-0.2.6/src/kodit/infrastructure/enrichment/null_enrichment_provider.py +25 -0
- kodit-0.2.6/src/kodit/infrastructure/enrichment/openai_enrichment_provider.py +89 -0
- kodit-0.2.6/src/kodit/infrastructure/git/__init__.py +1 -0
- kodit-0.2.4/src/kodit/source/git.py → kodit-0.2.6/src/kodit/infrastructure/git/git_utils.py +10 -2
- kodit-0.2.6/src/kodit/infrastructure/ignore/__init__.py +1 -0
- kodit-0.2.4/src/kodit/source/ignore.py → kodit-0.2.6/src/kodit/infrastructure/ignore/ignore_pattern_provider.py +23 -6
- kodit-0.2.6/src/kodit/infrastructure/indexing/__init__.py +1 -0
- kodit-0.2.6/src/kodit/infrastructure/indexing/fusion_service.py +55 -0
- kodit-0.2.6/src/kodit/infrastructure/indexing/index_repository.py +291 -0
- kodit-0.2.6/src/kodit/infrastructure/indexing/indexing_factory.py +113 -0
- kodit-0.2.6/src/kodit/infrastructure/snippet_extraction/__init__.py +1 -0
- kodit-0.2.6/src/kodit/infrastructure/snippet_extraction/language_detection_service.py +39 -0
- kodit-0.2.6/src/kodit/infrastructure/snippet_extraction/snippet_extraction_factory.py +95 -0
- kodit-0.2.6/src/kodit/infrastructure/snippet_extraction/snippet_query_provider.py +45 -0
- kodit-0.2.4/src/kodit/snippets/method_snippets.py → kodit-0.2.6/src/kodit/infrastructure/snippet_extraction/tree_sitter_snippet_extractor.py +123 -61
- kodit-0.2.6/src/kodit/infrastructure/sqlalchemy/__init__.py +1 -0
- {kodit-0.2.4/src/kodit/embedding → kodit-0.2.6/src/kodit/infrastructure/sqlalchemy}/embedding_repository.py +40 -26
- kodit-0.2.6/src/kodit/infrastructure/sqlalchemy/file_repository.py +78 -0
- kodit-0.2.6/src/kodit/infrastructure/sqlalchemy/repository.py +133 -0
- kodit-0.2.6/src/kodit/infrastructure/sqlalchemy/snippet_repository.py +79 -0
- kodit-0.2.6/src/kodit/infrastructure/ui/__init__.py +1 -0
- kodit-0.2.6/src/kodit/infrastructure/ui/progress.py +127 -0
- {kodit-0.2.4/src/kodit/util → kodit-0.2.6/src/kodit/infrastructure/ui}/spinner.py +19 -4
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/mcp.py +51 -28
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/migrations/env.py +1 -4
- kodit-0.2.6/src/kodit/reporting.py +78 -0
- {kodit-0.2.4 → kodit-0.2.6}/tests/conftest.py +21 -6
- kodit-0.2.6/tests/kodit/application/__init__.py +1 -0
- kodit-0.2.6/tests/kodit/application/indexing_application_service_test.py +416 -0
- kodit-0.2.6/tests/kodit/application/snippet_application_service_test.py +161 -0
- kodit-0.2.6/tests/kodit/domain/__init__.py +1 -0
- kodit-0.2.6/tests/kodit/domain/bm25_domain_service_test.py +229 -0
- kodit-0.2.6/tests/kodit/domain/enrichment_domain_service_test.py +127 -0
- kodit-0.2.6/tests/kodit/domain/snippet_extraction_domain_service_test.py +183 -0
- kodit-0.2.6/tests/kodit/domain/test_embedding_service.py +338 -0
- kodit-0.2.6/tests/kodit/domain/test_models.py +160 -0
- kodit-0.2.6/tests/kodit/infrastructure/__init__.py +1 -0
- kodit-0.2.6/tests/kodit/infrastructure/embedding/embedding_factory_test.py +82 -0
- kodit-0.2.6/tests/kodit/infrastructure/embedding/embedding_provider/test_hash_embedding_provider.py +277 -0
- kodit-0.2.6/tests/kodit/infrastructure/embedding/embedding_provider/test_local_embedding_provider.py +328 -0
- kodit-0.2.6/tests/kodit/infrastructure/embedding/embedding_provider/test_openai_embedding_provider.py +254 -0
- kodit-0.2.6/tests/kodit/infrastructure/embedding/test_batching.py +87 -0
- kodit-0.2.6/tests/kodit/infrastructure/embedding/test_embedding_integration.py +597 -0
- kodit-0.2.6/tests/kodit/infrastructure/embedding/test_local_vector_search_repository.py +359 -0
- kodit-0.2.6/tests/kodit/infrastructure/embedding/test_vectorchord_vector_search_repository.py +443 -0
- kodit-0.2.6/tests/kodit/infrastructure/enrichment/enrichment_provider/test_local_enrichment_provider.py +281 -0
- kodit-0.2.6/tests/kodit/infrastructure/enrichment/enrichment_provider/test_null_enrichment_provider.py +101 -0
- kodit-0.2.6/tests/kodit/infrastructure/enrichment/enrichment_provider/test_openai_enrichment_provider.py +360 -0
- kodit-0.2.6/tests/kodit/infrastructure/enrichment/test_enrichment_factory.py +212 -0
- kodit-0.2.6/tests/kodit/infrastructure/enrichment/test_enrichment_integration.py +239 -0
- kodit-0.2.6/tests/kodit/infrastructure/indexing/indexing_repository_test.py +114 -0
- kodit-0.2.6/tests/kodit/infrastructure/snippets/__init__.py +1 -0
- kodit-0.2.6/tests/kodit/infrastructure/source/source_service_test.py +197 -0
- kodit-0.2.6/tests/kodit/infrastructure/sqlalchemy/test_embedding_repository.py +283 -0
- {kodit-0.2.4 → kodit-0.2.6}/tests/kodit/mcp_test.py +1 -0
- kodit-0.2.4/src/kodit/bm25/__init__.py +0 -1
- kodit-0.2.4/src/kodit/bm25/keyword_search_factory.py +0 -17
- kodit-0.2.4/src/kodit/bm25/keyword_search_service.py +0 -34
- kodit-0.2.4/src/kodit/embedding/__init__.py +0 -1
- kodit-0.2.4/src/kodit/embedding/embedding_factory.py +0 -69
- kodit-0.2.4/src/kodit/embedding/embedding_models.py +0 -28
- kodit-0.2.4/src/kodit/embedding/embedding_provider/__init__.py +0 -1
- kodit-0.2.4/src/kodit/embedding/embedding_provider/embedding_provider.py +0 -92
- kodit-0.2.4/src/kodit/embedding/embedding_provider/hash_embedding_provider.py +0 -86
- kodit-0.2.4/src/kodit/embedding/embedding_provider/local_embedding_provider.py +0 -96
- kodit-0.2.4/src/kodit/embedding/embedding_provider/openai_embedding_provider.py +0 -73
- kodit-0.2.4/src/kodit/embedding/local_vector_search_service.py +0 -87
- kodit-0.2.4/src/kodit/embedding/vector_search_service.py +0 -55
- kodit-0.2.4/src/kodit/enrichment/__init__.py +0 -1
- kodit-0.2.4/src/kodit/enrichment/enrichment_provider/__init__.py +0 -1
- kodit-0.2.4/src/kodit/enrichment/enrichment_provider/enrichment_provider.py +0 -36
- kodit-0.2.4/src/kodit/enrichment/enrichment_provider/openai_enrichment_provider.py +0 -79
- kodit-0.2.4/src/kodit/enrichment/enrichment_service.py +0 -45
- kodit-0.2.4/src/kodit/indexing/__init__.py +0 -1
- kodit-0.2.4/src/kodit/indexing/fusion.py +0 -67
- kodit-0.2.4/src/kodit/indexing/indexing_models.py +0 -43
- kodit-0.2.4/src/kodit/indexing/indexing_repository.py +0 -216
- kodit-0.2.4/src/kodit/indexing/indexing_service.py +0 -344
- kodit-0.2.4/src/kodit/snippets/__init__.py +0 -1
- kodit-0.2.4/src/kodit/snippets/languages/__init__.py +0 -53
- kodit-0.2.4/src/kodit/snippets/snippets.py +0 -50
- kodit-0.2.4/src/kodit/source/__init__.py +0 -1
- kodit-0.2.4/src/kodit/source/source_factories.py +0 -356
- kodit-0.2.4/src/kodit/source/source_repository.py +0 -169
- kodit-0.2.4/src/kodit/source/source_service.py +0 -150
- kodit-0.2.4/src/kodit/util/__init__.py +0 -1
- kodit-0.2.4/tests/kodit/bm25/local_bm25_test.py +0 -154
- kodit-0.2.4/tests/kodit/bm25/vectorchord_repository_test.py +0 -188
- kodit-0.2.4/tests/kodit/embedding/embedding_factory_test.py +0 -67
- kodit-0.2.4/tests/kodit/embedding/embedding_provider/local_embedding_provider_test.py +0 -142
- kodit-0.2.4/tests/kodit/embedding/embedding_provider/openai_embedding_provider_test.py +0 -246
- kodit-0.2.4/tests/kodit/embedding/local_vector_search_service_test.py +0 -178
- kodit-0.2.4/tests/kodit/embedding/vectorchord_vector_search_service_test.py +0 -264
- kodit-0.2.4/tests/kodit/enrichment/enrichment_factory_test.py +0 -64
- kodit-0.2.4/tests/kodit/enrichment/enrichment_provider/local_enrichment_provider_test.py +0 -218
- kodit-0.2.4/tests/kodit/enrichment/enrichment_provider/openai_enrichment_provider_test.py +0 -234
- kodit-0.2.4/tests/kodit/indexing/indexing_repository_test.py +0 -107
- kodit-0.2.4/tests/kodit/indexing/indexing_service_test.py +0 -233
- kodit-0.2.4/tests/kodit/snippets/__init__.py +0 -0
- kodit-0.2.4/tests/kodit/snippets/detect_language_test.py +0 -87
- kodit-0.2.4/tests/kodit/snippets/method_extraction_test.py +0 -208
- kodit-0.2.4/tests/kodit/source/git_test.py +0 -21
- kodit-0.2.4/tests/kodit/source/ignore_test.py +0 -264
- kodit-0.2.4/tests/kodit/source/source_service_test.py +0 -320
- {kodit-0.2.4 → kodit-0.2.6}/.cursor/rules/kodit.mdc +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.dockerignore +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.github/CODE_OF_CONDUCT.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.github/CONTRIBUTING.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.github/dependabot.yml +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.github/workflows/docker.yaml +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.github/workflows/docs.yaml +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.github/workflows/pull_request.yaml +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.github/workflows/pypi-test.yaml +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.github/workflows/pypi.yaml +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.github/workflows/test.yaml +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.gitignore +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.python-version +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.vscode/launch.json +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/.vscode/settings.json +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/Dockerfile +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/LICENSE +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/README.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/docs/_index.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/docs/demos/_index.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/docs/demos/go-simple-microservice/index.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/docs/demos/knock-knock-auth/index.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/docs/developer/index.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/docs/getting-started/_index.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/docs/getting-started/installation/index.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/docs/getting-started/integration/index.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/docs/getting-started/quick-start/index.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/docs/reference/_index.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/docs/reference/deployment/docker-compose.yaml +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/docs/reference/deployment/kubernetes.yaml +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/docs/reference/telemetry/index.md +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/.gitignore +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/__init__.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/app.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/config.py +0 -0
- {kodit-0.2.4/src/kodit/snippets → kodit-0.2.6/src/kodit/infrastructure/snippet_extraction}/languages/csharp.scm +0 -0
- {kodit-0.2.4/src/kodit/snippets → kodit-0.2.6/src/kodit/infrastructure/snippet_extraction}/languages/go.scm +0 -0
- {kodit-0.2.4/src/kodit/snippets → kodit-0.2.6/src/kodit/infrastructure/snippet_extraction}/languages/javascript.scm +0 -0
- {kodit-0.2.4/src/kodit/snippets → kodit-0.2.6/src/kodit/infrastructure/snippet_extraction}/languages/python.scm +0 -0
- {kodit-0.2.4/src/kodit/snippets → kodit-0.2.6/src/kodit/infrastructure/snippet_extraction}/languages/typescript.scm +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/log.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/middleware.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/migrations/README +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/migrations/__init__.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/migrations/script.py.mako +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/migrations/versions/7c3bbc2ab32b_add_embeddings_table.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/migrations/versions/85155663351e_initial.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/migrations/versions/9e53ea8bb3b0_add_authors.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/migrations/versions/__init__.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/src/kodit/migrations/versions/c3f5137d30f5_index_all_the_things.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/tests/__init__.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/tests/docker-smoke.sh +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/tests/experiments/cline-prompt-regression-tests/cline_prompt.txt +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/tests/experiments/cline-prompt-regression-tests/cline_prompt_test.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/tests/experiments/embedding.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/tests/experiments/similarity_test.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/tests/kodit/__init__.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/tests/kodit/cli_test.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/tests/kodit/e2e.py +0 -0
- {kodit-0.2.4/tests/kodit → kodit-0.2.6/tests/kodit/infrastructure}/embedding/__init__.py +0 -0
- {kodit-0.2.4/tests/kodit → kodit-0.2.6/tests/kodit/infrastructure}/enrichment/__init__.py +0 -0
- {kodit-0.2.4/tests/kodit → kodit-0.2.6/tests/kodit/infrastructure}/enrichment/enrichment_provider/__init__.py +0 -0
- {kodit-0.2.4/tests/kodit → kodit-0.2.6/tests/kodit/infrastructure}/indexing/__init__.py +0 -0
- {kodit-0.2.4/tests/kodit → kodit-0.2.6/tests/kodit/infrastructure}/snippets/csharp.cs +0 -0
- {kodit-0.2.4/tests/kodit → kodit-0.2.6/tests/kodit/infrastructure}/snippets/golang.go +0 -0
- {kodit-0.2.4/tests/kodit → kodit-0.2.6/tests/kodit/infrastructure}/snippets/javascript.js +0 -0
- {kodit-0.2.4/tests/kodit → kodit-0.2.6/tests/kodit/infrastructure}/snippets/knock-knock-server.py +0 -0
- {kodit-0.2.4/tests/kodit → kodit-0.2.6/tests/kodit/infrastructure}/snippets/python.py +0 -0
- {kodit-0.2.4/tests/kodit → kodit-0.2.6/tests/kodit/infrastructure}/snippets/typescript.tsx +0 -0
- {kodit-0.2.4/tests/kodit → kodit-0.2.6/tests/kodit/infrastructure}/source/__init__.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/tests/kodit/log_test.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/tests/performance/similarity.py +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/tests/smoke.sh +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/tests/vectorchord-smoke.sh +0 -0
- {kodit-0.2.4 → kodit-0.2.6}/uv.lock +0 -0
|
@@ -13,7 +13,7 @@ script_location = src/kodit/migrations
|
|
|
13
13
|
|
|
14
14
|
# sys.path path, will be prepended to sys.path if present.
|
|
15
15
|
# defaults to the current working directory.
|
|
16
|
-
prepend_sys_path =
|
|
16
|
+
prepend_sys_path = src
|
|
17
17
|
|
|
18
18
|
# timezone to use when rendering the date within the migration file
|
|
19
19
|
# as well as the filename.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Deployment
|
|
3
3
|
description: Deploying Kodit with Docker Compose and Kubernetes.
|
|
4
|
-
weight:
|
|
4
|
+
weight: 20
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
Kodit is packaged as a Docker container so you can run it on any popular orchestration platform. This page describes how to deploy Kodit as a service.
|
|
@@ -32,4 +32,3 @@ Deploy with `kubectl -n kodit apply -f kubernetes.yaml`
|
|
|
32
32
|
|
|
33
33
|
1. `kind create cluster`
|
|
34
34
|
2. `kubectl -n kodit apply -f kubernetes.yaml`
|
|
35
|
-
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Indexing
|
|
3
|
+
description: Learn how to index code sources in Kodit for AI-powered code search and generation.
|
|
4
|
+
weight: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Kodit's indexing system allows you to create searchable indexes of your codebases, enabling AI assistants to find and reference relevant code snippets. This page explains how indexing works, what sources are supported, and how to use the indexing features.
|
|
8
|
+
|
|
9
|
+
## How Indexing Works
|
|
10
|
+
|
|
11
|
+
Kodit's indexing process consists of several stages:
|
|
12
|
+
|
|
13
|
+
1. **Source Creation**: Kodit clones or copies your source code to a local working directory
|
|
14
|
+
2. **File Processing**: Files are scanned and metadata is extracted (timestamps, authors, etc.)
|
|
15
|
+
3. **Snippet Extraction**: Code is parsed using tree-sitter to extract meaningful snippets (functions, classes, methods)
|
|
16
|
+
4. **Index Building**: Multiple search indexes are created:
|
|
17
|
+
- **BM25 Index**: For keyword-based search
|
|
18
|
+
- **Semantic Code Index**: For code similarity search using embeddings
|
|
19
|
+
5. **Enrichment**: AI-powered enrichment of snippets for better search results
|
|
20
|
+
- **Semantic Text Index**: For natural language search using embeddings
|
|
21
|
+
|
|
22
|
+
### Supported Source Types
|
|
23
|
+
|
|
24
|
+
Kodit supports two main types of sources:
|
|
25
|
+
|
|
26
|
+
#### Git Repositories
|
|
27
|
+
|
|
28
|
+
Kodit can index any Git repository accessible via standard Git protocols:
|
|
29
|
+
|
|
30
|
+
- **HTTPS**: Public repositories and private repositories with authentication
|
|
31
|
+
- **SSH**: Using SSH keys for authentication
|
|
32
|
+
- **Git Protocol**: For public repositories
|
|
33
|
+
|
|
34
|
+
#### Local Directories
|
|
35
|
+
|
|
36
|
+
Kodit can index local directories on your filesystem:
|
|
37
|
+
|
|
38
|
+
- **Absolute paths**: `/path/to/your/code`
|
|
39
|
+
- **Relative paths**: `./my-project`
|
|
40
|
+
- **Home directory expansion**: `~/projects/my-app`
|
|
41
|
+
- **File URIs**: `file:///path/to/your/code`
|
|
42
|
+
|
|
43
|
+
## Basic Usage
|
|
44
|
+
|
|
45
|
+
### Indexing a Source
|
|
46
|
+
|
|
47
|
+
To index a source, use the `kodit index` command followed by the source location:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
# Index a local directory
|
|
51
|
+
kodit index /path/to/your/code
|
|
52
|
+
|
|
53
|
+
# Index a public Git repository
|
|
54
|
+
kodit index https://github.com/pydantic/pydantic
|
|
55
|
+
|
|
56
|
+
# Index a private Git repository (requires authentication)
|
|
57
|
+
kodit index https://github.com/username/private-repo
|
|
58
|
+
|
|
59
|
+
# Index using SSH
|
|
60
|
+
kodit index git@github.com:username/repo.git
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Listing Indexes
|
|
64
|
+
|
|
65
|
+
To see all your indexed sources:
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
kodit index
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
This will display a table showing:
|
|
72
|
+
|
|
73
|
+
- Index ID
|
|
74
|
+
- Creation and update timestamps
|
|
75
|
+
- Source URI
|
|
76
|
+
- Number of snippets extracted
|
|
77
|
+
|
|
78
|
+
## Git Protocol Support
|
|
79
|
+
|
|
80
|
+
### HTTPS Authentication
|
|
81
|
+
|
|
82
|
+
For private repositories, you can authenticate using:
|
|
83
|
+
|
|
84
|
+
1. **Personal Access Token** (GitHub, GitLab, etc.):
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
kodit index https://username:token@github.com/username/repo.git
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
2. **Username/Password** (if supported by your Git provider):
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
kodit index https://username:password@github.com/username/repo.git
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### SSH Authentication
|
|
97
|
+
|
|
98
|
+
For SSH-based repositories:
|
|
99
|
+
|
|
100
|
+
1. **SSH Key Authentication**:
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
kodit index git@github.com:username/repo.git
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Ensure your SSH key is properly configured in your SSH agent or `~/.ssh/config`.
|
|
107
|
+
|
|
108
|
+
2. **SSH with Custom Port**:
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
kodit index ssh://git@github.com:2222/username/repo.git
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Git Providers
|
|
115
|
+
|
|
116
|
+
Kodit works with any Git provider that supports standard Git protocols:
|
|
117
|
+
|
|
118
|
+
- **GitHub**: `https://github.com/username/repo.git`
|
|
119
|
+
- **GitLab**: `https://gitlab.com/username/repo.git`
|
|
120
|
+
- **Bitbucket**: `https://bitbucket.org/username/repo.git`
|
|
121
|
+
- **Azure DevOps**: `https://dev.azure.com/organization/project/_git/repo`
|
|
122
|
+
- **Self-hosted Git servers**: Any Git server supporting HTTP/HTTPS or SSH
|
|
123
|
+
|
|
124
|
+
## Examples of Use
|
|
125
|
+
|
|
126
|
+
### Index a Public Azure DevOps Repository
|
|
127
|
+
|
|
128
|
+
```sh
|
|
129
|
+
kodit index https://winderai@dev.azure.com/winderai/public-test/_git/simple-ddd-brewing-demo
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Indexing a Private Azure DevOps Repository
|
|
133
|
+
|
|
134
|
+
If you're accessing Azure DevOps from your local machine and have the Git credential
|
|
135
|
+
helper you should be able to clone the repository as usual (obviously you won't be able
|
|
136
|
+
to clone this because it is private):
|
|
137
|
+
|
|
138
|
+
```sh
|
|
139
|
+
kodit index https://winderai@dev.azure.com/winderai/private-test/_git/private-test
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
You can also use a Personal Access Token (PAT):
|
|
143
|
+
|
|
144
|
+
```sh
|
|
145
|
+
kodit index https://phil:xxxxxxSECRET_PATxxxxxxx@dev.azure.com/winderai/private-test/_git/private-test
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## File Processing and Filtering
|
|
149
|
+
|
|
150
|
+
### Ignored Files
|
|
151
|
+
|
|
152
|
+
Kodit respects [standard ignore patterns](#ignore-patterns):
|
|
153
|
+
|
|
154
|
+
- **`.gitignore`**: Standard Git ignore patterns
|
|
155
|
+
- **`.noindex`**: Custom ignore patterns for Kodit (uses gitignore syntax)
|
|
156
|
+
|
|
157
|
+
### Supported File Types
|
|
158
|
+
|
|
159
|
+
Kodit automatically detects and processes files based on their extensions:
|
|
160
|
+
|
|
161
|
+
| Language | Extensions |
|
|
162
|
+
|----------|------------|
|
|
163
|
+
| Python | `.py` |
|
|
164
|
+
| JavaScript | `.js`, `.jsx` |
|
|
165
|
+
| TypeScript | `.ts`, `.tsx` |
|
|
166
|
+
| Go | `.go` |
|
|
167
|
+
| C# | `.cs` |
|
|
168
|
+
|
|
169
|
+
### Snippet Extraction
|
|
170
|
+
|
|
171
|
+
Kodit uses tree-sitter to intelligently extract code snippets:
|
|
172
|
+
|
|
173
|
+
- **Functions and Methods**: Complete function definitions with their bodies
|
|
174
|
+
- **Classes**: Class definitions and their methods
|
|
175
|
+
- **Imports**: Import statements for context
|
|
176
|
+
- **Dependencies**: Ancestor classes and functions that the snippet depends on
|
|
177
|
+
|
|
178
|
+
## Configuration
|
|
179
|
+
|
|
180
|
+
### Clone Directory
|
|
181
|
+
|
|
182
|
+
By default, Kodit stores cloned repositories in `~/.kodit/clones/`. You can configure this using the `DATA_DIR` environment variable:
|
|
183
|
+
|
|
184
|
+
```sh
|
|
185
|
+
export DATA_DIR=/custom/path/to/kodit/data
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Database Configuration
|
|
189
|
+
|
|
190
|
+
Kodit uses SQLite by default, but supports PostgreSQL with VectorChord for better performance:
|
|
191
|
+
|
|
192
|
+
```sh
|
|
193
|
+
# SQLite (default)
|
|
194
|
+
DB_URL=sqlite+aiosqlite:///path/to/kodit.db
|
|
195
|
+
|
|
196
|
+
# PostgreSQL with VectorChord
|
|
197
|
+
DB_URL=postgresql+asyncpg://user:password@localhost:5432/kodit
|
|
198
|
+
DEFAULT_SEARCH_PROVIDER=vectorchord
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### AI Provider Configuration
|
|
202
|
+
|
|
203
|
+
For semantic search and enrichment, configure your AI provider:
|
|
204
|
+
|
|
205
|
+
```sh
|
|
206
|
+
# OpenAI
|
|
207
|
+
DEFAULT_ENDPOINT_TYPE=openai
|
|
208
|
+
DEFAULT_ENDPOINT_BASE_URL=https://api.openai.com/v1
|
|
209
|
+
DEFAULT_ENDPOINT_API_KEY=sk-your-api-key
|
|
210
|
+
|
|
211
|
+
# Or use local models (slower but private)
|
|
212
|
+
# No configuration needed - uses local models by default
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## Advanced Features
|
|
216
|
+
|
|
217
|
+
### Re-indexing Sources
|
|
218
|
+
|
|
219
|
+
Future feature!
|
|
220
|
+
|
|
221
|
+
### Progress Monitoring
|
|
222
|
+
|
|
223
|
+
Kodit shows progress during indexing operations:
|
|
224
|
+
|
|
225
|
+
- File processing progress
|
|
226
|
+
- Snippet extraction progress
|
|
227
|
+
- Index building progress (BM25, embeddings)
|
|
228
|
+
|
|
229
|
+
### Error Handling
|
|
230
|
+
|
|
231
|
+
Common issues and solutions:
|
|
232
|
+
|
|
233
|
+
1. **Authentication Errors**: Ensure your credentials are correct
|
|
234
|
+
2. **Network Issues**: Check your internet connection and firewall settings
|
|
235
|
+
3. **Permission Errors**: Ensure you have read access to the source
|
|
236
|
+
4. **Unsupported Files**: Kodit will skip unsupported file types automatically
|
|
237
|
+
|
|
238
|
+
## Privacy and Security
|
|
239
|
+
|
|
240
|
+
### Local Processing
|
|
241
|
+
|
|
242
|
+
- All code is processed locally by default
|
|
243
|
+
- No code is sent to external services unless you configure AI providers
|
|
244
|
+
- Cloned repositories are stored locally in your data directory
|
|
245
|
+
|
|
246
|
+
### Ignore Patterns
|
|
247
|
+
|
|
248
|
+
Kodit respects privacy by honoring:
|
|
249
|
+
|
|
250
|
+
- `.gitignore` patterns
|
|
251
|
+
- `.noindex` files for custom exclusions
|
|
252
|
+
- Hidden files and directories (starting with `.`)
|
|
253
|
+
|
|
254
|
+
### Authentication
|
|
255
|
+
|
|
256
|
+
- SSH keys and tokens are handled by your system's Git configuration
|
|
257
|
+
- Kodit doesn't store or transmit credentials
|
|
258
|
+
- Use environment variables for sensitive configuration
|
|
259
|
+
|
|
260
|
+
## Troubleshooting
|
|
261
|
+
|
|
262
|
+
### Common Issues
|
|
263
|
+
|
|
264
|
+
1. **"Failed to clone repository"**: Check your Git credentials and network connection
|
|
265
|
+
2. **"Unsupported source"**: Ensure the path or URL is valid and accessible
|
|
266
|
+
3. **"No snippets found"**: Check if the source contains supported file types
|
|
267
|
+
4. **"Permission denied"**: Ensure you have read access to the source
|
|
268
|
+
|
|
269
|
+
### Checking Index Status
|
|
270
|
+
|
|
271
|
+
To verify your indexes are working correctly:
|
|
272
|
+
|
|
273
|
+
```sh
|
|
274
|
+
# List all indexes
|
|
275
|
+
kodit index
|
|
276
|
+
|
|
277
|
+
# Test search functionality
|
|
278
|
+
kodit search text "example function"
|
|
279
|
+
```
|
|
@@ -117,6 +117,8 @@ ignore = [
|
|
|
117
117
|
"TRY003", # Long exception messages in custom exception classes
|
|
118
118
|
"S101", # Allow assert statements in test files
|
|
119
119
|
"PGH004", # If I've disabled all, I mean disable all
|
|
120
|
+
"EM101", # Annoying because an extra msg just for a raise adds unnecessary lines
|
|
121
|
+
"EM102", # As above
|
|
120
122
|
]
|
|
121
123
|
select = ["ALL"]
|
|
122
124
|
exclude = ["./tests/*"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Application layer for Kodit."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Application commands for Kodit."""
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""Application commands for snippet operations."""
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
from kodit.domain.enums import SnippetExtractionStrategy
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass
|
|
10
|
+
class ExtractSnippetsCommand:
|
|
11
|
+
"""Application command for extracting snippets from files."""
|
|
12
|
+
|
|
13
|
+
file_path: Path
|
|
14
|
+
strategy: SnippetExtractionStrategy = SnippetExtractionStrategy.METHOD_BASED
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@dataclass
|
|
18
|
+
class CreateIndexSnippetsCommand:
|
|
19
|
+
"""Application command for creating snippets for an entire index."""
|
|
20
|
+
|
|
21
|
+
index_id: int
|
|
22
|
+
strategy: SnippetExtractionStrategy = SnippetExtractionStrategy.METHOD_BASED
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Application services for Kodit."""
|