diff --git a/home-configs/claude/README.md b/home-configs/claude/README.md new file mode 100644 index 0000000..1ca2a52 --- /dev/null +++ b/home-configs/claude/README.md @@ -0,0 +1,28 @@ +# Claude Code configuration + +## Statusline (`statusline-command.sh`) + +The custom statusline script renders **only ASCII-safe characters and ANSI color codes**: + +- ASCII brackets `[ ]` for git branch and effort level +- ANSI 256-color escape sequences for model names, effort levels, and rate-limit percentages +- The `¥` symbol (U+00A5) for CNY balance in DeepSeek output + +It does **not** use Nerd Font glyphs, powerline separators, or emoji. + +### Unicode symbols you may see in the TUI + +Some symbols that appear in the Claude Code interface are **rendered by Claude Code's own TUI**, not by this statusline script. For example, arrow symbols such as `⏵` (used before "bypass permissions on" prompts) are drawn by Claude Code itself. + +If these symbols display as boxes or question marks, install a Unicode-capable font such as: + +- **Noto Color Emoji** (recommended on Linux) +- Any terminal font with full Unicode support + +To install Noto Color Emoji on Debian/Ubuntu: + +```bash +sudo apt-get install -y fonts-noto-color-emoji +``` + +The statusline script itself does not require emoji fonts. diff --git a/scripts/ai-setup.sh b/scripts/ai-setup.sh index 5c08f60..06b8b5a 100755 --- a/scripts/ai-setup.sh +++ b/scripts/ai-setup.sh @@ -35,6 +35,23 @@ if ! command -v python3 &>/dev/null; then fi success "Python 3 найден" +info "Проверяю зависимости (jq)..." +if ! command -v jq &>/dev/null; then + info "Устанавливаю jq (нужен sudo)..." + if command -v apt-get &>/dev/null; then + sudo apt-get install -y jq + elif command -v dnf &>/dev/null; then + sudo dnf install -y jq + else + warn "Не удалось установить jq автоматически. Установите вручную." + fi +fi +if command -v jq &>/dev/null; then + success "jq найден" +else + warn "jq не найден. statusline-command.sh и некоторые функции могут не работать." +fi + # ── VLESS URL parser ─────────────────────────────────────────── # Принимает vless:// URL, устанавливает переменные VL_* parse_vless_url() { @@ -857,15 +874,9 @@ else if [ -n "$existing" ]; then success "Маркетплейс claude-plugins-official уже добавлен" else - # Берём токен из env или спрашиваем + # Берём токен только из env; в неинтерактивном режиме не спрашиваем if [ -z "$GITHUB_TOKEN" ]; then - echo "" - echo "Для установки плагинов Claude нужен GitHub Personal Access Token." - echo "Создать можно на: https://github.com/settings/tokens (без scope, только public repos)" - read -rp "GitHub PAT (или Enter чтобы пропустить): " GITHUB_TOKEN - fi - if [ -z "$GITHUB_TOKEN" ]; then - warn "Токен не указан, маркетплейс плагинов не настроен" + warn "GITHUB_TOKEN не задан, пропускаю настройку маркетплейса плагинов" warn "Позже запустите: claude plugin marketplace add https://TOKEN@github.com/anthropics/claude-plugins-official.git" else if claude plugin marketplace add "https://${GITHUB_TOKEN}@github.com/anthropics/claude-plugins-official.git" 2>&1; then