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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@narduk/cursor-zipit

v1.0.1

Published

Create zip archives and text dumps of project code with smart exclusions for Cursor AI

Downloads

125

Readme

ZipIt

Create zip archives and text dumps of project code with smart exclusions. Perfect for sharing code with AI assistants like ChatGPT or Cursor.

Features

  • 🗜️ Zip Creation: Create compressed archives of your project code
  • 📄 Text Export: Generate a single text file with directory structure and all code
  • 🎯 Smart Exclusions: Automatically excludes node_modules, build artifacts, and more
  • 📋 Gitignore Support: Respects .gitignore patterns
  • 🎨 Cursor Integration: Automatically creates /zipit and /txtit commands in Cursor

Installation

npm install @narduk/cursor-zipit

Or globally:

npm install -g @narduk/cursor-zipit

Usage

CLI Commands

Create Zip Archive

npx @narduk/cursor-zipit zip

Creates project-code.zip in the current directory.

Create Text File

npx @narduk/cursor-zipit txt

Creates project-code.txt in the current directory with directory structure and all code files.

Command Options

Both commands support the following options:

  • -o, --output <path>: Specify output file path
  • -r, --root <dir>: Specify root directory (default: current directory)
  • -e, --exclude <pattern>: Additional exclusion patterns (can be used multiple times)
  • -i, --include <pattern>: Additional inclusion patterns (can be used multiple times)

Examples

# Create zip with custom output
npx @narduk/cursor-zipit zip -o my-project.zip

# Create text file with custom output
npx @narduk/cursor-zipit txt -o my-project.txt

# Exclude additional patterns
npx @narduk/cursor-zipit zip -e "*.log" -e "*.tmp"

# Include specific files
npx @narduk/cursor-zipit zip -i "*.config.js" -i "*.config.ts"

Cursor Integration

When you install zipit, it automatically creates Cursor command files in .cursor/commands/:

  • /zipit - Creates a zip archive
  • /txtit - Creates a text file

Simply type /zipit or /txtit in Cursor's command palette to use them!

What Gets Excluded

By default, ZipIt excludes:

  • Dependencies: node_modules, venv, .venv
  • Build Artifacts: dist, build, .next, .nuxt, out, target
  • Cache: __pycache__, .cache, .parcel-cache, .turbo
  • Environment: .env, .env.local
  • IDE: .idea, .vscode, .cursor
  • Version Control: .git
  • Compiled Files: *.pyc, *.class, *.o
  • Logs: *.log
  • And more: Plus anything in your .gitignore files

Text File Format

The text file output includes:

  1. Header: Generation timestamp and root directory
  2. Directory Tree: Visual tree structure of the project
  3. File Contents: Each code file with:
    • File path
    • Language/type
    • File size
    • Line count
    • Full file contents
  4. Summary: Total files and size statistics

Example:

PROJECT CODE EXPORT
================================================================================
Generated: 2024-01-15T10:30:00.000Z
Root Directory: /path/to/project
================================================================================

DIRECTORY STRUCTURE
================================================================================
├── src
│   ├── index.ts
│   └── utils.ts
└── package.json
================================================================================

================================================================================
FILE 1 of 3
================================================================================
Path: src/index.ts
Language: TypeScript
Size: 1.2 KB (1234 bytes)
Lines: 45
================================================================================

[file contents here...]

API Usage

You can also use ZipIt programmatically:

import { createZip, createTxt } from '@narduk/cursor-zipit';

// Create zip
await createZip({
  outputPath: './output.zip',
  rootDir: './src',
  customExcludes: ['*.test.ts'],
  customIncludes: ['*.config.*'],
});

// Create text file
await createTxt({
  outputPath: './output.txt',
  rootDir: './src',
  customExcludes: ['*.test.ts'],
});

Development

# Install dependencies
npm install

# Build
npm run build

# Test
npm test

License

MIT

Contributing

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