Skip to content

Latest commit

 

History

History
87 lines (63 loc) · 2.91 KB

File metadata and controls

87 lines (63 loc) · 2.91 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

This is vtree-tree, a modern Python CLI application that provides a full-screen, interactive file tree viewer for the terminal. Built with Textual TUI framework and Rich for terminal formatting. Available on PyPI as vtree-tree (command is still vtree).

Installation and Running

# Install from PyPI
pip install vtree-tree

# Run with current directory
vtree

# Run with specific path
vtree /path/to/directory

# Development - run from source
python3 -m vtree.main [path]

Architecture

Package structure (vtree/) with these key components:

  • VTreeApp: Main Textual application class that orchestrates the UI
  • FileTree: Custom Tree widget that handles file system navigation and display
  • FileListPanel: DataTable showing files with size and date information
  • InfoPanel: Shows details about selected files/directories
  • HelpPanel: Displays keyboard shortcuts
  • FileNode: Data class for representing file system entries

Key Features:

  • Interactive tree navigation with mouse and keyboard
  • Clean interface without file type icons for better readability
  • Human-readable file sizes and modification dates
  • Hidden file toggle
  • File panel mode (shows files separately) vs inline mode
  • Copy path to clipboard functionality
  • Smart ignore patterns for common development artifacts
  • Real-time file system browsing with refresh capability
  • Modern terminal-style dark theme

Dependencies

The application requires these Python packages:

  • textual - Modern TUI framework
  • rich - Terminal text formatting
  • click - Command-line interface creation

Install with: pip install textual rich click

File Organization

Ignore Patterns: The application automatically hides common development artifacts:

  • .git, __pycache__, .pytest_cache, node_modules
  • .venv, venv, .DS_Store, .idea, .vscode
  • dist, build, .egg-info

Hidden Files: Files starting with . are hidden by default (toggle with f key), except for important ones like .gitignore, .env.example, .github

Development Notes

Current State: Early-stage project with minimal structure

  • No formal build system or dependency management
  • No testing framework configured
  • No linting/formatting tools setup
  • No version control initialized

Keyboard Shortcuts:

  • q / Ctrl+C - Quit
  • r - Refresh tree
  • f - Toggle hidden files
  • p - Toggle file panel mode
  • c - Copy current path to clipboard
  • h / ? - Toggle help panel
  • Arrow keys - Navigate tree
  • Mouse clicks - Select items

Code Style: Uses dataclasses, type hints, and follows Python naming conventions. Rich markup is used extensively for colored terminal output.

Design Principles

  • Make sure you keep the tree view and the File Panel view in sync featurewise, unless otherwise stated