1.1.0 • Published 8 months ago

acfp v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

acfp: AI Chat File Packer

Packs your coding project structure and file contents into a single txt file to upload to AI chats like ChatGPT for better and more sensible assistance.

Usage

With npm installed, simply run the following command in your project's root directory (or any other folder you want to pack):

npx acfp

If you prefer, you can also install this package globally and then simply execute acfp.

Options

OptionDescription
-h,--helpShow this help
-s,--silentDo not log progress to the console
-ml,--multilineLog progress in the console as multiple lines (can be helpful for debugging)
-d,--dirSpecify the input directory (default: the current working directory)
-o,--outputSpecify the output file path and optionally name (default: combined_output.txt in the source directory)
-e,--extSpecify the file extensions that should be processed, without a leading dot, as a comma separated list. Files with a leading dot, like .htaccess, must be added with a leading dot. Set to empty to process all files not in the ignore list. (default: .htaccess, c, cpp, cs, css, h, htm, html, java, js, json, less, md, php, py, rb, sass, sh, sql, ts, txt, vue, xml, yaml, yml)
-ea,--ext-appendLike -e / --ext, but appends to the default list.
-id,--ignore-dirsSpecify the directories to ignore, relative to the source directory, as a comma separated list. (default: .git, bin, dist, lib/vendor, node_modules, svn, vendor)
-ida,--ignore-dirs-appendLike -id / --ignore-dirs, but appends to the default list.
-if,--ignore-filesSpecify the files to ignore, relative to the source directory, as a comma separated list. (default: package-lock.json)
-ifa,--ignore-files-appendLike -if / --ignore-files, but appends to the default list.
-ie,--ignore-extSpecify the file extensions to ignore, without a leading dot, as a comma separated list. Files with a leading dot, like .htpasswd, must be added with a leading dot. (default: .htpasswd, avi, avif, class, dll, eot, exe, flv, gif, jar, jpeg, jpg, log, m4a, m4v, mov, mp2, mp3, mp4, mpeg, mpg, ogg, otf, png, rlib, ttf, wav, woff, woff2, zip)
-iea,--ignore-ext-appendLike -ie / --ignore-ext, but appends to the default list.

Per-project configuration

You can store a project-based configuration that will be merged with the default config and can be overridden by command line option arguments. If your project has a package.json file, you can add a key "acfp" to its root, or put an acfp.config.json file into the project root directory.

The keys for the configuration must be the long argument names of the options without dashes. Boolean options (like silent or multiline) can be configured with boolean values, options expecting a list can either be arrays or strings with a comma separated list. Example:

{
    "multiline": true,
    "ext": [],
    "ignore-ext": ["md", "json"],
    "ignore-files-append": "LICENSE,README.md"
}

This would force multiline mode, set ext to an empty value (meaning that all files will be processed), set the ignored extensions to md and json, and append the LICENSE and README.md files to the list of ignored files.

1.1.0

8 months ago

1.0.0

8 months ago