codebase-memory-mcp icon indicating copy to clipboard operation
codebase-memory-mcp copied to clipboard

codebase-memory-mcp cli index_repository asking for path but path is specified (Windows)

Open NicoSteyl opened this issue 5 months ago • 9 comments

PS C:\Users\Nico> codebase-memory-mcp cli index_repository '{"D:\Projects\AI\UnifiedAirsim\repos\asvsim", "mode":"fast"}' level=info msg=mem.init budget_mb=31516 total_ram_mb=63032 repo_path is required

Steps to reproduce:

  1. Install on Windows using the powershell script
  2. git clone your repo to a folder
  3. run the cli index_repository command
  4. asks for repo path even though it was specified.

Also, the files in the webui have no names and cannot be traversed, the breadcrumbs also don't show any file names, just a bunch of slashes, dunno if it's related.

NicoSteyl avatar Jun 07 '26 18:06 NicoSteyl

either escape codebase-memory-mcp cli index_repository '{"path":"D:\\Projects\\AI\\UnifiedAirsim\\repos\\asvsim","mode":"fast"}'

or use forward slashes: codebase-memory-mcp cli index_repository '{"path":"D:/Projects/AI/UnifiedAirsim/repos/asvsim","mode":"fast"}'

cbhp avatar Jun 07 '26 19:06 cbhp

Hey, thanks for reporting. I think @cbhp already gave the solution. I have already for a long time on my plate to improve CLI handling, just had not the time for it. Will see if I can prioterize it up

DeusData avatar Jun 08 '26 12:06 DeusData

either escape codebase-memory-mcp cli index_repository '{"path":"D:\\Projects\\AI\\UnifiedAirsim\\repos\\asvsim","mode":"fast"}'

or use forward slashes: codebase-memory-mcp cli index_repository '{"path":"D:/Projects/AI/UnifiedAirsim/repos/asvsim","mode":"fast"}'

I am still facing the same issue actually
repo_path is required is being shown even after I pass the path correctly. I used npx btw

djmahe4 avatar Jun 08 '26 13:06 djmahe4

@djmahe4 ok will check

DeusData avatar Jun 08 '26 15:06 DeusData

Actually this works fine now
npx codebase-memory-mcp cli index_repository '{\"repo_path\": \"C:/Users/mahes/OneDrive/Desktop/Python-Projects/quant-blm\"}'
npx codebase-memory-mcp cli index_repository '{\"repo_path\": \"C:/Users/mahes/OneDrive/Desktop/Python-Projects/quant-blm\"}
Both works! (First one uses python package)
Appreciate your work buddy!

djmahe4 avatar Jun 13 '26 08:06 djmahe4

Issue fixed in 0.8.1.

NicoSteyl avatar Jun 15 '26 07:06 NicoSteyl

I have the following issue too

nwn900 avatar Jun 19 '26 15:06 nwn900

0.8.1 does not fix this issue. I’ve tried it myself. To avoid the “repo_path error”, it’s necessary to use the codebase-memory-mcp cli with the command: index_repository "{\"repo_path\": \"C:/Users/mahes/OneDrive/Desktop/Python-Projects/quant-blm\"}".

shikiiGithub avatar Jun 26 '26 02:06 shikiiGithub

Reopening: this is NOT fixed. The CLI still uses narrow int main(int argc, char **argv) (src/main.c:581) with no wmain/GetCommandLineW/CommandLineToArgvW, so non-ASCII repo paths passed as CLI args are still mangled on Windows. #639 added tests/windows/test_cli_non_ascii_arg.py as an opt-in known-red guard for exactly this — it'll flip green when the argv path is fixed (wmain + UTF-16→UTF-8, or CommandLineToArgvW). See also #20.

DeusData avatar Jul 04 '26 17:07 DeusData