@@ -401,7 +401,7 @@ def cli(
401401 DATA MANAGEMENT:
402402 • Git-aware: Tracks branches, commits, and file changes
403403 • Project isolation: Each project gets its own collection
404- • Storage: Vector data stored in ~/ .code-indexer/global/ qdrant/
404+ • Storage: Vector data stored in .code-indexer/qdrant/ (per-project)
405405 • Cleanup: Use 'clean-data' (fast) or 'uninstall' (complete removal)
406406
407407 \b
@@ -767,7 +767,7 @@ def start(
767767 • Qdrant: http://localhost:6333 (vector database, always started)
768768 • Ollama: http://localhost:11434 (local AI embeddings, only if provider=ollama)
769769 • Data Cleaner: Text processing service (always started)
770- • Data: ~/ .code-indexer/global/ ( persistent storage)
770+ • Data: .code-indexer/ (per-project persistent storage)
771771
772772 \b
773773 PERFORMANCE OPTIONS (Ollama Environment Variables):
@@ -883,7 +883,12 @@ def start(
883883 config_manager .save (config )
884884
885885 # Check Docker availability (auto-detect project name)
886- docker_manager = DockerManager (setup_console , force_docker = force_docker )
886+ project_config_dir = config_manager .config_path .parent
887+ docker_manager = DockerManager (
888+ setup_console ,
889+ force_docker = force_docker ,
890+ project_config_dir = project_config_dir ,
891+ )
887892
888893 # Ensure project has container names and ports configured
889894 project_root = config .codebase_dir
@@ -1187,7 +1192,7 @@ def index(
11871192
11881193 \b
11891194 STORAGE:
1190- Vector data stored in: ~/ .code-indexer/global/ qdrant/
1195+ Vector data stored in: .code-indexer/qdrant/ (per-project)
11911196 Each project gets its own collection for isolation.
11921197 """
11931198 config_manager = ctx .obj ["config_manager" ]
@@ -2719,7 +2724,10 @@ def _status_impl(ctx, force_docker: bool):
27192724 table .add_column ("Details" , style = "green" )
27202725
27212726 # Check Docker services (auto-detect project name)
2722- docker_manager = DockerManager (force_docker = force_docker )
2727+ project_config_dir = config_manager .config_path .parent
2728+ docker_manager = DockerManager (
2729+ force_docker = force_docker , project_config_dir = project_config_dir
2730+ )
27232731 try :
27242732 service_status = docker_manager .get_service_status ()
27252733 docker_status = (
@@ -3429,7 +3437,10 @@ def stop(ctx, force_docker: bool):
34293437 console .print (f"🏗️ Project directory: { config .codebase_dir } " )
34303438
34313439 # Initialize Docker manager
3432- docker_manager = DockerManager (console , force_docker = force_docker )
3440+ project_config_dir = config_path .parent
3441+ docker_manager = DockerManager (
3442+ console , force_docker = force_docker , project_config_dir = project_config_dir
3443+ )
34333444
34343445 # Check current status
34353446 status = docker_manager .get_service_status ()
@@ -3498,7 +3509,12 @@ def clean_data(ctx, all_projects: bool, force_docker: bool):
34983509 Perfect for test cleanup and project switching.
34993510 """
35003511 try :
3501- docker_manager = DockerManager (force_docker = force_docker )
3512+ # Use configuration from CLI context
3513+ config_manager = ctx .obj ["config_manager" ]
3514+ project_config_dir = config_manager .config_path .parent
3515+ docker_manager = DockerManager (
3516+ force_docker = force_docker , project_config_dir = project_config_dir
3517+ )
35023518
35033519 if not docker_manager .clean_data_only (all_projects = all_projects ):
35043520 sys .exit (1 )
@@ -3526,7 +3542,11 @@ def _perform_complete_system_wipe(force_docker: bool, console: Console):
35263542 # Step 1: Enhanced cleanup first
35273543 console .print ("\n 🔧 [bold]Step 1: Enhanced container cleanup[/bold]" )
35283544 try :
3529- docker_manager = DockerManager (force_docker = force_docker )
3545+ # System wipe operates on current working directory
3546+ project_config_dir = Path (".code-indexer" )
3547+ docker_manager = DockerManager (
3548+ force_docker = force_docker , project_config_dir = project_config_dir
3549+ )
35303550 if not docker_manager .cleanup (remove_data = True , verbose = True ):
35313551 console .print (
35323552 "⚠️ Enhanced cleanup had issues, continuing with wipe..." ,
@@ -3697,7 +3717,6 @@ def _wipe_storage_directories(console: Console):
36973717 directories = [
36983718 (Path .home () / ".qdrant_collections" , "Qdrant collections directory" ),
36993719 (Path .home () / ".code-indexer-data" , "Global data directory" ),
3700- (Path .home () / ".code-indexer-compose" , "Docker compose directory" ),
37013720 (Path .home () / ".ollama_storage" , "Ollama storage directory (if exists)" ),
37023721 ]
37033722
@@ -3810,25 +3829,25 @@ def _check_remaining_root_files(console: Console):
38103829)
38113830@click .pass_context
38123831def uninstall (ctx , force_docker : bool , wipe_all : bool ):
3813- """Completely remove all containers and data.
3832+ """Completely remove all containers and data for current project .
38143833
38153834 \b
38163835 STANDARD CLEANUP:
38173836 • Uses data-cleaner container to remove root-owned files
38183837 • Orchestrated shutdown: stops qdrant/ollama → cleans data → removes containers
3819- • Removes all .code-indexer directories and qdrant storage
3838+ • Removes current project's .code-indexer directory and qdrant storage
38203839 • Removes ollama model cache when applicable
3821- • Removes Docker volumes and networks
3840+ • Removes project-specific Docker volumes and networks
38223841 • Complete cleanup for fresh start with proper permission handling
38233842
38243843 \b
38253844 WITH --wipe-all (DANGEROUS):
38263845 • All standard cleanup operations above
38273846 • Removes ALL container images (including cached builds)
38283847 • Cleans container engine cache and build cache
3829- • Removes ~/.qdrant_collections directory
3830- • Removes ~/.code-indexer-data global directory
3831- • Removes ~/.code-indexer-compose directory
3848+ • Removes ~/.qdrant_collections directory (shared CoW collections)
3849+ • Removes ~/.code-indexer-data global directory (if exists)
3850+ • Removes any remaining global storage directories
38323851 • Performs aggressive system prune
38333852 • May require sudo for permission-protected files
38343853
@@ -3840,22 +3859,25 @@ def uninstall(ctx, force_docker: bool, wipe_all: bool):
38403859
38413860 \b
38423861 WARNING:
3843- Standard: Removes all containers and data, requires restart .
3862+ Standard: Removes containers and data for CURRENT PROJECT only .
38443863 --wipe-all: NUCLEAR OPTION - removes everything including
38453864 cached images, may affect other projects using same engine!
38463865
38473866 \b
38483867 USE CASES:
3849- • Standard: Normal uninstallation, switching providers
3868+ • Standard: Normal project uninstallation, switching providers
38503869 • --wipe-all: Test environment cleanup, fixing deep corruption,
3851- resolving persistent container/permission issues
3870+ resolving persistent container/permission issues across all projects
38523871 """
38533872 try :
38543873 if wipe_all :
38553874 _perform_complete_system_wipe (force_docker , console )
38563875 else :
3857- # Standard uninstall with orchestrated cleanup
3858- docker_manager = DockerManager (force_docker = force_docker )
3876+ # Standard uninstall with orchestrated cleanup - operates on current directory
3877+ project_config_dir = Path (".code-indexer" )
3878+ docker_manager = DockerManager (
3879+ force_docker = force_docker , project_config_dir = project_config_dir
3880+ )
38593881
38603882 # Use enhanced cleanup to remove root-owned files before stopping containers
38613883 if not docker_manager .cleanup (remove_data = True , verbose = True ):
@@ -3920,9 +3942,9 @@ def fix_config(ctx, dry_run: bool, verbose: bool, force: bool):
39203942 • When metadata contains test data
39213943 """
39223944 try :
3923- # Find configuration directory
3924- config_manager = ConfigManager . create_with_backtrack ()
3925- if not config_manager :
3945+ # Use configuration from CLI context
3946+ config_manager = ctx . obj [ "config_manager" ]
3947+ if not config_manager or not config_manager . config_path . exists () :
39263948 console .print (
39273949 "❌ No configuration found. Run 'code-indexer init' first." , style = "red"
39283950 )
@@ -4044,7 +4066,11 @@ def clean_legacy(ctx, force_docker: bool, yes: bool):
40444066
40454067 # Step 1: Stop containers
40464068 console .print ("\n 🛑 Stopping containers..." , style = "blue" )
4047- docker_manager = DockerManager (force_docker = force_docker )
4069+ # Migration operates on current directory
4070+ project_config_dir = Path (".code-indexer" )
4071+ docker_manager = DockerManager (
4072+ force_docker = force_docker , project_config_dir = project_config_dir
4073+ )
40484074 docker_manager .stop_services ()
40494075 console .print ("✅ Containers stopped" , style = "green" )
40504076
0 commit comments