File Explorer
VS Code-style file tree with git status, search, and file operations.
File Explorer
Mosaic includes a full-featured file explorer sidebar modeled after VS Code. It gives you a file tree with git status badges, content search, clipboard operations, and context menu actions -- all without leaving your terminal. Toggle it with Ctrl+B or the titlebar button. It is off by default.
File Tree
The file tree stays responsive even in large repositories by only loading visible content.
| Feature | Details |
|---|---|
| File icons | Automatic icon mapping by filename (same icons as VS Code) |
| Lazy loading | Only immediate children are fetched when you expand a folder |
| Auto-switch root | Follows the active workspace's or context's default CWD automatically |
| Dimmed ignored dirs | Ignored directories appear dimmed rather than fully hidden |
Ignored Directories
The following are filtered from the tree by default:
node_modules, .git, __pycache__, .DS_Store, .hg, .svn, .idea, .vscode, and hidden files (dotfiles).
Git Status Badges
Every file and folder in the tree displays a badge showing its git status at a glance:
| Badge | Meaning |
|---|---|
| M | Modified -- the file has uncommitted changes |
| A | Added -- a new file staged for commit |
| D | Deleted -- the file has been removed |
| ? | Untracked -- not yet tracked by git |
| S | Staged -- changes are staged and ready to commit |
Git submodules are fully supported and included in both the file tree and content search results.
Git Changes View
A dedicated section of the explorer shows all changed files with inline actions:
- Stage or unstage individual files with a single click
- Discard changes to revert a file to its last committed state
- Commit staged changes with a commit message
- Diff context for each changed file so you can review before committing
Tip: The git changes view updates in real time as you work. Stage files, review diffs, and commit without switching to a separate git tool.
Context Menu
Right-click any file or folder to access a full set of operations:
| Action | Description |
|---|---|
| New file / New folder | Create items inline at the selected location |
| Rename | Edit the name in place with the current name pre-selected |
| Delete | Remove files or folders (with confirmation) |
| Move | Relocate within the tree |
| Copy path | Copy the absolute file path to clipboard |
| Reveal in OS explorer | Open the containing folder in Windows Explorer or Finder |
| Git operations | Stage, unstage, or discard changes for the selected file |
| Snippets | Run a saved snippet targeting the selected file |
| Claude commands | Execute a Claude Code command on the file |
Inline Create and Rename
File and folder creation follows the VS Code placeholder pattern:
- Trigger New file or New folder from the context menu
- A placeholder node appears at the correct position in the tree
- Type the name and press Enter to confirm, or Escape to cancel
Rename works identically -- the existing name becomes editable in place, pre-selected for easy replacement.
Search in Files
Press Ctrl+Shift+F to open the content search panel.
- Fast, streaming results even in very large codebases
- Supports regex, case-sensitive, and whole-word search toggles
- Results appear as you type, grouped by file with match context
- Click any result to open the file at the matching line in the file viewer
- Git submodules are included in content search
Tip: Content search streams results incrementally. You can start browsing matches before the search finishes -- useful in large repositories where a full search might take a few seconds.
Clipboard Operations
Standard clipboard shortcuts work within the file tree:
| Shortcut | Action |
|---|---|
| Ctrl+C | Copy selected file(s) |
| Ctrl+X | Cut selected file(s) |
| Ctrl+V | Paste into the selected folder |
Cut files appear dimmed until the paste completes or is canceled.
Auto-Refresh
When files are created, modified, or deleted outside Mosaic -- by git, a build tool, or another editor -- the tree refreshes automatically.
Drag Files to Terminal
Drag any file from the explorer and drop it into a terminal pane to paste its absolute path. This is especially useful when working with coding agents -- drop a file into an active agent session to quickly reference it in your prompt without typing the path manually.
Resize
Drag the sidebar edge to resize. Your preference is persisted and restored across restarts.
Quick Reference
| Shortcut | Action |
|---|---|
| Ctrl+B | Toggle file explorer sidebar |
| Ctrl+Shift+F | Search in files |
| Ctrl+C / X / V | Copy / cut / paste files |
Related
- File Viewer and Editor -- open files from the explorer in the editor, markdown preview, or image viewer
- Sidebar System -- dock the explorer to any edge of the window
- Command Palette -- search for files by name with Ctrl+P