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)

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "projectmap"
version = "0.1.0"
description = "A modern tool for visualizing project structures in the terminal"
readme = "README.md"
authors = [{ name = "Your Name", email = "your.email@example.com" }]
license = { file = "LICENSE" }
classifiers = [
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python",
    "Programming Language :: Python :: 3",
]
keywords = ["project", "structure", "visualization", "tree", "map"]
dependencies = [
    "pathlib",
]
requires-python = ">=3.7"

[project.optional-dependencies]
dev = ["pytest"]

[project.urls]
Homepage = "https://github.com/username/projectmap"

[project.scripts]
projectmap = "projectmap.visualizer:main"

Roadmap

Version 0.2.0

  • Color output support
  • Export to JSON/YAML
  • Custom depth limits

Version 0.3.0

  • File size information
  • Directory statistics
  • Pattern-based filtering

Version 0.4.0

  • 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.

Support

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.0.tar.gz (9.0 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.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: projectmap-0.1.0.tar.gz
  • Upload date:
  • Size: 9.0 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.0.tar.gz
Algorithm Hash digest
SHA256 27937520b2e679d359bba41781fbce2b0c510282efcf8cb4002496fd4ef0bfd2
MD5 29c1c9a7af81f65c773141fae48acbb8
BLAKE2b-256 45ca5a0b5ea4802a6df5adf7fd7d3cf6953851afe5174297891ba6f635f6194b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: projectmap-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7886a19f083143f8a44c79744871b07a01224a5bde44fd199c910c473381cfa6
MD5 3da4ed19bd17780e10dc3f16496a61b1
BLAKE2b-256 08f6b6ef1a673c92ca6908334ab440d4496a0bb28e2ed4ef7aa15997182da0e3

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