catco 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -32
- package/package.json +63 -59
package/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# catco
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
catco does two things.
|
|
4
|
+
|
|
5
|
+
1. It creates a single string of text from the contents of all files that match a glob.
|
|
6
|
+
2. It can take a file of combined file contents and scaffold directories/files from it.
|
|
4
7
|
|
|
5
8
|
## Install
|
|
6
9
|
|
|
@@ -8,44 +11,40 @@ Glob copy file contents to ya clipboard. Use it to quickly share many files with
|
|
|
8
11
|
npm i -g catco
|
|
9
12
|
```
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Copying files to your clipboard
|
|
12
17
|
|
|
13
|
-
|
|
18
|
+
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.
|
|
14
19
|
|
|
20
|
+
```sh
|
|
21
|
+
catco "./src/**/*.ts"
|
|
15
22
|
```
|
|
16
|
-
catco src/components/**/*.ts
|
|
17
23
|
|
|
18
|
-
|
|
24
|
+
Multiple patterns work too. Just keep adding them.
|
|
19
25
|
|
|
20
|
-
|
|
26
|
+
```sh
|
|
27
|
+
catco "./src/**/*.ts" "./src/**/*.css"
|
|
21
28
|
```
|
|
22
29
|
|
|
23
|
-
|
|
30
|
+
If you want to skip certain files, pass `--ignore` with a space-separated list of patterns.
|
|
24
31
|
|
|
32
|
+
```sh
|
|
33
|
+
catco "./src/**/*.ts" --ignore "**/*.test.ts **/*.spec.ts"
|
|
25
34
|
```
|
|
26
|
-
|
|
27
|
-
node_modules
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
build/**
|
|
36
|
-
coverage
|
|
37
|
-
coverage/**
|
|
38
|
-
.next
|
|
39
|
-
.next/**
|
|
40
|
-
.vercel
|
|
41
|
-
.vercel/**
|
|
42
|
-
.turbo
|
|
43
|
-
.turbo/**
|
|
44
|
-
.DS_Store
|
|
45
|
-
*.log
|
|
46
|
-
npm-debug.log
|
|
47
|
-
yarn-error.log
|
|
48
|
-
pnpm-debug.log
|
|
49
|
-
.env
|
|
50
|
-
.env.*
|
|
35
|
+
|
|
36
|
+
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`.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Parsing a string of combined files into files/directories.
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
catco parse ./output.txt ./my-project
|
|
51
44
|
```
|
|
45
|
+
|
|
46
|
+
That reads `output.txt`, finds every `/* FILE: ./some/path */` section, creates whatever folders are needed, and writes each file.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
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.
|
package/package.json
CHANGED
|
@@ -1,59 +1,63 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "catco",
|
|
3
|
-
"version": "
|
|
4
|
-
"type": "module",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "catco",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Glob copy file contents to ya clipboard.",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "pkgroll",
|
|
8
|
+
"start": "tsx src/index.ts ./src/**/*.ts"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"main": "./dist/index.cjs",
|
|
14
|
+
"module": "./dist/index.mjs",
|
|
15
|
+
"exports": {
|
|
16
|
+
"import": {
|
|
17
|
+
"default": "./dist/index.mjs"
|
|
18
|
+
},
|
|
19
|
+
"require": {
|
|
20
|
+
"default": "./dist/index.cjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"bin": {
|
|
24
|
+
"catco": "./dist/index.js"
|
|
25
|
+
},
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"homepage": "https://github.com/tasteee/catco",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/tasteee/catco.git"
|
|
31
|
+
},
|
|
32
|
+
"bugs": "https://github.com/tasteee/catco/issues",
|
|
33
|
+
"author": "tasteink <rocolcleasure@gmail.com>",
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/node": "^25.5.2",
|
|
36
|
+
"@types/sade": "^1.8.0",
|
|
37
|
+
"pkgroll": "^2.12.2",
|
|
38
|
+
"prettier": "^3.5.3",
|
|
39
|
+
"tsx": "^4.19.2",
|
|
40
|
+
"typescript": "^5.6.3",
|
|
41
|
+
"vitest": "^2.1.3"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"clipboardy": "^4.0.0",
|
|
45
|
+
"globby": "^14.0.2",
|
|
46
|
+
"sade": "^1.8.1"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"keywords": [
|
|
52
|
+
"ai",
|
|
53
|
+
"ai-assistant",
|
|
54
|
+
"ai-tools",
|
|
55
|
+
"gpt",
|
|
56
|
+
"copy",
|
|
57
|
+
"clipboard",
|
|
58
|
+
"claude",
|
|
59
|
+
"chatgpt",
|
|
60
|
+
"chatgpt4o",
|
|
61
|
+
"chatgpt4o-mini"
|
|
62
|
+
]
|
|
63
|
+
}
|