terminal-capability-detector

Solid

Detect terminal capabilities including color support, TTY status, size, and Unicode support for adaptive CLI output.

AI & Automation 1,160 stars 71 forks Updated today MIT

Install

View on GitHub

Quality Score: 94/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
69
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Terminal Capability Detector Detect terminal capabilities for adaptive CLI output. ## Capabilities - Detect color support levels - Check TTY status - Get terminal dimensions - Detect Unicode support - Check for CI environment - Configure adaptive output ## Generated Patterns ```typescript import process from 'process'; import tty from 'tty'; export interface TerminalCapabilities { isTTY: boolean; colorLevel: 0 | 1 | 2 | 3; supportsUnicode: boolean; columns: number; rows: number; isCI: boolean; } export function detectCapabilities(): TerminalCapabilities { const isTTY = tty.isatty(1); const isCI = Boolean(process.env.CI || process.env.CONTINUOUS_INTEGRATION); let colorLevel: 0 | 1 | 2 | 3 = 0; if (isTTY && !process.env.NO_COLOR) { if (process.env.COLORTERM === 'truecolor') colorLevel = 3; else if (process.env.TERM?.includes('256color')) colorLevel = 2; else if (process.env.TERM && process.env.TERM !== 'dumb') colorLevel = 1; } const supportsUnicode = process.platform !== 'win32' || process.env.WT_SESSION || process.env.TERM_PROGRAM === 'vscode'; return { isTTY, colorLevel, supportsUnicode, columns: process.stdout.columns || 80, rows: process.stdout.rows || 24, isCI, }; } ``` ## Target Processes - cross-platform-cli-compatibility - cli-output-formatting - progress-status-indicators

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

capability-discovery

Discover available agents, skills, quality commands (lint, test, typecheck), tech stack, verification capabilities, and LSP code intelligence features via parallel environment scanning. Use when starting implementation, creating PRs, reviewing PRs, or addressing feedback. This skill MUST be consulted because assuming tools exist causes runtime failures, and assuming they do not causes missing capabilities.

5 Updated 3 days ago
synaptiai
AI & Automation Solid

terminal-emulator

Test interactive CLI/TUI applications using @microsoft/tui-test. Use when you need to test CLI tools with interactive prompts, TUI rendering, arrow key navigation, or any command that requires a TTY. Triggers include "test CLI", "test TUI", "run interactively", "automate terminal input", "simulate user input in terminal".

21,421 Updated 1 weeks ago
slopus
Code & Development Listed

ts-parity-check

对比 TS 源(`../claude-devtools`)与 Rust 端口指定 capability 的文件映射,并查 `openspec/TS_BASELINE_DEVIATIONS.md` 看是否有该 capability 相关的 TS 偏差预警 + 当前 GitHub Issues backlog 里的相关项。**用户说 `/ts-parity-check <capability>` 或"对比一下 chunk-building 的 TS 与 Rust / 这个 cap 还有 TS 偏差吗"时都用这个 skill**——不要自己手 grep 比一遍。

1 Updated today
snowzhaozhj
AI & Automation Solid

encoding-handler

Handle text encoding across platforms including UTF-8, Windows codepages, and BOM handling.

1,160 Updated today
a5c-ai
AI & Automation Listed

cm-terminal

Use when running ANY terminal command - enforces clear progress logging, output reading, and error-stop behavior so terminal processes are never left unchecked

44 Updated today
tody-agent