kodu 1.1.3 → 1.1.4

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 (3) hide show
  1. package/README.md +126 -1
  2. package/docs/todo.md +2 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1 +1,126 @@
1
- Todo: add readme
1
+ # Kodu 🚀
2
+
3
+ **Kodu** is a high-performance CLI tool designed to bridge the gap between your local codebase and Large Language Models (LLMs). It automates the tedious parts of AI-assisted development: preparing context, stripping "noise" from code, performing instant reviews, and drafting commit messages.
4
+
5
+ Built for speed and developer experience, Kodu helps you get the best out of AI without the manual "copy-paste" overhead.
6
+
7
+ ---
8
+
9
+ ## Key Features
10
+
11
+ - **📦 Smart Context Packing**: Bundle your entire project (or specific parts) into a single, LLM-friendly format.
12
+ - **🧹 Deterministic Code Cleaning**: Strip comments and unnecessary metadata to save tokens while keeping critical logic and system instructions.
13
+ - **🔍 Instant AI Review**: Get immediate feedback on your staged changes (Bugs, Style, or Security).
14
+ - **📝 Automated Commits**: Generate meaningful, Conventional Commit messages based on your actual code changes.
15
+ - **💰 Token Budgeting**: Always know how many tokens you are sending and get an estimated cost before hitting the API.
16
+
17
+ ---
18
+
19
+ ## Quick Start
20
+
21
+ ### 1. Installation
22
+
23
+ ```bash
24
+ # Install globally
25
+ npm install -g kodu-cli # (Or your package name)
26
+
27
+ # Or run via npx
28
+ npx kodu-cli init
29
+ ```
30
+
31
+ ### 2. Initialization
32
+
33
+ Set up Kodu in your project:
34
+
35
+ ```bash
36
+ kodu init
37
+ ```
38
+ This creates a `kodu.json` configuration file and a `.kodu/` folder for your custom prompt templates.
39
+
40
+ ### 3. Configure AI (Optional)
41
+
42
+ For AI-powered features (`review`, `commit`), set your API key in your environment:
43
+
44
+ ```bash
45
+ export OPENAI_API_KEY=your_key_here
46
+ ```
47
+
48
+ ---
49
+
50
+ ## Usage
51
+
52
+ ### Pack Context
53
+ Collect your project files into one file or directly to your clipboard. Kodu respects your `.gitignore` automatically.
54
+
55
+ ```bash
56
+ # Copy context to clipboard with a specific prompt template
57
+ kodu pack --copy --template refactor
58
+
59
+ # Save context to a specific file
60
+ kodu pack --out context.txt
61
+ ```
62
+
63
+ ### Clean Code
64
+ Remove comments from your JS/TS files to reduce token usage. It uses safe parsing to ensure `@ts-ignore`, `TODO`, and `biome-ignore` comments are preserved.
65
+
66
+ ```bash
67
+ # See what will be removed without changing files
68
+ kodu clean --dry-run
69
+
70
+ # Clean the code
71
+ kodu clean
72
+ ```
73
+
74
+ ### AI Code Review
75
+ Analyze your **staged** changes before committing.
76
+
77
+ ```bash
78
+ # Check for bugs (default)
79
+ kodu review
80
+
81
+ # Check for security vulnerabilities or style issues
82
+ kodu review --mode security
83
+ kodu review --mode style
84
+ ```
85
+
86
+ ### AI Commit Messages
87
+ Generate a concise Conventional Commit message based on your staged diff.
88
+
89
+ ```bash
90
+ kodu commit
91
+ ```
92
+
93
+ ---
94
+
95
+ ## Configuration
96
+
97
+ Kodu is controlled by `kodu.json`. You can customize:
98
+ - **LLM Settings**: Choose your model (e.g., `gpt-4o`) and provider.
99
+ - **Ignored Patterns**: Files that should never be sent to the AI (e.g., lockfiles, binaries).
100
+ - **Cleaner Whitelist**: Specific comment prefixes you want to keep.
101
+
102
+ Example `kodu.json`:
103
+ ```json
104
+ {
105
+ "llm": {
106
+ "model": "gpt-4o"
107
+ },
108
+ "packer": {
109
+ "ignore": ["*.log", "dist/**"]
110
+ },
111
+ "cleaner": {
112
+ "whitelist": ["//!"]
113
+ }
114
+ }
115
+ ```
116
+
117
+ ## Why Kodu?
118
+
119
+ 1. **Speed**: Optimized for near-instant startup.
120
+ 2. **Privacy & Control**: You decide exactly what code leaves your machine.
121
+ 3. **Deterministic**: Code cleaning is performed via logic, not AI, ensuring your actual code logic is never accidentally altered.
122
+ 4. **CI/CD Ready**: Use `--ci` and `--json` flags to integrate Kodu reviews into your automation pipelines.
123
+
124
+ ---
125
+
126
+ **Happy Coding!** 🦄
package/docs/todo.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # ToDo
2
2
 
3
3
  - [ ] Сделать чтобы AI ключ был не обязательным при инициализации. Наш проект должен работать и без него (просто
4
- функционал будет урезан)
4
+ функционал будет урезан)
5
+ - [ ] Добавить JSON schema для конфига
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kodu",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "bin": {