@kernelonpanic/kitcode 1.0.0-beta

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 ADDED
@@ -0,0 +1,280 @@
1
+ # KitCode
2
+
3
+ English · [Русский](./README.ru.md)
4
+
5
+ ```text
6
+ ╱\_╱\
7
+ ( o.o )
8
+ > ^ <
9
+ ```
10
+
11
+ KitCode is a terminal coding agent. It reads and edits files, searches a project, runs commands,
12
+ connects external tools through MCP, and keeps persistent session history.
13
+
14
+ The interface is built with TypeScript, React, and Ink. KitCode supports the Anthropic API and
15
+ OpenAI-compatible providers, including OpenRouter and local model servers.
16
+
17
+ ## Features
18
+
19
+ - streaming responses with reasoning output;
20
+ - file reading, creation, and targeted editing;
21
+ - filename and content search;
22
+ - shell commands with approval prompts;
23
+ - `normal`, `accept`, and `plan` modes;
24
+ - persistent and resumable sessions with native terminal scrollback;
25
+ - searchable session management with rename, delete, and Markdown export;
26
+ - input history with the `↑` and `↓` keys;
27
+ - queued messages while the agent is working;
28
+ - image and UTF-8 text attachments;
29
+ - manual and automatic context compaction;
30
+ - token, estimated cost, exact context-window, and provider rate-limit indicators;
31
+ - automatic file checkpoints with `/undo`;
32
+ - detected project checks after file edits;
33
+ - model and provider switching from the TUI;
34
+ - live MCP add, enable, disable, and delete operations, plus skills and subagents;
35
+ - a local `/checker` report for the runtime, provider, session, context, and MCP setup;
36
+ - English and Russian interfaces with configurable accents.
37
+
38
+ ## Requirements
39
+
40
+ - Node.js 22 or newer;
41
+ - npm.
42
+
43
+ ## Install
44
+
45
+ ```sh
46
+ npm install -g kitcode
47
+ ```
48
+
49
+ ## Install from source
50
+
51
+ ```sh
52
+ git clone https://github.com/PanicOnKernel/KitCode.git
53
+ cd KitCode
54
+ npm install
55
+ npm run build
56
+ npm link
57
+ ```
58
+
59
+ After `npm link`, the `kitcode` command is available globally. To run without a global link:
60
+
61
+ ```sh
62
+ npm run dev
63
+ ```
64
+
65
+ ## First run
66
+
67
+ ```sh
68
+ kitcode
69
+ ```
70
+
71
+ On first launch, KitCode asks for the interface language, an API base URL, and an API key. It then
72
+ detects the provider type, loads the available models, and opens the main agent view.
73
+
74
+ Common base URLs:
75
+
76
+ ```text
77
+ https://api.anthropic.com
78
+ https://openrouter.ai/api/v1
79
+ http://localhost:11434/v1
80
+ ```
81
+
82
+ ## Command line
83
+
84
+ | Command | Purpose |
85
+ | --- | --- |
86
+ | `kitcode` | Start the TUI in the current directory. |
87
+ | `kitcode -c` | Continue the latest session for this project. |
88
+ | `kitcode -r <id>` | Resume a session by id. |
89
+ | `kitcode --cwd <path>` | Use another working directory. |
90
+ | `kitcode --model <provider/model>` | Start with a selected model. |
91
+ | `kitcode --mode <normal\|accept\|plan>` | Select the initial agent mode. |
92
+ | `kitcode sessions` | List saved sessions. |
93
+ | `kitcode ask "question"` | Run one request without the TUI. |
94
+ | `kitcode add <url>` | Add a provider; the key is entered in a hidden prompt. |
95
+ | `kitcode add <url> --key-env <name>` | Read the provider key from an environment variable. |
96
+ | `kitcode trust` | Enable this workspace's project config and skills. |
97
+ | `kitcode config` | Show the config and key locations. |
98
+ | `kitcode config --local` | Create a project config at `./kitcode.json`. |
99
+ | `kitcode prompt list` | List saved prompts. |
100
+ | `kitcode prompt rm <slug>` | Delete a saved prompt. |
101
+
102
+ ## TUI commands
103
+
104
+ Press `/` to open the command list.
105
+
106
+ | Command | Purpose |
107
+ | --- | --- |
108
+ | `/model` | Select a model. |
109
+ | `/provider` | Switch providers. |
110
+ | `/login` · `/logout [provider]` | Add a provider or choose exactly which provider to remove. |
111
+ | `/effort` · `/thinking` | Configure reasoning depth and output. |
112
+ | `/resume` · `/clear` | Resume a session or start a new one. |
113
+ | `/sessions` | Search sessions, then resume, rename, delete, or export one. |
114
+ | `/sessions rename <id> <title>` | Give a saved session a title. |
115
+ | `/sessions delete all` | Delete every saved chat after two separate confirmations. |
116
+ | `/sessions export <id> [path]` | Export a session to a private Markdown file (default: `.kitcode-exports/`). |
117
+ | `/attach <path>` · `/attach clipboard` · `/attach clear` | Manage attachments for the next message. |
118
+ | `/compact` | Replace older conversation context with a concise model-generated summary. |
119
+ | `/subagents` | Show the current number of active sub-agents. |
120
+ | `/undo` | Undo built-in file edits from the latest message. |
121
+ | `/usage` | Show tokens, requests, cost, balance/key limits, and response rate-limit headers when available. |
122
+ | `/checker` | Check the local setup and provider model listing without sending a paid chat request. |
123
+ | `/prompt` | Insert a saved prompt. |
124
+ | `/prompt save <name>` | Save the latest message as a prompt. |
125
+ | `/skills` | Show discovered skills. |
126
+ | `/mcp add <name> <https://url>` | Add and connect a remote MCP server. |
127
+ | `/mcp add <name> -- <command> [args]` | Add and connect a local MCP server. |
128
+ | `/mcp list` | Show configured MCP servers and connection status. |
129
+ | `/mcp enable <name>` · `/mcp disable <name>` | Connect or disconnect an MCP server without removing it. |
130
+ | `/mcp delete <name>` | Disconnect and remove an MCP server. |
131
+ | `/theme` · `/lang` | Change the accent or interface language. |
132
+ | `/config` | Show the active config. |
133
+ | `/bypass` | Toggle approval-free operation. |
134
+ | `/help` · `/exit` | Show help or quit. |
135
+
136
+ ## Keyboard shortcuts
137
+
138
+ | Key | Action |
139
+ | --- | --- |
140
+ | `Enter` | Send a message or choose an item. |
141
+ | `↑` / `↓` | Browse input history or menu items. |
142
+ | `Tab` | Complete a slash command. |
143
+ | `Shift+Tab` | Cycle `normal → accept → plan`. |
144
+ | `Ctrl+V` / `Cmd+V` | Attach an image from the system clipboard; `/attach clipboard` is the explicit fallback. |
145
+ | `Esc` | Cancel the current request or close an overlay. |
146
+
147
+ Messages entered while the agent is running are queued and processed in order.
148
+
149
+ ## Modes
150
+
151
+ - `normal` — file changes, shell commands, and MCP calls request approval when needed;
152
+ - `accept` — file edits are accepted automatically;
153
+ - `plan` — the agent explores the project and returns a plan without changing files.
154
+
155
+ The lower status panel shows the active mode, model, and usage. A left-to-right context capsule
156
+ stays on the right, changing from green to yellow at 60% and red at 85%, with the connected MCP
157
+ count below it. `ctx ?` means the provider has not returned exact usage for the current model yet.
158
+ Completed output is committed to
159
+ normal terminal scrollback, so it remains smooth to scroll while a response is streaming.
160
+
161
+ When exact usage reaches 80% of a known context window, KitCode automatically summarizes older
162
+ turns while keeping the latest two user turns. `/compact` runs the same operation manually.
163
+
164
+ Before the built-in `write` and `edit` tools change a file, KitCode creates a private checkpoint.
165
+ `/undo` restores the latest checkpoint and leaves files with newer manual changes untouched.
166
+ After a message changes files, KitCode detects common project checks such as `lint`, `typecheck`,
167
+ and `test`. The exact commands are shown for approval before they run.
168
+
169
+ ## Configuration
170
+
171
+ KitCode uses these main paths:
172
+
173
+ | Path | Contents |
174
+ | --- | --- |
175
+ | `~/.kitcode/config.json` | Global settings. |
176
+ | `~/.kitcode/auth.json` | Provider keys. |
177
+ | `~/.kitcode/sessions/` | Saved sessions. |
178
+ | `~/.kitcode/checkpoints/` | Automatic file checkpoints used by `/undo`. |
179
+ | `~/.kitcode/prompts/` | Saved prompts. |
180
+ | `~/.kitcode/skills/` | Global skills. |
181
+ | `./.kitcode/skills/` | Project skills. |
182
+ | `./kitcode.json` | Project-local config. |
183
+
184
+ Minimal manual provider configuration:
185
+
186
+ ```json
187
+ {
188
+ "version": 1,
189
+ "model": "openrouter/openai/gpt-5",
190
+ "providers": {
191
+ "openrouter": {
192
+ "type": "openai",
193
+ "baseUrl": "https://openrouter.ai/api/v1",
194
+ "keyEnv": "OPENROUTER_API_KEY"
195
+ }
196
+ }
197
+ }
198
+ ```
199
+
200
+ The main settings are `model`, `effort`, `thinking`, `maxTokens`, `budget`, `diagnostics`, `updates`,
201
+ `theme`, `permissions`, `providers`, and `mcp`. `budget` controls local per-message safety limits for model
202
+ requests, tokens, estimated cost (when model pricing is available), and subagents. These values are
203
+ not the provider's account balance or rate limits. `diagnostics.autoRun`
204
+ enables checks after file edits; `diagnostics.commands` can replace automatic detection with up to
205
+ eight explicit commands. The GitHub startup check is present but disabled by default with
206
+ `updates.checkOnStart: false`; no update request is made in that state. Manual editing is usually unnecessary: add a provider during onboarding
207
+ or with `/login`.
208
+
209
+ Project settings and project skills are enabled after reviewing the workspace and running:
210
+
211
+ ```sh
212
+ kitcode trust
213
+ ```
214
+
215
+ Run `kitcode trust --revoke` to return to global settings and skills for that workspace.
216
+
217
+ ## MCP and skills
218
+
219
+ MCP supports local `stdio` servers and remote HTTP servers. Add one from the TUI and it connects
220
+ immediately without a restart:
221
+
222
+ ```text
223
+ /mcp add docs https://mcp.example.com/mcp
224
+ /mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem .
225
+ /mcp list
226
+ /mcp disable filesystem
227
+ /mcp enable filesystem
228
+ /mcp delete filesystem
229
+ ```
230
+
231
+ The server is saved to the active config. Use `${env:NAME}` references in a manually configured
232
+ `env` or `headers` object when a server needs a secret; this keeps the secret itself out of the
233
+ config file:
234
+
235
+ ```json
236
+ {
237
+ "mcp": {
238
+ "github": {
239
+ "type": "stdio",
240
+ "command": "npx",
241
+ "args": ["-y", "@modelcontextprotocol/server-github"],
242
+ "env": {
243
+ "GITHUB_TOKEN": "${env:GITHUB_TOKEN}"
244
+ }
245
+ }
246
+ }
247
+ }
248
+ ```
249
+
250
+ A skill is a directory containing a `SKILL.md` file. Global skills live in
251
+ `~/.kitcode/skills`; project skills live in `./.kitcode/skills`.
252
+
253
+ Attachments support PNG, JPEG, GIF, and WebP images up to 10 MB, plus UTF-8 text files up to
254
+ 256 KB. Pasting or dragging a standalone existing path queues it automatically and displays a
255
+ chip below the prompt. File contents are sent only when the attachment is submitted with a message.
256
+
257
+ ## Development
258
+
259
+ ```sh
260
+ npm run dev # run the TypeScript entry point through tsx
261
+ npm run build # build dist/index.js
262
+ npm run typecheck # check TypeScript
263
+ npm test # run the test suite
264
+ ```
265
+
266
+ Project layout:
267
+
268
+ ```text
269
+ src/app/ application startup and runtime
270
+ src/core/ agent loop, sessions, and usage
271
+ src/providers/ Anthropic and OpenAI-compatible adapters
272
+ src/tools/ file, shell, and utility tools
273
+ src/mcp/ MCP client and tool bridge
274
+ src/ui/ Ink TUI
275
+ test/ Vitest tests
276
+ ```
277
+
278
+ ## License
279
+
280
+ MIT
package/README.ru.md ADDED
@@ -0,0 +1,275 @@
1
+ # KitCode
2
+
3
+ [English](./README.md) · Русский
4
+
5
+ ```text
6
+ ╱\_╱\
7
+ ( o.o )
8
+ > ^ <
9
+ ```
10
+
11
+ KitCode — терминальный агент для работы с кодом. Он читает и изменяет файлы, ищет по проекту,
12
+ запускает команды, подключает внешние инструменты через MCP и сохраняет историю сессий.
13
+
14
+ Интерфейс построен на TypeScript, React и Ink. Поддерживаются Anthropic API и
15
+ OpenAI-совместимые провайдеры, включая OpenRouter и локальные серверы.
16
+
17
+ ## Возможности
18
+
19
+ - потоковые ответы и отображение reasoning;
20
+ - чтение, создание и точечное редактирование файлов;
21
+ - поиск по именам и содержимому файлов;
22
+ - запуск shell-команд с подтверждением;
23
+ - режимы `normal`, `accept` и `plan`;
24
+ - продолжение и восстановление прошлых сессий с обычным scrollback терминала;
25
+ - поиск по сессиям, переименование, удаление и экспорт в Markdown;
26
+ - история введённых сообщений по клавишам `↑` и `↓`;
27
+ - очередь сообщений, пока агент занят;
28
+ - вложения PNG, JPEG, GIF, WebP и текстовых UTF-8 файлов;
29
+ - ручное и автоматическое сжатие старого контекста;
30
+ - индикатор токенов, стоимости, точного заполнения контекста и rate limits провайдера;
31
+ - автоматические чекпоинты файлов и команда `/undo`;
32
+ - автоматическое определение проверок проекта после правок;
33
+ - переключение моделей и провайдеров из TUI;
34
+ - добавление, включение, выключение и удаление MCP без перезапуска, skills и субагенты;
35
+ - команда `/checker` для проверки runtime, провайдера, сессии, контекста и MCP;
36
+ - русский и английский интерфейс, настраиваемый цвет темы.
37
+
38
+ ## Требования
39
+
40
+ - Node.js 22 или новее;
41
+ - npm.
42
+
43
+ ## Установка
44
+
45
+ ```sh
46
+ npm install -g kitcode
47
+ ```
48
+
49
+ ## Установка из исходников
50
+
51
+ ```sh
52
+ git clone https://github.com/PanicOnKernel/KitCode.git
53
+ cd KitCode
54
+ npm install
55
+ npm run build
56
+ npm link
57
+ ```
58
+
59
+ После `npm link` команда `kitcode` доступна глобально. Для запуска без глобальной установки:
60
+
61
+ ```sh
62
+ npm run dev
63
+ ```
64
+
65
+ ## Первый запуск
66
+
67
+ ```sh
68
+ kitcode
69
+ ```
70
+
71
+ При первом запуске KitCode предложит выбрать язык, ввести базовый URL API и ключ. Затем он
72
+ определит тип провайдера, загрузит доступные модели и откроет основное окно агента.
73
+
74
+ Примеры базовых URL:
75
+
76
+ ```text
77
+ https://api.anthropic.com
78
+ https://openrouter.ai/api/v1
79
+ http://localhost:11434/v1
80
+ ```
81
+
82
+ ## Командная строка
83
+
84
+ | Команда | Назначение |
85
+ | --- | --- |
86
+ | `kitcode` | Запустить TUI в текущей директории. |
87
+ | `kitcode -c` | Продолжить последнюю сессию этого проекта. |
88
+ | `kitcode -r <id>` | Восстановить сессию по идентификатору. |
89
+ | `kitcode --cwd <path>` | Использовать другую рабочую директорию. |
90
+ | `kitcode --model <provider/model>` | Запуститься с выбранной моделью. |
91
+ | `kitcode --mode <normal\|accept\|plan>` | Выбрать начальный режим работы. |
92
+ | `kitcode sessions` | Показать сохранённые сессии. |
93
+ | `kitcode ask "вопрос"` | Выполнить один запрос без TUI. |
94
+ | `kitcode add <url>` | Добавить провайдер; ключ вводится в скрытом поле. |
95
+ | `kitcode add <url> --key-env <name>` | Прочитать ключ из переменной окружения. |
96
+ | `kitcode trust` | Включить конфиг и skills текущего проекта. |
97
+ | `kitcode config` | Показать расположение конфига и ключей. |
98
+ | `kitcode config --local` | Создать конфиг проекта `./kitcode.json`. |
99
+ | `kitcode prompt list` | Показать сохранённые промты. |
100
+ | `kitcode prompt rm <slug>` | Удалить сохранённый промт. |
101
+
102
+ ## Команды внутри TUI
103
+
104
+ Нажмите `/`, чтобы открыть список команд.
105
+
106
+ | Команда | Назначение |
107
+ | --- | --- |
108
+ | `/model` | Выбрать модель. |
109
+ | `/provider` | Переключить провайдера. |
110
+ | `/login` · `/logout [provider]` | Добавить провайдера или выбрать конкретный API для выхода. |
111
+ | `/effort` · `/thinking` | Настроить глубину и отображение reasoning. |
112
+ | `/resume` · `/clear` | Восстановить сессию или начать новую. |
113
+ | `/sessions` | Найти сессию и открыть, переименовать, удалить или экспортировать её. |
114
+ | `/sessions rename <id> <название>` | Переименовать сохранённую сессию. |
115
+ | `/sessions delete all` | Удалить все сохранённые чаты после двух отдельных подтверждений. |
116
+ | `/sessions export <id> [путь]` | Экспортировать сессию в приватный Markdown-файл (по умолчанию `.kitcode-exports/`). |
117
+ | `/attach <путь>` · `/attach clipboard` · `/attach clear` | Управлять вложениями следующего сообщения. |
118
+ | `/compact` | Заменить старую часть контекста краткой сводкой модели. |
119
+ | `/subagents` | Показать текущее количество активных суб-агентов. |
120
+ | `/undo` | Откатить встроенные правки файлов из последнего сообщения. |
121
+ | `/usage` | Показать токены, запросы, стоимость, доступный баланс и rate limits, если API их отдаёт. |
122
+ | `/checker` | Проверить настройку и список моделей без платного chat-запроса. |
123
+ | `/prompt` | Вставить сохранённый промт. |
124
+ | `/prompt save <name>` | Сохранить последнее сообщение как промт. |
125
+ | `/skills` · `/mcp list` | Показать skills и состояние MCP. |
126
+ | `/mcp add <имя> <url>` | Добавить и сразу подключить MCP-сервер. |
127
+ | `/mcp enable <имя>` · `/mcp disable <имя>` | Подключить или отключить MCP без удаления. |
128
+ | `/mcp delete <имя>` | Отключить и удалить MCP-сервер. |
129
+ | `/theme` · `/lang` | Изменить тему или язык. |
130
+ | `/config` | Показать активный конфиг. |
131
+ | `/bypass` | Переключить работу без запросов подтверждения. |
132
+ | `/help` · `/exit` | Показать помощь или выйти. |
133
+
134
+ ## Клавиши
135
+
136
+ | Клавиша | Действие |
137
+ | --- | --- |
138
+ | `Enter` | Отправить сообщение или выбрать пункт. |
139
+ | `↑` / `↓` | Листать историю сообщений или пункты меню. |
140
+ | `Tab` | Дополнить slash-команду. |
141
+ | `Shift+Tab` | Переключить режим `normal → accept → plan`. |
142
+ | `Ctrl+V` / `Cmd+V` | Прикрепить картинку из системного буфера; явный запасной вариант — `/attach clipboard`. |
143
+ | `Esc` | Остановить текущий запрос или закрыть окно. |
144
+
145
+ Сообщения можно вводить, пока агент работает: они попадут в очередь и выполнятся по порядку.
146
+
147
+ ## Режимы
148
+
149
+ - `normal` — изменения файлов, shell и MCP при необходимости запрашивают подтверждение;
150
+ - `accept` — изменения файлов применяются автоматически;
151
+ - `plan` — агент исследует проект и отвечает планом без изменений.
152
+
153
+ Текущий режим, модель и usage отображаются в нижней панели, а заполняющаяся слева направо колба
154
+ контекста — справа. До 60% она зелёная, затем жёлтая, а с 85% — красная. `ctx ?` означает, что
155
+ провайдер ещё не вернул точный usage для текущей модели. Под колбой показывается количество
156
+ подключённых MCP. Завершённый вывод переносится в обычный
157
+ scrollback терминала, поэтому историю можно плавно листать даже во время потокового ответа.
158
+
159
+ При достижении 80% известного окна KitCode автоматически сворачивает старые сообщения в сводку,
160
+ оставляя последние два пользовательских хода. Команда `/compact` запускает это вручную.
161
+
162
+ Перед изменением файла встроенными инструментами `write` и `edit` KitCode создаёт приватный
163
+ чекпоинт. Команда `/undo` восстанавливает последний чекпоинт и не перезаписывает более свежие
164
+ ручные изменения. После правок KitCode определяет стандартные команды проекта — например `lint`,
165
+ `typecheck` и `test` — и перед запуском показывает их для подтверждения.
166
+
167
+ ## Конфигурация
168
+
169
+ Основные файлы KitCode:
170
+
171
+ | Путь | Содержимое |
172
+ | --- | --- |
173
+ | `~/.kitcode/config.json` | Глобальные настройки. |
174
+ | `~/.kitcode/auth.json` | Ключи провайдеров. |
175
+ | `~/.kitcode/sessions/` | Сохранённые сессии. |
176
+ | `~/.kitcode/checkpoints/` | Автоматические чекпоинты для `/undo`. |
177
+ | `~/.kitcode/prompts/` | Сохранённые промты. |
178
+ | `~/.kitcode/skills/` | Глобальные skills. |
179
+ | `./.kitcode/skills/` | Skills текущего проекта. |
180
+ | `./kitcode.json` | Локальный конфиг проекта. |
181
+
182
+ Минимальный пример ручной настройки провайдера:
183
+
184
+ ```json
185
+ {
186
+ "version": 1,
187
+ "model": "openrouter/openai/gpt-5",
188
+ "providers": {
189
+ "openrouter": {
190
+ "type": "openai",
191
+ "baseUrl": "https://openrouter.ai/api/v1",
192
+ "keyEnv": "OPENROUTER_API_KEY"
193
+ }
194
+ }
195
+ }
196
+ ```
197
+
198
+ Основные параметры: `model`, `effort`, `thinking`, `maxTokens`, `budget`, `diagnostics`, `updates`,
199
+ `theme`, `permissions`, `providers` и `mcp`. Секция `budget` задаёт лимиты запросов к модели, токенов,
200
+ примерной стоимости (если провайдер сообщает цены) и субагентов на одно сообщение.
201
+ `diagnostics.autoRun` включает проверки после правок, а `diagnostics.commands` позволяет заменить
202
+ автоопределение списком до восьми команд. Проверка обновлений через GitHub подготовлена, но по
203
+ умолчанию выключена: `updates.checkOnStart: false`; в таком состоянии сетевого запроса при старте
204
+ нет. Обычно редактировать конфиг вручную не требуется —
205
+ провайдер можно добавить при первом запуске или через `/login`.
206
+
207
+ После проверки проекта включите его локальный конфиг и skills командой:
208
+
209
+ ```sh
210
+ kitcode trust
211
+ ```
212
+
213
+ Команда `kitcode trust --revoke` снова оставит для проекта только глобальные настройки и skills.
214
+
215
+ ## MCP и skills
216
+
217
+ MCP поддерживает локальные `stdio`-серверы и удалённые HTTP-серверы. Ими можно управлять из TUI:
218
+
219
+ ```text
220
+ /mcp add docs https://mcp.example.com/mcp
221
+ /mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem .
222
+ /mcp list
223
+ /mcp disable filesystem
224
+ /mcp enable filesystem
225
+ /mcp delete filesystem
226
+ ```
227
+
228
+ Серверы сохраняются в секции `mcp`:
229
+
230
+ ```json
231
+ {
232
+ "mcp": {
233
+ "github": {
234
+ "type": "stdio",
235
+ "command": "npx",
236
+ "args": ["-y", "@modelcontextprotocol/server-github"],
237
+ "env": {
238
+ "GITHUB_TOKEN": "${env:GITHUB_TOKEN}"
239
+ }
240
+ }
241
+ }
242
+ }
243
+ ```
244
+
245
+ Skill — это директория с файлом `SKILL.md`. Глобальные skills находятся в
246
+ `~/.kitcode/skills`, проектные — в `./.kitcode/skills`.
247
+
248
+ Во вложениях поддерживаются PNG, JPEG, GIF и WebP до 10 МБ, а также UTF-8 текст до 256 КБ.
249
+ Если вставить или перетащить отдельный путь к существующему файлу, он автоматически появится
250
+ чипом под полем ввода. Содержимое отправляется провайдеру только вместе со следующим сообщением.
251
+
252
+ ## Разработка
253
+
254
+ ```sh
255
+ npm run dev # запустить исходники через tsx
256
+ npm run build # собрать dist/index.js
257
+ npm run typecheck # проверить TypeScript
258
+ npm test # запустить тесты
259
+ ```
260
+
261
+ Основные директории:
262
+
263
+ ```text
264
+ src/app/ запуск приложения и runtime
265
+ src/core/ цикл агента, сессии и usage
266
+ src/providers/ Anthropic и OpenAI-совместимые адаптеры
267
+ src/tools/ файловые, shell и служебные инструменты
268
+ src/mcp/ MCP-клиент и адаптер инструментов
269
+ src/ui/ TUI на Ink
270
+ test/ тесты Vitest
271
+ ```
272
+
273
+ ## Лицензия
274
+
275
+ MIT