⚡ anix-ctx
Интерактивный упаковщик контекста проекта для LLM (Gemini, ChatGPT, Claude) в тёмном неоновом стиле экосистемы ANIX.
Одной командой открывает быстрый TUI, где можно визуально выбрать нужные файлы проекта, увидеть реальный расход токенов и скопировать всё в буфер обмена в идеальном Markdown-формате с ASCII-деревом файлов.
✨ Возможности
- 🚀 Мгновенный запуск:
anix-ctxв любой папке открывает интерактивный TUI. - 🛡 Умная фильтрация: автоматически игнорирует
.git,node_modules,__pycache__,.venv, лок-файлы (package-lock.json,poetry.lock,uv.lockи др.), бинарные файлы и любые правила из.gitignore/.ignore. - ⚡ Кэшированная статистика: переключение чекбоксов не нагружает диск — токены и символы пересчитываются мгновенно из оперативной памяти.
- 📊 Живая аналитика: точный подсчёт символов, оценка токенов (
chars // 4), Top-5 самых тяжёлых файлов и превью ASCII-дерева в реальном времени. - 🔒 Защита разметки: адаптивный динамический fence (минимум
````) гарантирует, что вложенные блоки кода и.mdфайлы не сломают Markdown. - 🌐 Безопасная кодировка: чтение файлов с
utf-8и заменой некорректных символов (errors="replace"), полная кроссплатформенность (Windows, Linux, macOS). - ⚡ Быстрый режим (Headless): флаги
--copy(-c) и-o context.mdдля мгновенной сборки контекста без открытия интерфейса.
📦 Установка
# Клонирование или установка в режиме разработки
git clone https://github.com/anix/anix-ctx.git
cd anix-ctx
pip install -e .
Либо сборка стандартного wheel:
python -m build
pip install dist/anix_ctx-*.whl
🎮 Использование
1. Интерактивный TUI (по умолчанию)
# Открыть TUI для текущей директории
anix-ctx
# Открыть TUI для конкретной папки
anix-ctx /path/to/project
Горячие клавиши в TUI:
| Клавиша | Действие |
|---|---|
Space |
Переключить выбор текущего файла или всей папки |
Enter / Клик |
Раскрыть/свернуть папку или переключить файл |
a |
Выбрать все / Снять выбор со всех файлов |
c |
Скопировать готовый Markdown-контекст в буфер обмена |
s |
Сохранить контекст в файл context.md |
q |
Выйти из программы |
2. Быстрый headless-режим (без TUI)
# Упаковать текущий проект и сразу скопировать в буфер обмена
anix-ctx --copy
anix-ctx -c
# Упаковать проект в файл context.md
anix-ctx -o context.md
# Упаковать конкретную подпапку сразу в буфер
anix-ctx src/ --copy
📋 Формат вывода Markdown
Контекст упаковывается в чистую и готовую для промпта структуру:
# Project Context
## File Tree
anix-ctx ├── src/ │ └── anix_ctx/ │ ├── init.py │ ├── cli.py │ ├── formatter.py │ ├── scanner.py │ └── tui.py ├── pyproject.toml └── README.md
## Files
### `pyproject.toml`
````toml
...
src/anix_ctx/cli.py
...
---
## 🛠 Стек
- **Python**: 3.10+
- **TUI Framework**: [Textual](https://github.com/Textualize/textual)
- **Gitignore Engine**: [PathSpec](https://github.com/cpburnz/python-pathspec)
- **Clipboard**: [Pyperclip](https://github.com/asweigart/pyperclip)
- **Лицензия**: MIT (ANIX Ecosystem)
Metadata
Release files for anix-ctx 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anix_ctx-0.1.0.tar.gz | 11.8 kB | Without provenance | Details for anix_ctx-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anix_ctx-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for anix_ctx-0.1.0-py3-none-any.whl |
Total release size: 25.8 kB
Release files / anix_ctx-0.1.0.tar.gz
| Download URL | anix_ctx-0.1.0.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9fca55899ac1acbd2328c3d9e55da0283dcdb1e66585a27a685550defc7a869e
|
|
BLAKE2b-256 checksum How to use checksums |
88c7c370c5fbea846f9bd88144a5d5b30cda28f34ff767ea1732442d5df644f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / anix_ctx-0.1.0-py3-none-any.whl
| Download URL | anix_ctx-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79210f31b05288e19fa183d9d65d80c498a449a1c7f71d3074a3f033ef8d1cb6
|
|
BLAKE2b-256 checksum How to use checksums |
3829c80238f91f5c50a9df508ac557545a786e3ea7493a0dd1ed62066a22318e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Security for anix-ctx 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.