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

Uploaded Python 3

File details

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

File metadata

  • Download URL: projectmap-0.1.1.tar.gz
  • Upload date:
  • Size: 9.1 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.1.tar.gz
Algorithm Hash digest
SHA256 ab3f819205bd12b0988ddcdedd291e675f337dd7e4cc5e3f03bb34524eb2575c
MD5 3b2f8f3cbab8b5ceca2faf6ac1ad8793
BLAKE2b-256 afdfc5c0b7d056857c2b7349c507ef48301a307a6271b0071923ccefa4e54487

See more details on using hashes here.

File details

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

File metadata

  • Download URL: projectmap-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a1fb64d1ea5f10715bc2716c3a8130efc96cc967f507fc3a44eaed0b7d4c99d
MD5 8cb829935c2a5bd534286faeb0d8692a
BLAKE2b-256 231264678796bc29ce76d4e36efc8e9daba602dfd396ae1c4bb36d9e1886e833

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