print-all-code
v1.0.1
Published
[English](./README.md) | [中文](./README-zh-CN.md)
Downloads
6
Readme
🖨️print-all-code
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
.gitignorefile. - 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 isprint-all-code.md.
Examples
By default, the program will scan the
./srcfolder and output the results toprint-all-code.md:pnpx print-all-codeSpecify a different source folder and output file:
pnpx print-all-code -s ./my-code -o ./output.mdSpecify multiple source folders at once:
pnpx print-all-code -s ./src -s ./lib -o ./all-code.md
License
MIT
