btk-automation

Add colorized logging functions to Bash scripts using tput.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/SpicyDogWings/btk-skill.md --skill btk-automation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: btk-automation
Source: https://github.com/SpicyDogWings/btk-skill.md/tree/main/btk-automation
Command: npx skills add https://github.com/SpicyDogWings/btk-skill.md --skill btk-automation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

BTK is a Bash ToolKit that provides an advanced colored logging system to improve debuggability and the user experience in terminal scripts.

Core Features & Use Cases

  • Colored Logging: Functions for log_error, log_success, log_warning, log_info, log_debug with customizable styles.
  • Mode Detection: Detects and adjusts colors automatically for light and dark modes.
  • Portability: Uses tput to ensure compatibility across terminals.

Quick Start

Source btk.sh in your Bash script to begin using the logging functions.

Frequently Asked Questions about btk-automation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add colorized logging to my Bash scripts?

You can add colorized logging to Bash scripts by sourcing a toolkit that provides functions like log_error, log_success, and log_info to output styled terminal messages. This improves script debuggability and readability.

Does Bash colored output work in both light and dark terminal modes?

Yes, Bash colored output can work in both light and dark terminal modes by using a logging toolkit with automatic mode detection. This adjusts the colors dynamically to ensure logs remain readable across different terminal themes.

How do I ensure cross-terminal compatibility for colored Bash logs?

To ensure cross-terminal compatibility for colored Bash logs, use a logging system built on tput. This utility manages terminal capabilities safely, providing consistent styled output without relying on hard-coded escape sequences.

What are the requirements for using a Bash logging toolkit with tput?

The requirements for using a Bash logging toolkit with tput are having tput available in your environment and running Bash version 4.0 or higher. These prerequisites ensure safe usage patterns and non-destructive runtime behavior.

What is the best way to improve terminal script debugging readability?

The best way to improve terminal script debugging readability is to implement a colorized logging system that categorizes output into levels like error, warning, and info. Styled logs help you quickly identify issues during execution.

Why does my Bash colored output break on different terminals?

Bash colored output often breaks on different terminals due to incompatible hard-coded ANSI escape sequences. Using a logging toolkit powered by tput resolves this by querying terminal capabilities to apply colors safely.