Skip to main content

A modern tool for visualizing project structures in the terminal

Project description

ProjectMap

A modern Python tool for creating visual maps of project structures in the terminal.

Installation

pip install projectmap

Features

  • Interactive Project Mapping: Visualize your project's structure with clear, hierarchical representations
  • Smart Filtering: Built-in ignore patterns for common development artifacts
  • Flexible Configuration: Easily customize which files and directories to include or exclude
  • Clean Unicode Output: Beautiful terminal visualization using box-drawing characters
  • Python API & CLI: Use as a command-line tool or integrate into your Python applications
  • Intelligent Sorting: Organized display with directories first, followed by files

Quick Start

Command Line

# Map current directory
projectmap

# Map specific directory
projectmap --path /path/to/project

# Custom ignore patterns
projectmap --path . --ignore-dirs "logs" "temp" --ignore-files "*.tmp" "*.bak"

Python API

from projectmap import ProjectStructureVisualizer

# Basic usage
visualizer = ProjectStructureVisualizer()
visualizer.visualize('.')

# Custom configuration
visualizer = ProjectStructureVisualizer(
    ignore_dirs={'logs', 'temp'},
    ignore_files={'.env', '*.bak'}
)
visualizer.visualize('/path/to/project')

Example Output

Project Structure (/your/project):
──────────────────────────────
├── src
│   └── projectmap
│       ├── __init__.py
│       └── visualizer.py
├── tests
│   └── test_visualizer.py
├── docs
│   ├── api.md
│   └── usage.md
├── README.md
├── pyproject.toml
└── LICENSE
──────────────────────────────

Configuration

Default Ignored Patterns

Directories

DEFAULT_IGNORE_DIRS = {
    '__pycache__', 
    '.git', 
    '.idea', 
    'venv',
    '.venv',
    'env',
    'node_modules',
    '.pytest_cache',
    '.mypy_cache',
    '.ruff_cache',
    'build',
    'dist',
    'htmlcov',
    '.coverage',
    '.tox'
}

Files

DEFAULT_IGNORE_FILES = {
    '.gitignore', 
    '.env',
    '.env.local',
    '.env.development',
    '.env.production',
    '.DS_Store',
    '*.pyc',
    '*.pyo',
    '*.pyd',
    '.python-version',
    '*.so',
    '*.egg',
    '*.egg-info',
    '*.log',
    '.coverage',
    'coverage.xml',
    '.coverage.*'
}

Development Setup

# Clone repository
git clone https://github.com/yourusername/projectmap.git
cd projectmap

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install development version
pip install -e ".[dev]"

# Run tests
pytest

Project Structure

projectmap/
├── src/
│   └── projectmap/
│       ├── __init__.py
│       └── visualizer.py
├── tests/
│   └── test_visualizer.py
├── README.md
├── pyproject.toml
└── LICENSE

Package Configuration (pyproject.toml)

Roadmap

Version 0.2.0

  • Color output support

  • Export to JSON/YAML

  • Export to image (PNG, SVG)

  • Export to URL (HTML)

  • Custom depth limits

  • File size information

  • Directory statistics

  • Pattern-based filtering

  • Git integration

  • Multiple output formats

  • Interactive mode

Contributing

We welcome contributions! Here's how you can help:

  1. Check our issues page
  2. Fork the repository
  3. Create a feature branch
  4. Write your changes
  5. Submit a pull request

License

MIT License - feel free to use this project for your needs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

projectmap-0.1.2.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

projectmap-0.1.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file projectmap-0.1.2.tar.gz.

File metadata

  • Download URL: projectmap-0.1.2.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.7

File hashes

Hashes for projectmap-0.1.2.tar.gz
Algorithm Hash digest
SHA256 43b7360b8ec84d0a6cd25bc92b2ac230bba09d661b8b5fc0aa9a16fd944da541
MD5 f60e677b20e79cdad4749ae686429766
BLAKE2b-256 c716cbc7ff094e99b2331297c3aa61ebaaba0366e73c3d938c83f1b390c79a9d

See more details on using hashes here.

File details

Details for the file projectmap-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: projectmap-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.7

File hashes

Hashes for projectmap-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1ea34a10a0912ea263c47111cd89b8b622079f9ce3a2bdee840070ac1fd28e28
MD5 423b7b24dd747ba681e6ed513b1fec53
BLAKE2b-256 bbf684de51c1b1d65fbafe36b8f161f56d368c9b75d60f1d74572ae442712a52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page