Skip to main content

File Tree

MonoTerm includes a file tree that understands your project structure. It appears in the sidebar when you open the prompt box (@), or as a standalone tool via monotree.
┌──────────────────────────────────────────────────────────┐
│ FILES                       │                            │
│ │ src/                      │                            │
│ │ │ main.rs                 │   ┌─ Prompt ──────────┐    │
│ │ │ lib.rs                  │   │ check             │    │
│ │ │ config.rs               │   └──────────────────┘     │
│ │ .claude/                  │                            │
│ │ Cargo.toml                │                            │
│ │ README.md                 │                            │
│ Tab:files                   │                            │
└──────────────────────────────────────────────────────────┘

How it works

  1. Press @ to open the prompt box
  2. The sidebar switches to a searchable file tree
  3. Press Tab to switch focus between the prompt and the file tree
  4. Navigate files, press Enter to insert a path into your prompt
  5. Press Esc to close everything

Design

Files are displayed with a clean pipe-tree layout:
│ README.md              ← markdown files first
│ .claude/               ← dot folders (prioritized whitelist)
│ │ settings.json
│ src/                   ← regular folders
│ │ main.rs
│ │ lib.rs
│ Cargo.toml             ← regular files
│ empty-dir/ -           ← empty folders marked with -
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 file tree has focus, type to search instantly:
/ lib                        ← search bar
│ lib-monotree/              ← parent folder shown for context
│ │ src/
│ │ │ lib.rs                 ← matched file
│ lib-keybinding/
│ │ src/
│ │ │ lib.rs                 ← matched file
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.
┌───────────────────────────────────────────────┐
│  Key           │  Action                      │
├───────────────────────────────────────────────┤
│  j / k         │  Navigate up/down            │
│  Enter (file)  │  Insert path into prompt     │
│  Enter (folder)│  Expand or collapse          │
│  /             │  Start searching             │
│  Tab           │  Switch to prompt            │
│  Esc           │  Close everything            │
│  1-5           │  Expand folder to N levels   │
│  E             │  Expand folder fully         │
│  c             │  Collapse all                │
│  u             │  Go up to parent directory   │
│  b             │  Go back in history          │
└───────────────────────────────────────────────┘

Path History

Navigate between directories with history:
  • u or Backspace — go up to parent
  • b — go back to previous directory
  • The file tree remembers where you’ve been

Project Detection

When opened without a specific path, the file tree automatically finds your project root by scanning for .git, .claude, or similar marker directories.

Standalone: monotree

The same file tree engine runs as a standalone CLI tool:
monotree                    # current directory (auto-detect project root)
monotree /path/to/project   # specific path
monotree --help             # show all keys
Same keybindings, same search, same rendering — shared engine.