catco
v2.0.7
Published
Glob copy file contents to ya clipboard.
Downloads
83
Maintainers
Readme
catco
catco does two things.
- It creates a single string of text from the contents of all files that match a glob.
- It can take a file of combined file contents and scaffold directories/files from it.
Install
npm i -g catcoCopying files to your clipboard
You give catco a glob pattern, it reads every matching file, wraps each one in a little /* FILE: ./path/to/file */ comment, minifies the whole thing into a single string, and puts it in your clipboard.
catco "./src/**/*.ts"Multiple patterns work too. Just keep adding them.
catco "./src/**/*.ts" "./src/**/*.css"If you want to skip certain files, pass --ignore with a space-separated list of patterns.
catco "./src/**/*.ts" --ignore "**/*.test.ts **/*.spec.ts"Without --ignore, catco already skips the usual suspects — node_modules, dist, build, .git, .env, log files, and framework cache folders like .next, .vercel, and .turbo.
Parsing a string of combined files into files/directories.
catco parse ./output.txt ./my-projectThat reads output.txt, finds every /* FILE: ./some/path */ section, creates whatever folders are needed, and writes each file.
The output format catco uses is plain enough you can give it to AI if you need to. The /* FILE: */ markers are just comments, so syntax highlighting still works and nothing breaks if you drop it into a code block.
