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

claude-files

v0.0.1

Published

CLI tool to prepare local files for Claude Projects by copying them to a single directory while respecting .gitignore rules

Readme

claude-files

npm version Downloads License PRs Welcome

A CLI tool to prepare your local files for Claude Projects by copying them to a single directory while respecting .gitignore rules.

Demo

https://github.com/user-attachments/assets/64e44490-7109-432f-9e87-cc1497dfefc9

Why?

Claude Projects currently only supports uploading individual files, not directories. This tool helps by:

  • Copying all your project files into a single .claude-files directory
  • Flattening the directory structure
  • Handling filename conflicts intelligently
  • Respecting .gitignore rules
  • Skipping unsupported file formats
  • Adding source comments to track file origins

Usage

Using npx (recommended)

You can use the tool directly with npx without installing it:

# Basic usage
npx claude-files [directory]

# Show help
npx claude-files --help

# Ignore specific files or patterns (can be used multiple times)
npx claude-files --ignore "*.test.ts" "docs/**"
# or use the short form
npx claude-files -i "*.test.ts" "docs/**"

# Dry run - show what would be copied without copying
npx claude-files --dry-run

# Verbose output
npx claude-files --verbose

# Skip adding source comments
npx claude-files --no-comments

# Show version
npx claude-files --version

Global Installation

Alternatively, you can install it globally:

npm install -g claude-files

Then use it anywhere:

claude-files
# or
claude-files ./path/to/project

Features

1. File Organization

  • Creates a .claude-files directory in your project
  • Copies all files while maintaining their readability
  • Adds source path comments at the top of each file
  • Flattens directory structure for easy upload

2. Smart File Naming

When duplicate filenames are found:

project/
  src/
    constants.ts
    utils/
      constants.ts

Becomes:

.claude-files/
  constants.ts        # from src/
  utils_constants.ts  # from src/utils/

3. Source Tracking

Each file gets a comment header showing its original location:

// Source: src/utils/helpers.js
function helper() {
  // ...
}

4. Flexible Ignore Rules

You can ignore files and directories in multiple ways:

  1. Using .gitignore (automatically respected)
  2. Using .claude-filesignore (project-specific ignore rules)
  3. Using command-line arguments with --ignore or -i

The ignore patterns follow the same syntax as .gitignore. For example:

# .claude-filesignore
*.test.ts
docs/**
temp/

5. Gitignore Integration

  • Automatically respects your existing .gitignore rules
  • Adds .claude-files/ to your .gitignore if it exists
  • Uses default ignore patterns for common files

6. File Format Filtering

Automatically skips unsupported file formats:

  • Images: .png, .jpg, .jpeg, .webp
  • Videos: .mp4
  • Icons: .ico
  • Vector graphics: .svg

7. Smart Comment Syntax

Adds source comments using the correct syntax for each file type:

# Source: src/script.py
<!-- Source: src/index.html -->
/* Source: src/styles.css */

Default Ignored Patterns

Besides your .gitignore rules, the following are ignored by default:

  • node_modules/
  • .git/
  • dist/
  • build/
  • coverage/
  • .env files
  • Log files
  • Lock files (package-lock.json, yarn.lock, etc.)
  • System files (.DS_Store, Thumbs.db)

License

MIT