npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

projmap

v1.0.1

Published

Fast, configurable project structure documentation generator

Readme

projmap

A fast, configurable project structure documentation generator. Instantly create markdown maps of your project's file structure with optional content inclusion. Easily copy to clipboard or save to a file with markdown formatting intended to easily be injected into LLM context. Easily grab project structure from subdirectories and optionally include file contents for providing quick project awareness to LLMs prompts.

Features

  • 🚀 Fast & Lightweight: Quickly generates project structure documentation
  • 🎯 Smart Defaults: Automatically uses .gitignore patterns if available
  • ⚙️ Highly Configurable: Customize ignored patterns and included file types per project
  • 📋 Clipboard Support: Option to copy output directly to clipboard
  • 📁 Directory Aware: Remembers project root when run from subdirectories
  • 📝 Content Inclusion: Optional inclusion of file contents in the output
  • 🔄 Automatic Output: Configurable output location with smart defaults

Installation

# Using npm
npm install -g projmap

# Using yarn
yarn global add projmap

# Using pnpm
pnpm add -g projmap

Quick Start

# Initialize in your project
cd your-project
projmap --init

# Generate project structure
projmap

# Include file contents
projmap --content

# Map specific directory
projmap src

# Copy to clipboard instead of file
projmap --clipboard

Usage

Basic Commands

# Generate project structure
projmap

# Map specific directory
projmap src/components

# Include file contents
projmap --content

# Copy to clipboard
projmap --clipboard

# Specify custom output location
projmap --output docs/structure.md

Configuration

# Initialize project with all configuration options
projmap --init --config-ignored --config-extensions

# Update default settings for new projects
projmap --set-defaults

Project Configuration

When you run projmap --init, you'll be prompted to:

  1. Confirm project root directory
  2. Set default output location
  3. Configure ignored patterns (optional with --config-ignored)
  4. Configure included file extensions (optional with --config-extensions)

Your configuration is stored per-project and will be remembered for future runs.

Output Location

By default, project maps are saved to:

  • If configured during init: Your specified location
  • Default fallback: PROJECT_STRUCTURE.md in project root

Use --output to specify a different location for a single run:

projmap --output custom/location/structure.md

Using with Git

projmap automatically detects and uses your project's .gitignore patterns if available. If no .gitignore is found, it will use sensible defaults and notify you.

File Type Configuration

By default, projmap includes common development files (.ts, .js, .json, etc.). Configure included extensions during initialization:

projmap --init --config-extensions

Ignored Patterns

Configure which files/directories to ignore:

projmap --init --config-ignored

Configuration Storage

Project configurations are stored centrally at:

  • Windows: %APPDATA%/projmap-nodejs/config.json
  • macOS: ~/Library/Preferences/projmap-nodejs/config.json
  • Linux: ~/.config/projmap-nodejs/config.json

Examples

Basic Project Structure

projmap

Generates:

└─ 📁 src
   ├─ 📄 index.ts
   ├─ 📁 components
   │  ├─ 📄 Button.tsx
   │  └─ 📄 Card.tsx
   └─ 📁 utils
      └─ 📄 helpers.ts

With File Contents

projmap --content

Includes file contents after the structure map.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT