> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monolex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Terminal Path Open

> Open files and folders directly from terminal output with smart path resolution

# Terminal Path Open

Open any file or folder path that appears in your terminal with just a right-click. No more manual copy-paste or tedious folder navigation.

```
╔═════════════════════════════════════════════════════════════════════════════════════╗
║                                                                                     ║
║   See a file path in your terminal?                                                 ║
║   Select it, right-click, and open it instantly!                                    ║
║                                                                                     ║
╚═════════════════════════════════════════════════════════════════════════════════════╝
```

***

## The Problem

When working in the terminal, you constantly see file paths in output:

```
┌─────────────────────────────────────────────────────────────────┐
│  TYPICAL TERMINAL OUTPUT                                        │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  $ npm run build                                                │
│                                                                 │
│  Error in src/modules/terminal/config.ts                        │
│         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                        │
│         You want to open THIS file!                             │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘
```

**The old way was frustrating:**

```
Step 1: See the path in terminal
   ↓
Step 2: Manually copy the path
   ↓
Step 3: Switch to file explorer
   ↓
Step 4: Navigate to the folder
   ↓
Step 5: Find and open the file

⏱️ 30+ seconds of your time wasted
```

***

## The Solution

**With Path Open, you just:**

```
┌─────────────────────────────────────────────────────────────────┐
│  THE NEW WAY                                                    │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Step 1: Double-click to select the path                        │
│     ↓                                                           │
│  Step 2: Right-click → "Open File/Folder"                       │
│     ↓                                                           │
│  ✨ File opens instantly!                                       │
│                                                                 │
│  ⏱️ Total time: 2 seconds                                       │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘
```

***

## How to Use

### Step 1: Select the Path

Double-click on any word in the path, then drag to extend the selection:

```
┌─────────────────────────────────────────────────────────────────┐
│  HOW TO SELECT                                                  │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Error in src/modules/terminal/config.ts                        │
│                                                                 │
│  Double-click on "config" → selects "config"                    │
│  Then drag to extend → selects "src/modules/terminal/config.ts" │
│                                                                 │
│  Result: [src/modules/terminal/config.ts]                       │
│           ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲                       │
│                     SELECTED                                    │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘
```

### Step 2: Right-Click

After selecting, right-click to see the context menu:

```
┌─────────────────────────────────────────────────────────────────┐
│  CONTEXT MENU                                                   │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  ┌────────────────────────────────┐                             │
│  │ Send Selection to Prompt       │                             │
│  │ ───────────────────────────    │                             │
│  │ Copy Selection                 │                             │
│  │ Copy as One Line               │                             │
│  │ ───────────────────────────    │                             │
│  │ Open File/Folder               │  ← Click here               │
│  └────────────────────────────────┘                             │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘
```

### Step 3: Done!

The system automatically determines if it's a file or folder:

```
┌─────────────────────────────────────────────────────────────────┐
│  AUTOMATIC DETECTION                                            │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  "config.ts"           →  Opens as FILE (has extension)         │
│  "src/modules/"        →  Opens as FOLDER (ends with /)         │
│  "src/modules"         →  Opens as FOLDER (no extension)        │
│                                                                 │
│  Files open in editor, folders open in file tree sidebar        │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘
```

***

## Smart Path Resolution

The system can find files even with incomplete paths:

```
┌─────────────────────────────────────────────────────────────────┐
│  SMART SEARCH                                                   │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  You select: "config.ts" (just the filename)                    │
│                                                                 │
│  System searches:                                               │
│                                                                 │
│  1. Check if path exists directly                               │
│     ↓ Not found                                                 │
│  2. Search recent file activity (last 10 min)                   │
│     ↓ Found! /Users/.../monolex/src/config.ts                   │
│  3. Open the most recent match                                  │
│                                                                 │
│  ✓ File opens automatically!                                    │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘
```

### What Gets Searched

```
┌─────────────────────────────────────────────────────────────────┐
│  SEARCH STRATEGIES                                              │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  1. Direct existence check                                      │
│     → Path exists exactly as typed? Open it.                    │
│                                                                 │
│  2. Recent file activity                                        │
│     → Files you worked with in last 10 minutes                  │
│                                                                 │
│  3. Known project locations                                     │
│     → ~/Projects, ~/Developer, ~/workspace, ~/code              │
│                                                                 │
│  4. Fallback: Open folder part                                  │
│     → Strip filename, show folder in file tree                  │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘
```

***

## Supported Path Types

```
╔═════════════════════════════════════════════════════════════════╗
║  FILES                              FOLDERS                     ║
╠═════════════════════════════════════════════════════════════════╣
║                                                                 ║
║  /Users/you/Projects/app.ts         /Users/you/Projects/        ║
║  src/modules/config.json            src/modules/                ║
║  package.json                       architecture/rendering/     ║
║  README.md                          docs/                       ║
║                                                                 ║
║  Opens in: Editor/Viewer            Opens in: File Tree         ║
║                                                                 ║
╚═════════════════════════════════════════════════════════════════╝
```

***

## Troubleshooting

### Menu Option Not Appearing

The "Open File/Folder" option only appears when text is selected.

**Fix:** Select text first by double-clicking, then right-click.

### File Not Found

**Common causes:**

* File was deleted or moved
* Path has a typo
* Extra characters in selection

**Fix:** Select more of the path for uniqueness, or verify the file exists.

### Wrong File Opens

When multiple files share the same name, the most recently accessed one opens.

**Fix:** Select a longer, more specific path:

* ❌ `config.ts` (ambiguous)
* ✓ `project-A/src/config.ts` (specific)

### Folder Opens Instead of File

This happens when the exact file can't be found — the system opens the folder as a helpful fallback.

**Fix:** Browse the folder that opened to find your file.

***

## Quick Reference

```
╔═════════════════════════════════════════════════════════════════╗
║  QUICK REFERENCE                                                ║
╠═════════════════════════════════════════════════════════════════╣
║                                                                 ║
║  SELECT        →  Double-click or drag to highlight path        ║
║  RIGHT-CLICK   →  Opens the context menu                        ║
║  OPEN FILE/    →  Opens file in editor OR folder in tree        ║
║  FOLDER                                                         ║
║                                                                 ║
╠═════════════════════════════════════════════════════════════════╣
║  TIPS                                                           ║
║                                                                 ║
║  • Paths ending with "/" open as folders                        ║
║  • Paths with extensions open as files                          ║
║  • Partial paths are searched automatically                     ║
║  • Recently worked files are found faster                       ║
║                                                                 ║
╚═════════════════════════════════════════════════════════════════╝
```

***

## Before & After

```
┌───────────────────────────────┐     ┌───────────────────────────────┐
│         BEFORE                │     │         AFTER                 │
├───────────────────────────────┤     ├───────────────────────────────┤
│                               │     │                               │
│  1. Copy path manually        │     │  1. Select path               │
│  2. Open file browser         │     │  2. Right-click               │
│  3. Navigate folders          │  →  │  3. Click "Open File/Folder"  │
│  4. Find file                 │     │                               │
│  5. Double-click to open      │     │  Done!                        │
│                               │     │                               │
│  30+ seconds                  │     │  2 seconds                    │
│  Interrupts workflow          │     │  Stays in terminal            │
│                               │     │                               │
└───────────────────────────────┘     └───────────────────────────────┘
```
