Sign In

codefetch

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codefetch

Fetches all files in the current directory and outputs them in a Markdown file.

Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
762
-39.43%
Maintainers
1
Weekly downloads
 
Created
Source

codefetch

Codefetch Cover

Recursively fetches all code files in the current directory, ignoring what's in .gitignore and .boltfetchignore,
then outputs them into a single Markdown file with line numbers.

Usage

npx codefetch -o my-complete-source.md

If -o (or --output) is not provided, it will print to stdout.

Installation

You can run directly with npx:

npx codefetch

Or install globally:

npm install -g codefetch
codefetch -o output.md

Ignoring Files

codefetch supports two ways to ignore files:

  • .gitignore - Respects your project's existing .gitignore patterns
  • .codefetchignore - Additional patterns specific to codefetch

The .codefetchignore file works exactly like .gitignore and is useful when you want to ignore files that aren't in your .gitignore. For example:

# .codefetchignore
*.test.js
docs/
temp/
*.md

Both files support standard gitignore patterns including:

  • Exact matches (file.txt)
  • Directories (dir/)
  • Wildcards (*.log)
  • Negation (!important.log)

License

MIT

FAQs

Package last updated on 12 Jan 2025

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