2.0.1 โ€ข Published 7 months ago

@maccalsa/summarize-project-md v2.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

๐Ÿ“ฆ summarize-project-md

๐Ÿงฉ Easily generate a clean, readable Markdown summary of your project's file structure and source code โ€” great for sharing context with teammates, code reviewers, or AI assistants.


โœจ Features

  • ๐Ÿ“ Renders a full tree-style folder structure
  • ๐Ÿ“„ Inlines small source files in syntax-highlighted Markdown code blocks
  • ๐Ÿšซ Skips large or excluded files but lists them clearly
  • โš™๏ธ Configurable via CLI flags (--include, --exclude, --ext, etc.)
  • ๐Ÿช„ Output ready to paste into ChatGPT, docs, or PRs
  • ๐Ÿ”„ Parallel file processing using worker threads
  • ๐ŸŽฏ Smart file size and extension filtering
  • ๐Ÿ“ Gitignore pattern support

๐Ÿš€ Quick Start

npx @maccalsa/summarize-project-md

This will create a project-summary.md file in the current directory with a smart default setup.


โš™๏ธ CLI Options

OptionDescriptionDefault
--includeComma-separated list of folders to include. (current directory)
--excludeComma-separated list of folders to excludenode_modules,.git,dist,build,.next
--extComma-separated list of file extensions to include.ts,.tsx,.js,.jsx,.svelte,.md,.json
--max-sizeMax file size (KB) to inline the contents of a file32
--outputOutput markdown file nameproject-summary.md

๐Ÿงช Example Usage

npx @maccalsa/summarize-project-md \
  --include src,app \
  --exclude node_modules,.git,dist \
  --ext .ts,.svelte,.md \
  --max-size 48 \
  --output summary.md

๐Ÿ“„ Output Example

# Project Summary

## Folder Structure

**src**
- app/
  - layout.ts
  - page.svelte
- lib/
  - utils.ts
  - constants.ts
- routes/
  - index.svelte (skipped)

## Included Files

### src/app/page.svelte

```svelte
<script>
  export let name = "SnipVault";
</script>

<h1>Hello {name}!</h1>

...

Excluded Files (by extension)

  • src/assets/logo.png
  • src/styles/global.css
---

## ๐Ÿ— Project Structure

src/ โ”œโ”€โ”€ cli/ # Command-line interface โ”œโ”€โ”€ config/ # Configuration management โ”œโ”€โ”€ utils/ # Utility functions โ”‚ โ”œโ”€โ”€ formatter.js # Markdown formatting โ”‚ โ”œโ”€โ”€ fileWorker.js # Parallel file processing โ”‚ โ””โ”€โ”€ gitignore.js # Gitignore pattern handling โ””โ”€โ”€ walker/ # Directory traversal

---

## ๐Ÿ›  Local Development

To develop locally:

```bash
git clone https://github.com/your-username/summarize-project-md.git
cd summarize-project-md
npm install
npm link
summarize-project --include src

To run tests:

npm test

๐Ÿ” Publishing as Public Scoped Package

If publishing under a scope like @maccalsa, make sure to run:

npm publish --access public

๐Ÿง  Why use this?

Perfect for:

  • Sharing context with AI tools (like ChatGPT)
  • Generating lightweight technical summaries
  • Documenting small or modular codebases
  • Writing clean project onboarding guides

Publishing

To publish a new version, get a token from npm and run:

export NPM_TOKEN=<your-token>
npm run publish

remember to bounce the version number in package.json

๐Ÿ“œ License

MIT ยฉ Stuart MacCallum

2.0.1

7 months ago

2.0.0

7 months ago

1.0.1

8 months ago

1.0.0

8 months ago