context-squeezer-cli 1.0.2 โ 1.0.3
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 +81 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,72 +1,123 @@
|
|
|
1
|
-
# ๐ Context-Squeezer
|
|
1
|
+
# ๐ Context-Squeezer-CLI
|
|
2
2
|
|
|
3
3
|

|
|
4
|
-
](https://www.npmjs.com/package/context-squeezer-cli)
|
|
5
|
+

|
|
6
|
+

|
|
5
7
|
|
|
6
|
-
Lightweight CLI that packs
|
|
8
|
+
Lightweight and blazing fast TypeScript CLI that packs an entire repository into a single, LLM-optimized context file. Ideal for feeding your codebases directly into ChatGPT, Claude, or local LLMs without wasting precious tokens on junk files.
|
|
7
9
|
|
|
8
10
|
---
|
|
9
11
|
|
|
10
12
|
## ๐ฅ Features
|
|
11
13
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
14
|
+
- **โก Blazing Fast Squeezing:** Traverses your repository and compiles a structured, human- and LLM-friendly master text file in milliseconds.
|
|
15
|
+
- **๐ก๏ธ Default & Custom Ignores:** Automatically skips heavy or compiled asset folders (`node_modules`, `.git`, `dist`, lockfiles) and respects your custom `.aiignore` rules.
|
|
16
|
+
- **๐ Security & Privacy First:** Built-in binary file detection prevents image/PDF leakage, and an automated data masker redacts sensitive strings like API keys, secrets, or passwords before outputting.
|
|
17
|
+
- **๐ Token Load Estimation:** Instantly calculates total processed files, lines, characters, and provides a live, estimated LLM token count.
|
|
16
18
|
|
|
17
19
|
---
|
|
18
20
|
|
|
19
|
-
## ๐ ๏ธ Installation
|
|
21
|
+
## ๐ ๏ธ Quick Start (No Installation Required)
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
You don't even need to clone or install it locally to try it out. Just navigate to your target project directory in your terminal and fire it up using `npx`:
|
|
22
24
|
|
|
23
25
|
```bash
|
|
24
|
-
|
|
25
|
-
cd context-squeezer
|
|
26
|
-
npm install
|
|
26
|
+
npx context-squeezer-cli
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
This will immediately analyze your current directory and generate a clean `ai_context.txt` file in your root folder.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
---
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
npm start
|
|
35
|
-
```
|
|
33
|
+
## โ๏ธ Advanced Usage & Options
|
|
36
34
|
|
|
37
|
-
|
|
35
|
+
You can easily customize the output filename or paths using standard CLI flags:
|
|
38
36
|
|
|
39
37
|
```bash
|
|
40
|
-
|
|
38
|
+
# Save to a custom file name
|
|
39
|
+
npx context-squeezer-cli --output codebase_summary.txt
|
|
40
|
+
|
|
41
|
+
# Short flag version
|
|
42
|
+
npx context-squeezer-cli -o summary.txt
|
|
41
43
|
```
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## ๐ซ Custom Ignore Rules (.aiignore)
|
|
48
|
+
|
|
49
|
+
Create an `.aiignore` file in the root of your project to skip specific extensions or internal directories, just like a `.gitignore`:
|
|
44
50
|
|
|
45
|
-
|
|
51
|
+
```plaintext
|
|
52
|
+
# .aiignore template
|
|
53
|
+
# Ignore entire custom scripts folder
|
|
54
|
+
scripts
|
|
46
55
|
|
|
56
|
+
# Ignore specific output logs
|
|
57
|
+
test_output.txt
|
|
58
|
+
|
|
59
|
+
# Ignore all JSON files
|
|
60
|
+
*.json
|
|
47
61
|
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## ๐ฅ๏ธ Terminal Dashboard Preview
|
|
66
|
+
|
|
67
|
+
When run successfully, the CLI renders a compact, high-readability analytics report directly in your terminal:
|
|
68
|
+
|
|
69
|
+
```plaintext
|
|
48
70
|
=============================================
|
|
49
71
|
๐ CONTEXT-SQUEEZER - AI Context Prepared
|
|
50
72
|
=============================================
|
|
51
73
|
|
|
52
|
-
๐ Analyzing directory:
|
|
74
|
+
๐ Analyzing directory: /home/user/projects/my-awesome-app
|
|
53
75
|
|
|
54
76
|
๐ PROJECT ANALYTICS REPORT
|
|
55
77
|
---------------------------------------------
|
|
56
|
-
๐ Total Files Compressed :
|
|
57
|
-
๐ Total Lines of Code :
|
|
58
|
-
๐ค Total Character Count :
|
|
59
|
-
๐ช Estimated LLM Token Load: ~
|
|
78
|
+
๐ Total Files Compressed : 12
|
|
79
|
+
๐ Total Lines of Code : 1,420
|
|
80
|
+
๐ค Total Character Count : 45,280
|
|
81
|
+
๐ช Estimated LLM Token Load: ~11,320 tokens
|
|
60
82
|
---------------------------------------------
|
|
61
83
|
|
|
62
84
|
โ
Success! Your LLM context file is ready:
|
|
63
|
-
๐
|
|
85
|
+
๐ /home/user/projects/my-awesome-app/ai_context.txt
|
|
64
86
|
```
|
|
65
87
|
|
|
66
|
-
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## ๐ ๏ธ Local Development & Contribution
|
|
91
|
+
|
|
92
|
+
If you want to clone the repo, add new features, or tweak the scanner locally:
|
|
93
|
+
|
|
94
|
+
### Clone the repository:
|
|
67
95
|
|
|
68
|
-
|
|
96
|
+
```bash
|
|
97
|
+
git clone https://github.com/ErhanNamal/context-squeezer.git
|
|
98
|
+
cd context-squeezer
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Install dependencies:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
npm install
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Run the CLI in development mode:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npm start
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Build the production files:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npm run build
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
69
120
|
|
|
70
121
|
## ๐ License
|
|
71
122
|
|
|
72
|
-
Distributed under the MIT License. See LICENSE for details.
|
|
123
|
+
Distributed under the MIT License. See [LICENSE](LICENSE) for details.
|