Metadata-Version: 2.4
Name: vtree-tree
Version: 2.2.1
Summary: A modern, interactive terminal-based file tree viewer with file panel support
Author: vtree contributors
License: MIT
Project-URL: Homepage, https://github.com/your-username/vtree
Project-URL: Repository, https://github.com/your-username/vtree
Project-URL: Issues, https://github.com/your-username/vtree/issues
Keywords: terminal,file-tree,tui,file-browser,directory-viewer
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Filesystems
Classifier: Topic :: Terminals
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: textual>=0.40.0
Requires-Dist: rich>=13.0.0
Requires-Dist: click>=8.0.0
Dynamic: license-file

# vtree-tree

A modern, interactive terminal-based file tree viewer with file panel support.

[![PyPI version](https://badge.fury.io/py/vtree-tree.svg)](https://badge.fury.io/py/vtree-tree)
[![Python](https://img.shields.io/pypi/pyversions/vtree-tree.svg)](https://pypi.org/project/vtree-tree/)

## Features

- 🌳 **Interactive file tree** - Navigate with mouse and keyboard
- 📁 **Dual view modes** - Toggle between inline files and separate file panel
- 📋 **Clipboard integration** - Copy paths with a single keystroke
- 🎨 **Modern terminal theme** - Clean, professional dark interface
- 👁️ **Hidden file toggle** - Show/hide dotfiles and system files
- 📊 **File details** - View sizes, modification dates, and file information
- ⚡ **Smart filtering** - Automatically ignores common development artifacts
- 🖱️ **Mouse support** - Full mouse navigation and selection
- ✏️ **Built-in editor** - Edit files directly with vim-like interface
- 🔒 **Safe editing** - Read-only mode with insert mode protection

## Installation

```bash
pip install vtree-tree
```

## Usage

```bash
# View current directory
vtree

# View specific directory
vtree /path/to/directory

# Get help
vtree --help
```

## Keyboard Shortcuts

| Key | Action |
|-----|--------|
| `q` / `Ctrl+C` | Quit |
| `r` | Refresh tree |
| `f` | Toggle hidden files |
| `p` | Toggle file panel mode |
| `c` | Copy current path to clipboard |
| `d` | Delete selected files/folders |
| `e` | Edit selected file |
| `h` / `?` | Toggle help panel |
| `↑↓←→` | Navigate tree |

## View Modes

### Inline Mode (Default)
Files and directories are shown together in a traditional tree structure.

### Panel Mode
Press `p` to toggle panel mode where:
- Left panel shows only directories
- Right panel shows files in the selected directory with details (size, date)
- Perfect for browsing large directories

## Copy to Clipboard

Press `c` to copy the current path to your clipboard:
- **On a folder**: Copies the folder path
- **On a file**: Copies the parent directory path

Great for quickly navigating in terminal sessions:
```bash
vtree
# Press 'c' on desired folder
cd # Paste path here
```

## File Editing

vtree includes a built-in text editor with vim-like workflow:

### Opening Files
Press `e` on any file to open it in **read-only mode**:
- View file contents without risk of accidental changes
- Navigate through the file with arrow keys

### Editing Mode
Once in the file viewer, press `i` to enter **insert mode**:
- Now you can edit the file content
- The title bar shows "Insert Mode" to indicate editing is active
- Press `Ctrl+S` to save your changes

### Safety Features
- **Read-only by default**: Files open in view-only mode
- **Unsaved changes warning**: If you try to close with unsaved changes, you'll get a confirmation dialog:
  - `Y`: Save and close
  - `N`: Close without saving
  - `Esc`: Cancel and return to editing

### Editor Controls
| Key | Action |
|-----|--------|
| `e` | Open file in read-only mode |
| `i` | Enter insert/edit mode (when viewing) |
| `Ctrl+S` | Save file (when editing) |
| `Esc` | Close editor |

## Requirements

- Python 3.8+
- Works on macOS, Linux, and Windows
- Terminal with color support

## Dependencies

- `textual` - Modern TUI framework
- `rich` - Terminal formatting and colors
- `click` - Command-line interface

## License

MIT License - see LICENSE file for details.

## Contributing

Contributions welcome! Please feel free to submit a Pull Request.
