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.
Files changed (2) hide show
  1. package/README.md +81 -30
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,72 +1,123 @@
1
- # ๐Ÿš€ Context-Squeezer
1
+ # ๐Ÿš€ Context-Squeezer-CLI
2
2
 
3
3
  ![CI](https://github.com/ErhanNamal/context-squeezer/actions/workflows/ci.yml/badge.svg)
4
- ![npm](https://img.shields.io/badge/npm-friendly-brightgreen)
4
+ [![npm version](https://img.shields.io/npm/v/context-squeezer-cli.svg?style=flat-flat)](https://www.npmjs.com/package/context-squeezer-cli)
5
+ ![npm downloads](https://img.shields.io/npm/dm/context-squeezer-cli?color=blue)
6
+ ![license](https://img.shields.io/npm/l/context-squeezer-cli?color=brightgreen)
5
7
 
6
- Lightweight CLI that packs a repository into a single, LLM-optimized context file. Ideal for feeding projects to ChatGPT, Claude, or local LLMs without wasting tokens on irrelevant files.
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
- - **Smart Code Squeezing:** Produces a structured, human- and LLM-friendly summary of your codebase.
13
- - **Automatic Ignore Detection:** Skips common heavy folders and files (`node_modules`, `.git`, `dist`, lockfiles, etc.).
14
- - **Live Stats & Token Estimation:** Shows total files, lines, characters and an estimated LLM token count.
15
- - **Custom Output:** Change the output filename or destination with a CLI flag.
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
- Clone and install dependencies:
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
- git clone https://github.com/ErhanNamal/context-squeezer.git
25
- cd context-squeezer
26
- npm install
26
+ npx context-squeezer-cli
27
27
  ```
28
28
 
29
- ## ๐Ÿš€ Usage
29
+ This will immediately analyze your current directory and generate a clean `ai_context.txt` file in your root folder.
30
30
 
31
- Squeeze the current project and write the default `ai_context.txt`:
31
+ ---
32
32
 
33
- ```bash
34
- npm start
35
- ```
33
+ ## โš™๏ธ Advanced Usage & Options
36
34
 
37
- Specify a custom output path:
35
+ You can easily customize the output filename or paths using standard CLI flags:
38
36
 
39
37
  ```bash
40
- npm start -- --output my_project_summary.txt
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
- ## ๐Ÿ–ฅ๏ธ Terminal Dashboard (example)
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
- When run, the CLI prints a compact analytics dashboard similar to the example below:
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: D:\Koufc\Yazฤฑlฤฑm ร‡alฤฑลŸmalarฤฑ\KarฤฑลŸฤฑk\context-squeezer
74
+ ๐Ÿ” Analyzing directory: /home/user/projects/my-awesome-app
53
75
 
54
76
  ๐Ÿ“Š PROJECT ANALYTICS REPORT
55
77
  ---------------------------------------------
56
- ๐Ÿ“‚ Total Files Compressed : 5
57
- ๐Ÿ“ Total Lines of Code : 155
58
- ๐Ÿ”ค Total Character Count : 4940
59
- ๐Ÿช™ Estimated LLM Token Load: ~1235 tokens
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
- ๐Ÿ‘‰ D:\Koufc\Yazฤฑlฤฑm ร‡alฤฑลŸmalarฤฑ\KarฤฑลŸฤฑk\context-squeezer\ai_context.txt
85
+ ๐Ÿ‘‰ /home/user/projects/my-awesome-app/ai_context.txt
64
86
  ```
65
87
 
66
- ## ๐Ÿค Contributing
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
- Contributions are welcome โ€” open issues or pull requests for improvements. Add examples, edge-case handling, or CI workflows to help others use the tool.
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "context-squeezer-cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Lightweight CLI that packs a repository into a single, LLM-optimized context file.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",