Repository navigation
Windows MCP and CLI
How the command line tool and the MCP screenshot work on Windows. The rest of Windows support is on Windows Support, and the MCP server itself on How MCP and CLI Work.
A Windows GUI program has no console: nibtree cli would print nothing, and cmd and PowerShell would not wait for it or see its exit code. So the tool is its own crate, src-tauri/cli (nibtree-cli), in a Cargo workspace with the app. The app uses it as a library (mcp::cli), so nothing changes on macOS. Its src/main.rs builds nibtree-cli.exe, a console program: nibtree-cli cli <command> runs the tool, and anything else (a folder, nothing) starts the app next to it, which hands a folder to the copy already running.
The crate holds what the tool and the app share: the config folder (home), the mcp.json format (server_file), the client header and the protocol version (a test in the app checks it). It has no build script, which matters: tauri-build copies a bundled program while the app compiles, so the program must exist before that.
build-windows in release.yml therefore builds nibtree-cli first, copies it to src-tauri/binaries/nibtree-cli-x86_64-pc-windows-msvc.exe and passes --config src-tauri/tauri.windows-release.conf.json, which lists it in bundle.externalBin. The installer puts it next to the app. Install command line tool then writes nibtree.cmd into %LOCALAPPDATA%\Microsoft\WindowsApps, which Windows puts on every user's PATH, and the .cmd runs the console program with all its arguments. It never touches a file that is not ours (SHIM_MARK). Settings names that folder from McpStatus.cliFolder, and its examples call nibtree-cli.exe (cliCommand) with PowerShell's &.
take_screenshot and nibtree cli screenshot use screencapture -l on macOS. On Windows, mcp/host.rs draws the window with PrintWindow and PW_RENDERFULLCONTENT, which includes the WebView2 content and works while other windows cover the app, then crops it to the frame DWM reports, without the invisible resize borders. png_encode.rs writes the PNG with flate2, so no image crate is added. A minimized window cannot be drawn and gets a clear error.
Windows PowerShell 5.1 splits an argument that holds both spaces and double quotes, so --args '{"message": "two words"}' reaches the tool broken. name=value arguments are safe, and --args-file <file> (or --args-file - for stdin) reads the JSON object without passing it through the command line at all: '{"limit": 5}' | nibtree cli call git_log --args-file -.
These pages are generated from docs/wiki. To correct something, open a pull request against the source file; edits made here are overwritten.
Using Nibtree
- Getting Started
- Welcome Screen
- Workspaces
- Files Panel
- File Operations
- File Icons
- Rounded Panels
- Editor and Tabs
- Pin Reorder and Wrap Tabs
- Single Tab Title
- Split Editor
- New File and Unsaved Changes
- Unload Hidden Tabs
- Editing Code
- Code Appearance
- Markdown Editor
- Image and PDF Preview
- Search Everywhere
- Recent Files
- Navigation Bar
- Find and Replace
- Changes and Commits
- Sign In Prompts
- Commit Box Layout
- Repository Actions
- Commit Options
- Ignoring Files
- Diffs
- Inline Diffs
- Staging View
- Revert a Change
- Resolving Conflicts
- Merge Tool
- Blame
- History and Log
- Merge Commits
- Branches and Tags
- Branches Popup
- Remotes
- Stashes
- Shelf
- Git Menu
- Git Dialogs
- Interactive Rebase
- Worktrees
- AI Agents
- AI Tasks
- AI Usage
- Keep Computer Awake
- Submodules
- Git LFS
- GitHub
- Git Console
- Terminal
- Terminal Features
- Scripts
- Navigation
- Menus
- Settings
- Settings Search
- Color Themes
- Settings Terminal and Automation
- Settings Files
- Updates
- Status Bar and Help
- Notifications
- Memory Use
- Clear Cache
- MCP and CLI
- Git Mergetool
- Keyboard Shortcuts
- Keyboard Shortcuts Editor
- Troubleshooting
- Troubleshooting Git
Developers
- Developer Guide
- Architecture
- Project Layout
- Backend
- How Folder Watching Works
- Folder Watching Bugs We Fixed
- How Workspace Files Work
- How the Preview Scheme Works
- Backend Services
- How Terminal Features Work
- Terminal Bugs We Fixed
- Frontend
- How the Rich Markdown Editor Works
- Rich Markdown Bugs We Fixed
- Git Menu Links
- Menu Keys and Routing
- Frontend Modules
- Blame Bugs We Fixed
- Project Color And Title Bar
- One Diff View
- Diff Bugs We Fixed
- Merge Tool Layouts
- Merge Tool Bugs We Fixed
- Color Theme Bugs We Fixed
- How the Connected Diff Works
- Rounded Panels Bugs We Fixed
- Update Bugs We Fixed
- Status Bar Bugs We Fixed
- MCP and CLI Bugs We Fixed
- Repository Actions Bugs We Fixed
- How the Changes Tab Works
- CodeMirror Patterns
- How the Cursor Works
- How Editor Features Work
- How the Path Bar Works
- Commands and Events
- Settings Reference
- Commands Workspace and Changes
- Commands Branches and Remotes
- Commands History and Extras
- Commands App and Tools
- Testing
- Test Suites
- Debugging
- Debugging with MCP
- Measuring Setting Memory
- How Terminal Memory Is Measured
- How Markdown Diagrams Work
- Releases and CI
- Publishing the Wiki
- Versioning and Changelog
- Browser Version Packages
- Browser Release Checks
- Docker Image
- Platforms and Signing
- Windows Support
- Windows Bugs We Fixed
- Windows MCP and CLI
- Docs and Screenshots
- UI Library
- UI Library MCP
- UI Library Bugs
- UI Library Migration
- Contributing
How features work
- Welcome screen
- Workspaces and folders
- Files panel
- File operations
- File icons
- Editor and tabs
- Pin, reorder and wrap tabs
- Single tab title
- Split editor
- New File and unsaved changes
- Unload hidden tabs
- Editing code
- Code appearance
- Markdown editor
- Image and PDF preview
- Search Everywhere
- Recent Files
- Navigation Bar
- Find and replace
- Changes and commits
- Sign-in prompts
- Commit box layout
- Repository actions
- Commit options
- Ignoring files
- Diffs
- Inline diffs
- Staging view
- Revert a change
- Resolving conflicts
- Merge tool
- Blame
- History and log
- Merge commits
- Commit tabs
- Branches and tags
- Branches popup
- Remotes
- Stashes
- Shelf
- Git menu
- Git dialogs
- Interactive rebase
- Worktrees
- AI agents
- AI usage
- Keep computer awake
- AI tasks
- Submodules
- Git LFS
- GitHub account
- Git Console
- Back and Forward
- Integrated terminal
- Scripts tool window
- Menu bar
- Settings
- Search in Settings
- Color themes
- Rounded panels
- Updates and release channels
- Status bar and help links
- Notifications
- Memory readout and memory log
- Clear Cache
- MCP server and command line tool
- git mergetool mode