tazavibe 0.0.0-stage → 0.1.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 TazaVibe contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,293 @@
1
- # Temporary Holding Version
1
+ # TazaVibe
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **Keep your vibe taza.** *Таза* по-казахски значит «чистый».
4
+
5
+ [Русский](#русский) · [English](#english)
6
+
7
+ ---
8
+
9
+ ## Русский
10
+
11
+ ### Для кого и какую проблему решает
12
+
13
+ **Для вайбкодеров**: людей, которые делают приложения вместе с AI (Claude Code, Cursor и т. п.), часто без опыта в безопасности и DevOps. Полезно и обычному пользователю компьютера, у которого «закончилось место».
14
+
15
+ Три проблемы, с которыми такой человек сталкивается каждый день, и как с ними обычно справляются:
16
+
17
+ | Проблема | Как сейчас | Как с TazaVibe |
18
+ |---|---|---|
19
+ | **Утекают API-ключи.** Ключ OpenAI вписан прямо в код, лежит в `NEXT_PUBLIC_…` и уходит в браузер, `.env` закоммичен. Ключ удалили из кода, а в истории git он остался. Боты находят такие ключи на GitHub за минуты, а счёт за API приходит владельцу. | Узнают из письма о счёте. Сканеры вроде gitleaks выдают список совпадений, но не объясняют новичку, что делать. | `taza` находит ключи около 20 провайдеров и объясняет простым языком, **как именно** утекает каждый: код, браузер, закоммиченный `.env`, `.env` вне `.gitignore`, история git. Ключ показывается только маской. Исправляет в одно нажатие, даёт ссылку на отзыв ключа и ставит git-хук, который не даст закоммитить ключ снова. |
20
+ | **Диск забит мусором.** Десятки брошенных AI-проектов, у каждого `node_modules`, `.venv`, `.next`; плюс старые образы и кэш сборки Docker. | Ищут вручную или ставят отдельные утилиты, по одной на каждый вид мусора. | Один экран: сколько весит мусор каждого проекта, давно ли его трогали, какой командой вернуть папку. Удаляется только то, что пересоздаётся. Папки с файлами под git не трогаются никогда. Docker в том же списке. |
21
+ | **Непонятно, сколько стоит AI.** Claude Code, API-ключи, платные сервисы в каждом проекте. | Никак, или считают руками в таблице. | Расходы Claude Code по локальным логам (по ценам API, по дням, проектам и моделям) и список платных сервисов каждого проекта со ссылками на оплату. Если ключ такого сервиса утёк, это сразу видно. |
22
+
23
+ Всё работает **локально**: ключи, код и логи никуда не отправляются.
24
+
25
+ ### Что реализовано
26
+
27
+ - **Страж ключей.** Правила для OpenAI, Anthropic, OpenRouter, Stripe, Supabase service_role (по роли в JWT), AWS, GitHub, Google, Telegram, Groq, xAI, Hugging Face, Replicate, SendGrid, Slack, пароли в URL баз данных и общий высокоэнтропийный шаблон. Учитываются 5 типов утечки, сканируется история git. Авто-исправления: перенос ключа в `.env` с заменой на `process.env` / `os.environ`, правка `.gitignore`, `git rm --cached`. Хук `pre-commit`, режим `--ci` для CI.
28
+ - **Чистильщик.** Мусор проектов (`node_modules`, виртуальные окружения, `.next`/`dist`/`build`, кэши) с размером, «заброшенностью» и командой восстановления. Docker: остановленные контейнеры, неиспользуемые образы, кэш сборки, анонимные тома (рискованные позиции помечены и по умолчанию не выбраны).
29
+ - **Расходы.** Логи Claude Code из `~/.claude/projects` с дедупликацией и ценами всех моделей, включая кэш. Около 25 платных сервисов по зависимостям, именам переменных `.env` (значения не читаются) и адресам API в коде (например, `openai` с `baseURL` на OpenRouter).
30
+ - **Маскот Таза и оформление.** Пиксельная казахская борзая (тазы) с 7 анимированными состояниями. Таза реагирует на происходящее: ищет во время сканирования, тревожится при утечке, радуется, когда всё чисто. Есть рамки и разделители с градиентом «золото → небо» (цвета флага Казахстана) и спиннер с узорами қошқар мүйіз, бота көз, ирек, шаңырақ, түйе табан. Набор `src/ui-kit/` команда нарисовала во время хакатона как отдельный дизайн-кит, а потом встроила в CLI ([превью](docs/taza_states.png)).
31
+ - **Интерфейсы.** Полноэкранный интерактивный CLI на Ink: вкладки, кнопки, подтверждения, RU/EN. Команды `scan`, `clean`, `costs`, `demo`, `hook`, `guard`, вывод `--json`.
32
+ - **Установка.** npm-пакет (`bin: taza, tazavibe`) и pip-пакет (`python/`): весь CLI собран в один файл и запускается через Node.
33
+ - **Лендинг.** [`landing/index.html`](landing/index.html) открывается двойным кликом, без сборки и интернета.
34
+ - **Демо.** `taza demo` создаёт 4 реалистичных проекта с типичными ошибками и настоящей историей git. Ключи фейковые и генерируются на лету, в репозитории их нет.
35
+ - **63 автотеста.** Ядро, интерактивный интерфейс с эмуляцией клавиш, хук, Чистильщик, Расходы, регрессии по ревью безопасности. Плюс 6 тестов pip-обёртки.
36
+
37
+ ### Технологии и сторонние компоненты
38
+
39
+ **Язык и среда:** TypeScript, Node.js 22+. Python 3.9+ нужен только для pip-обёртки. Сам инструмент вызывает `git` и, если установлен, `docker`.
40
+
41
+ | Компонент | Для чего | Лицензия |
42
+ |---|---|---|
43
+ | [Ink](https://github.com/vadimdemedes/ink) 8 + [React](https://react.dev) 19 | интерактивный интерфейс в терминале | MIT |
44
+ | [ink-text-input](https://github.com/vadimdemedes/ink-text-input) | поле ввода пути | MIT |
45
+ | [picocolors](https://github.com/alexeyraspopov/picocolors) | цвета в текстовых отчётах | ISC |
46
+ | [tsup](https://github.com/egoist/tsup) (esbuild) | сборка CLI и однофайлового бандла для pip | MIT |
47
+ | [TypeScript](https://www.typescriptlang.org) | типы | Apache-2.0 |
48
+ | [Vitest](https://vitest.dev), [ink-testing-library](https://github.com/vadimdemedes/ink-testing-library) | тесты, эмуляция клавиш в TUI | MIT |
49
+ | [Hatchling](https://hatch.pypa.io), [uv](https://docs.astral.sh/uv/) | сборка pip-пакета | MIT / MIT, Apache-2.0 |
50
+
51
+ **Данные и материалы:**
52
+ - Цены моделей Claude (`src/core/costs/pricing.ts`) взяты из документации Anthropic (актуальность 2026-11-03), старые модели — со страницы цен Anthropic.
53
+ - Формат логов Claude Code (`~/.claude/projects/**.jsonl`) изучен на логе этого же проекта; из логов читаются только счётчики токенов.
54
+ - Шаблоны ключей провайдеров написаны по их публичным форматам, ссылки на отзыв ключа и страницы оплаты ведут на официальные сайты провайдеров.
55
+ - Маскот Таза, рамки, орнаменты и спиннер (`src/ui-kit/`) нарисовала команда во время хакатона.
56
+ - Лендинг (`landing/`) написан с нуля без библиотек, шрифтов и CDN.
57
+ - Чужого кода и готовых шаблонов в проекте нет; всё остальное написано во время хакатона с Claude Code.
58
+
59
+ ### Установка
60
+
61
+ Опубликовано на [npm](https://www.npmjs.com/package/tazavibe) и [PyPI](https://pypi.org/project/tazavibe/) (нужен Node.js 22+):
62
+
63
+ ```bash
64
+ npx tazavibe # без установки
65
+ npm install -g tazavibe # или: pip install tazavibe / pipx install tazavibe
66
+ taza
67
+ ```
68
+
69
+ Для проверки жюри ниже — запуск из репозитория, пошагово, на демо-проектах.
70
+
71
+ ### Запуск локально (пошагово)
72
+
73
+ **Нужно:** Node.js **22+** и git. Docker и Python не обязательны.
74
+
75
+ ```bash
76
+ # 1. Код
77
+ git clone https://github.com/Alem-AI-Hackathon/hack-75417f6a-sixzeroseven.git
78
+ cd hack-75417f6a-sixzeroseven/Everyday/tazavibe
79
+
80
+ # 2. Установка и сборка
81
+ npm install # предупреждение «npm warn install-scripts … esbuild» можно игнорировать
82
+ npm run build
83
+
84
+ # 3. Демо-проекты с типичными ошибками (команда напечатает, куда их положила)
85
+ node dist/cli.js demo
86
+
87
+ # 4. Интерактивный режим: стрелки и Enter, вкладки 1 / 2 / 3, q — выход
88
+ node dist/cli.js
89
+ # в меню выберите «Попробовать на демо-проектах»
90
+ ```
91
+
92
+ Что вы увидите на демо:
93
+ - **Вкладка 1, Страж.** «4 проекта · 8 проблем · 4 критичных». Откройте находку «Ключ прямо в коде» в `ai-chat` и нажмите «Перенести ключ в .env»: файл исправится, проект пересканируется, и появится находка «ключ остался в истории git».
94
+ - **Вкладка 2, Чистильщик.** Около 172 МБ мусора. Заброшенные проекты отмечены, активный `portfolio` не отмечен, а папка `tg-bot/build` с файлом под git не предлагается вовсе. `d` удаляет отмеченное, но только после подтверждения.
95
+ - **Вкладка 3, Расходы.** Ваши расходы Claude Code, если вы им пользуетесь, и платные сервисы демо-проектов с ⚠ там, где ключ утёк.
96
+
97
+ > Вкладка 2 показывает и **ваш настоящий Docker**, если он запущен. В демо по умолчанию отмечен только кэш сборки. Удаление происходит лишь после явного подтверждения.
98
+
99
+ **Без интерактива, для проверки результатов:**
100
+
101
+ ```bash
102
+ node dist/cli.js scan <путь-к-демо> # отчёт по утечкам
103
+ node dist/cli.js scan <путь-к-демо> --json # машиночитаемо (ключи только маской)
104
+ node dist/cli.js scan <путь-к-демо> --ci # код выхода 1, если есть критичные/высокие
105
+ node dist/cli.js clean <путь-к-демо> --no-docker
106
+ node dist/cli.js costs <путь-к-демо>
107
+ node dist/cli.js --help
108
+ npm test # 63 теста
109
+ ```
110
+
111
+ Сайт продукта: `node dist/cli.js site` (лендинг лежит внутри пакета, открывается в браузере без интернета; то же в меню). Свои проекты: `node dist/cli.js scan ~/projects` или просто `node dist/cli.js` в нужной папке. Защита коммитов: `node dist/cli.js hook <репозиторий>`. Язык: `--lang ru|en`.
112
+
113
+ **Как команду `taza` из исходников:** `npm link`, затем `taza`. **pip из исходников:** `npm run build:py && pip install ./python`.
114
+
115
+ ### Как мы использовали Claude Code
116
+
117
+ Весь код, тесты, pip-пакет и лендинг написаны с Claude Code за время хакатона. Полный журнал с 13 случаями лежит в [`docs/claude-code-log.md`](docs/claude-code-log.md). Три главных:
118
+
119
+ 1. **Ревью безопасности отдельным агентом.** Claude Code запустил субагента только на чтение с задачей «сломать обещания продукта». Каждую находку агент подтверждал воспроизведением. Среди найденного:
120
+ - по маске пароля и хэшу в `--json` пароль БД подбирался за 0,4 с;
121
+ - Чистильщик удалял файлы под git во **вложенном** репозитории;
122
+ - `taza demo` мог стереть папку пользователя;
123
+ - ReDoS: 7 с на одну строку.
124
+
125
+ На каждое замечание есть регрессионный тест (`tests/review*.test.ts`).
126
+ **Что пришлось поправить:** сначала Claude Code отчитался «исправлено всё», а на вопрос «исправил все?» перепроверил и признал, что 4 пункта из 18 закрыты частично. Их доделали, и по ходу нашлась ещё одна дыра (лимит в 500 коммитов не отмечался как неполная проверка).
127
+ 2. **Данные проверяли, а не угадывали.** Цены моделей Claude взяты из документации, а не из памяти: у новых моделей чтение кэша стоит 0.025–0.1× цены входа, и привычные «10%» дали бы ошибку в разы. Перед разбором логов Claude Code изучил их формат и увидел, что один ответ модели пишется несколькими строками (339 строк на 125 сообщений). Без дедупликации расходы завышались бы в 2,7 раза.
128
+ 3. **Интерфейс тестируется без человека.** Claude Code не может нажимать клавиши в терминале, поэтому прогнал TUI через `ink-testing-library`: эмуляция Enter и стрелок, проверка кадров и файлов на диске после исправления. Так нашлись баги вёрстки и гонка в подсчёте размера папок (40 МБ показывались как 2 МБ).
129
+ **Что пришлось поправить:** правки, внесённые скриптом через bash, потеряли обратные слэши в регулярке (`\s` стал `s`), и исправление молча не работало. Поймал это только регрессионный тест, после чего такие правки делались без shell-экранирования.
130
+
131
+ ### Демо-видео
132
+
133
+ Ссылка будет добавлена.
134
+
135
+ ### Структура
136
+
137
+ ```
138
+ src/core/secrets Страж: правила, сканер, исправления, хук
139
+ src/core/cleaner Чистильщик: мусор проектов и Docker
140
+ src/core/costs Расходы: логи Claude Code, цены, платные сервисы
141
+ src/tui интерактивный интерфейс (Ink)
142
+ src/ui-kit маскот Таза, рамки, орнаменты, спиннер
143
+ src/cli.ts команды
144
+ src/demo.ts генератор демо-проектов
145
+ tests/ 63 теста (vitest)
146
+ python/ pip-пакет
147
+ landing/ лендинг
148
+ docs/ журнал работы с Claude Code
149
+ ```
150
+
151
+ ---
152
+
153
+ ## English
154
+
155
+ ### Who it is for and what problem it solves
156
+
157
+ **For vibecoders**: people who build apps together with AI (Claude Code, Cursor, etc.), often without a security or DevOps background. Also useful for any computer user who is "out of disk space".
158
+
159
+ Three problems such a person faces every day, and how they are handled today:
160
+
161
+ | Problem | Today | With TazaVibe |
162
+ |---|---|---|
163
+ | **Leaked API keys.** An OpenAI key written in code, put in `NEXT_PUBLIC_…` and shipped to the browser, a committed `.env`, a key deleted from code but still in git history. Bots find such keys on GitHub within minutes; the owner gets the API bill. | People learn about it from the bill. Scanners like gitleaks list matches but don't explain to a beginner what to do. | `taza` finds keys of ~20 providers and explains in plain words **how** each one leaks (code, browser, committed `.env`, `.env` not ignored, git history). Keys are shown masked only. One-key fixes, a link to revoke the key, and a git hook that blocks committing keys again. |
164
+ | **A disk full of junk.** Dozens of abandoned AI projects, each with `node_modules`, `.venv`, `.next`, plus old Docker images and build cache. | Manual hunting or separate tools for each kind of junk. | One screen: junk size per project, how long it has been idle, the command that restores each folder. Only regenerable folders are deleted; folders with git-tracked files are never touched. Docker in the same list. |
165
+ | **Unknown AI spend.** Claude Code, API keys, paid services in every project. | Nothing, or a spreadsheet. | Claude Code spend from local logs (at API prices, by day, project and model) and the paid services each project uses, with billing links. A leaked key of such a service is flagged. |
166
+
167
+ Everything runs **locally**: keys, code and logs never leave the machine.
168
+
169
+ ### What is implemented
170
+
171
+ - **Secrets guard.** Rules for OpenAI, Anthropic, OpenRouter, Stripe, Supabase service_role (by the JWT role), AWS, GitHub, Google, Telegram, Groq, xAI, Hugging Face, Replicate, SendGrid, Slack, database URLs with passwords, and a generic high-entropy pattern. 5 kinds of exposure, git history scan. Auto-fixes: move a key to `.env` and read it via `process.env` / `os.environ`, fix `.gitignore`, `git rm --cached`. A `pre-commit` hook, and `--ci` for CI.
172
+ - **Cleaner.** Project junk (`node_modules`, virtualenvs, `.next`/`dist`/`build`, caches) with size, idle time and the restore command. Docker: stopped containers, unused images, build cache, anonymous volumes (risky items are marked and not preselected).
173
+ - **Costs.** Claude Code logs from `~/.claude/projects`, deduplicated and priced for every model including cache. ~25 paid services detected by dependencies, `.env` variable names (values are never read) and API hosts in code (e.g. `openai` with a `baseURL` pointing at OpenRouter).
174
+ - **Mascot Таза and visuals.** A pixel Kazakh sighthound (tazy) with 7 animated states. Таза reacts to what is happening: searches while scanning, alarmed on a leak, happy when everything is clean. Gold → sky gradient boxes and dividers (the colours of the Kazakh flag), and a spinner woven from the patterns қошқар мүйіз, бота көз, ирек, шаңырақ, түйе табан. The kit `src/ui-kit/` was drawn by the team during the hackathon as a standalone design kit, then built into the CLI ([preview](docs/taza_states.png)).
175
+ - **Interfaces.** Full-screen interactive CLI built with Ink: tabs, buttons, confirmations, RU/EN. Commands `scan`, `clean`, `costs`, `demo`, `hook`, `guard`; `--json` output.
176
+ - **Install.** npm package (`bin: taza, tazavibe`) and pip package (`python/`): the whole CLI bundled into one file and run with Node.
177
+ - **Landing page.** [`landing/index.html`](landing/index.html) opens with a double click, no build, no network.
178
+ - **Demo.** `taza demo` creates 4 realistic projects with typical mistakes and real git history. Keys are fakes generated at runtime; none are stored in the repo.
179
+ - **63 automated tests.** Core, interactive UI with simulated keystrokes, hook, cleaner, costs, security-review regressions. Plus 6 tests for the pip launcher.
180
+
181
+ ### Technologies and third-party components
182
+
183
+ **Language and runtime:** TypeScript, Node.js 22+. Python 3.9+ only for the pip launcher. The tool calls `git` and, if installed, `docker`.
184
+
185
+ | Component | Used for | License |
186
+ |---|---|---|
187
+ | [Ink](https://github.com/vadimdemedes/ink) 8 + [React](https://react.dev) 19 | interactive terminal UI | MIT |
188
+ | [ink-text-input](https://github.com/vadimdemedes/ink-text-input) | path input field | MIT |
189
+ | [picocolors](https://github.com/alexeyraspopov/picocolors) | colours in text reports | ISC |
190
+ | [tsup](https://github.com/egoist/tsup) (esbuild) | building the CLI and the single-file bundle for pip | MIT |
191
+ | [TypeScript](https://www.typescriptlang.org) | types | Apache-2.0 |
192
+ | [Vitest](https://vitest.dev), [ink-testing-library](https://github.com/vadimdemedes/ink-testing-library) | tests, simulated keystrokes in the TUI | MIT |
193
+ | [Hatchling](https://hatch.pypa.io), [uv](https://docs.astral.sh/uv/) | building the pip package | MIT / MIT, Apache-2.0 |
194
+
195
+ **Data and assets:**
196
+ - Claude model prices (`src/core/costs/pricing.ts`) come from Anthropic's documentation (as of 2026-11-03), older models from Anthropic's pricing page.
197
+ - The Claude Code log format (`~/.claude/projects/**.jsonl`) was studied on this project's own log; only token counters are read from logs.
198
+ - Provider key patterns follow their public formats; revoke and billing links point to the providers' official sites.
199
+ - The mascot Таза, boxes, ornaments and spinner (`src/ui-kit/`) were drawn by the team during the hackathon.
200
+ - The landing page (`landing/`) is written from scratch with no libraries, fonts or CDNs.
201
+ - No third-party code or ready-made templates; everything else was written during the hackathon with Claude Code.
202
+
203
+ ### Install
204
+
205
+ Published on [npm](https://www.npmjs.com/package/tazavibe) and [PyPI](https://pypi.org/project/tazavibe/) (requires Node.js 22+):
206
+
207
+ ```bash
208
+ npx tazavibe # no install
209
+ npm install -g tazavibe # or: pip install tazavibe / pipx install tazavibe
210
+ taza
211
+ ```
212
+
213
+ For the jury, below is a step-by-step run from the repository on demo projects.
214
+
215
+ ### Run locally (step by step)
216
+
217
+ **Requires:** Node.js **22+** and git. Docker and Python are optional.
218
+
219
+ ```bash
220
+ # 1. Code
221
+ git clone https://github.com/Alem-AI-Hackathon/hack-75417f6a-sixzeroseven.git
222
+ cd hack-75417f6a-sixzeroseven/Everyday/tazavibe
223
+
224
+ # 2. Install and build
225
+ npm install # the "npm warn install-scripts … esbuild" warning is harmless
226
+ npm run build
227
+
228
+ # 3. Demo projects with typical mistakes (prints where it put them)
229
+ node dist/cli.js demo --lang en
230
+
231
+ # 4. Interactive mode: arrows + Enter, tabs 1 / 2 / 3, q to quit
232
+ node dist/cli.js --lang en
233
+ # choose "Try it on demo projects" in the menu
234
+ ```
235
+
236
+ What you will see on the demo:
237
+ - **Tab 1, Guard.** "4 projects · 8 problems · 4 critical". Open the "Key hardcoded in source" finding in `ai-chat` and press "Move key to .env": the file is fixed, the project is rescanned, and a "Key still in git history" finding appears.
238
+ - **Tab 2, Cleaner.** ~172 MB of junk. Stale projects are preselected, the active `portfolio` is not, and `tg-bot/build` (it holds a git-tracked file) is never offered. `d` deletes the selection, but only after confirmation.
239
+ - **Tab 3, Costs.** Your own Claude Code spend, if you use it, and the demo projects' paid services with ⚠ where a key leaked.
240
+
241
+ > Tab 2 also shows **your real Docker** if it is running. In the demo only the build cache is preselected, and nothing is deleted without an explicit confirmation.
242
+
243
+ **Non-interactive, to verify results:**
244
+
245
+ ```bash
246
+ node dist/cli.js scan <demo-path> # leak report
247
+ node dist/cli.js scan <demo-path> --json # machine-readable (keys masked)
248
+ node dist/cli.js scan <demo-path> --ci # exit code 1 if critical/high found
249
+ node dist/cli.js clean <demo-path> --no-docker
250
+ node dist/cli.js costs <demo-path>
251
+ node dist/cli.js --help
252
+ npm test # 63 tests
253
+ ```
254
+
255
+ Product website: `node dist/cli.js site` (the landing page ships inside the package and opens in the browser offline; also in the menu). Your own projects: `node dist/cli.js scan ~/projects`, or just `node dist/cli.js` in the folder. Commit guard: `node dist/cli.js hook <repo>`. Language: `--lang ru|en`.
256
+
257
+ **As the `taza` command from source:** `npm link`, then `taza`. **pip from source:** `npm run build:py && pip install ./python`.
258
+
259
+ ### How we used Claude Code
260
+
261
+ All code, tests, the pip package and the landing page were written with Claude Code during the hackathon. The full log of 13 cases is in [`docs/claude-code-log.md`](docs/claude-code-log.md) (in Russian). The three main ones:
262
+
263
+ 1. **A security review by a separate agent.** Claude Code launched a read-only subagent tasked with breaking the product's promises. The agent confirmed every finding with a repro. Among them:
264
+ - the masked value plus the hash in `--json` let a DB password be brute-forced in 0.4 s;
265
+ - the cleaner deleted git-tracked files in a **nested** repo;
266
+ - `taza demo` could wipe a user folder;
267
+ - ReDoS: 7 s per line.
268
+
269
+ Each finding has a regression test (`tests/review*.test.ts`).
270
+ **What had to be corrected:** Claude Code first reported "everything fixed"; when asked "did you fix all of it?", it re-checked and admitted 4 of 18 items were only partly fixed. Those were finished, and one more gap turned up on the way (the 500-commit limit was not reported as a partial scan).
271
+ 2. **Data was checked, not guessed.** Claude model prices come from the documentation, not from memory: on newer models cache reads cost 0.025–0.1× of input, so the usual "10%" would be off several times over. Before parsing the logs, Claude Code studied their format and found that one model response is logged as several lines (339 lines for 125 messages). Without deduplication the spend would be overstated 2.7×.
272
+ 3. **The UI is tested without a human.** Claude Code can't press keys in a terminal, so it drove the TUI with `ink-testing-library`: simulated Enter and arrow keys, checked the rendered frames and the files on disk after a fix. That caught layout bugs and a race in folder size counting (40 MB shown as 2 MB).
273
+ **What had to be corrected:** edits applied by a bash script lost the backslashes in a regex (`\s` became `s`), so a fix silently did nothing. Only a regression test caught it; after that, such edits were made without shell escaping.
274
+
275
+ ### Demo video
276
+
277
+ Link will be added.
278
+
279
+ ### Layout
280
+
281
+ ```
282
+ src/core/secrets guard: rules, scanner, fixes, hook
283
+ src/core/cleaner cleaner: project junk and Docker
284
+ src/core/costs costs: Claude Code logs, prices, paid services
285
+ src/tui interactive UI (Ink)
286
+ src/ui-kit mascot Таза, boxes, ornaments, spinner
287
+ src/cli.ts commands
288
+ src/demo.ts demo project generator
289
+ tests/ 63 tests (vitest)
290
+ python/ pip package
291
+ landing/ landing page
292
+ docs/ Claude Code work log
293
+ ```