Skip to main content

File Tree

MonoTerm includes an embedded file tree for adding project paths to an @ prompt. The separate monotree package uses the same file-tree foundation as a standalone browser. They share rendering and indexing behavior, but their input modes are intentionally different.

How it works

  1. Press @ to open the prompt box
  2. The sidebar switches to a searchable file tree
  3. Press Tab to focus the tree; search mode starts immediately
  4. Type a query, use Up/Down, and press Enter to insert a file path
  5. Press Tab to return to the prompt, or Esc to close everything

Design

Files are displayed with a clean pipe-tree layout:
Sort order: markdown first, then dot folders (.claude, .git, etc.), then regular folders, then files. Within each group, sorted by name or modification time. Empty folders are marked with - suffix so you can tell at a glance which folders have content. When the embedded tree has focus, type to search instantly. The leading / in the rendered search bar is a visual marker; you do not press / to start searching.
Search is depth-progressive — it starts shallow and goes deeper only if no matches are found at lower depths. Parent folders of matched files are always shown for path context.

Embedded prompt-tree controls

Because this surface is already in search mode, j, k, /, and other printable keys become query characters. Use the arrow keys for navigation.

Standalone MonoTree controls

Standalone monotree starts in browse mode, so it exposes the broader tree navigation surface: Search mode exits with Esc; Backspace edits the query, and Ctrl+Backspace or Command+Backspace clears it.

Project Detection

When standalone MonoTree opens without a specific path, it automatically finds the project root by scanning for .git, .claude, or similar marker directories. Its history remembers re-rooted paths for b and Ctrl+F.

Standalone: monotree

The same file tree engine runs as a standalone CLI tool:
See the complete MonoTree reference for its context menu, sorting, expansion, history, non-interactive search, and mutation boundaries. The standalone browser and MonoTerm’s embedded prompt tree share an engine, but not the same CLI surface or initial input mode. MonoTree 0.1.5’s bundled --help omits search, docs, and test; the reference documents the actual parser rather than repeating that incomplete banner.