print-all-code
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

🖨️print-all-code

English | 中文

Introduction

print-all-code is a command-line tool designed to fully capture your source code into a single file. This file can then be used by AI models like ChatGPT for code writing assistance, enabling the AI to better understand, invoke, and modify your existing code.

Features

  • Recursively traverses specified source directories to collect all supported code files.
  • Ignores files and directories specified in the .gitignore file.
  • Formats the collected code for output in a specified Markdown file.

Usage

Run the following command in your terminal to use print-all-code: (If you use npm, you can use npx instead of pnpx)

pnpx print-all-code -s <source-directory-path> -o <output-file-path>

Parameters

  • -s, --src <paths...>: Source directory paths, can specify multiple paths, default is ./src.
  • -o, --output <path>: Output file path, default is print-all-code.md.

Examples

  1. By default, the program will scan the ./src folder and output the results to print-all-code.md:

    pnpx print-all-code
  2. Specify a different source folder and output file:

    pnpx print-all-code -s ./my-code -o ./output.md
  3. Specify multiple source folders at once:

    pnpx print-all-code -s ./src -s ./lib -o ./all-code.md

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i print-all-code

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

5.51 kB

Total Files

5

Last publish

Collaborators

  • magmablock