πŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more β†’
Socket
Sign inDemoInstall
Socket

projectmap

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

projectmap

A modern tool for visualizing project structures in the terminal

0.1.2
PyPI
Maintainers
1

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:

  • Check our issues page
  • Fork the repository
  • Create a feature branch
  • Write your changes
  • Submit a pull request

License

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

Keywords

map

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts