Windows-ready deepagents-cli: native paths, globbing, and improved shell UX
Windows-Ready deepagents-cli: Native path/glob support, shell UX, and docs
Summary
- Adds first-class Windows support to
deepagents-cliwithout breaking macOS/Linux. - Enables reading/writing using Windows absolute paths and absolute glob patterns.
- Avoids Unix-only imports at startup; uses safe fallbacks on Windows.
- Polishes shell-mode UX and defaults to
notepadas editor on Windows. - Documents all changes with before/after diffs and upgrade guidance.
Key Changes
- Filesystem middleware accepts Windows drive-letter paths and normalizes separators.
- Filesystem backend expands absolute Windows glob patterns (e.g.,
C:\...\**\*.py). - Approval prompt imports
termios/ttylazily inside the function; Windows uses the fallback prompt. EDITORdefault set conditionally:notepadon Windows,nanoelsewhere.- UI help updated to “SHELL MODE” and cross‑platform examples (
!diron Windows,!lson macOS/Linux). - CLI prefers local
libs/deepagentsduring development so patched middleware is loaded.
Modified Files
libs/deepagents/deepagents/middleware/filesystem.pylibs/deepagents/deepagents/backends/filesystem.pylibs/deepagents-cli/deepagents_cli/execution.pylibs/deepagents-cli/deepagents_cli/input.pylibs/deepagents-cli/deepagents_cli/ui.pylibs/deepagents-cli/deepagents_cli/token_utils.pylibs/deepagents-cli/deepagents_cli/main.pylibs/deepagents-cli/README.mdlibs/deepagents-cli/windows_fixed.md(new, detailed change log)
Why It Matters
- Windows users get a seamless local CLI experience with correct path handling and shell execution.
- Maintainers have a clear record of code diffs and guidance for future upgrades.
- Remote sandbox integrations remain Linux-based and unchanged.
Verification
- Interactive CLI runs on Windows; file tools accept Windows paths and glob patterns.
- Shell-mode executes commands (
!dir,!type) and help text matches OS conventions. - Editor opens with
Ctrl+Eusingnotepadon Windows unlessEDITORis set.
Docs
windows_fixed.mdprovides before/after snippets for every change and upgrade notes:- If you update to an upstream
deepagents, ensure:_validate_pathaccepts drive-letter absolute paths and normalizes separators.glob_infosupports absolute Windows patterns viaglob.glob(..., recursive=True).
- If you update to an upstream
README.mdincludes a Windows Compatibility section summarizing the improvements.
Security
.envis ignored; do not commit secrets. EnsureOPENAI_API_KEYremains private.- Tavily Search is optional; set
TAVILY_API_KEYto enable web search.
Guys test it in windows and let me know
@kshadow07 this looks very AI generated and based on your comment you havent' tested this in windows.
Before we can merge this in or add the tests, we'd probably want to add test code with windows and be running that on CI
I've tried it.
If prompts related to the file system are not adjusted accordingly, issues may still arise. For example, if asked to list files in the current directory, it might directly use / to call the ls command.
For folks that want to use this in windows, you can get it working immediately via wsl https://learn.microsoft.com/en-us/windows/wsl/install -- it's a great tool on windows for coding in general!
For folks that want to use this in windows, you can get it working immediately via wsl https://learn.microsoft.com/en-us/windows/wsl/install -- it's a great tool on windows for coding in general!
I have WSL installed, but all my code is developed under Windows, and my files reside within the Windows file system. Consequently, accessing files on Windows from within WSL remains rather inconvenient. For me, native Windows support is still essential.