clix library

Clix - A comprehensive CLI development toolkit for Dart

Complete CLI solution combining logging, styling, prompts, and progress tracking

Combines the best features of Interact, Tint, and Durham Logger into a single, cohesive package for building interactive CLI applications.

Core Features:

  • Advanced Styling: Colors, themes, and formatting
  • Rich Logging: Multiple levels with timestamps and styling
  • Interactive Prompts: Input, select, confirm, and more
  • Progress Tracking: Bars, spinners, and multi-task progress
  • Data Tables: Formatted table output with alignment
  • Configuration: Easy setup and customization
  • Testing Utilities: CLI testing tools and helpers

Quick Start:

import 'package:clix/clix.dart';

void main() {
  // Simple logging
  Clix.logger.info('Hello from Clix!');

  // Interactive prompt
  final name = InputPrompt('What is your name?').ask();

  // Progress tracking
  final progress = Progress(total: 100);
  progress.update(50);
}

Classes

ArgParser
A class for taking a list of raw command line arguments and parsing out options and flags from them.
ArgResults
The results of parsing a series of command line arguments using ArgParser.parse.
BasicFormatter
CliArgResults
Enhanced wrapper for ArgResults with Clix utilities
CliArgsHelper
Utility class for enhanced args functionality with Clix styling
CliColor
CLI Color System - Comprehensive terminal color management
CliConfig
Configuration manager for CLI applications
CliFormatter
CliIO
CliLogger
🎯 CliLogger - Main logging class with comprehensive CLI features
CliParser
Wrapper class that enhances the args package with Clix styling and utilities
CliStyle
CliStyle - Advanced text styling and visual effects
CliTestResult
Represents the result of executing a CLI command or test.
CliTestRunner
A utility class for running and testing CLI commands.
CliTestSummary
Summary of multiple test results
CliTheme
Clix
Main Clix class - Global access point for CLI operations
ConfigValue
Configuration value with validation and metadata
Confirm
🤔 Confirm Class - Yes/No confirmation prompt
ConsoleIO
Decimal
Input
📝 Input Class - Text input prompt with validation
MultiSelect
MultiSpinner
MultiSpinner for managing multiple concurrent tasks
Number
Password
Progress
📊 Progress Class - Visual progress tracking bar
Prompt<T>
Select
🎯 Select Class - Single selection menu prompt
Spinner
🌀 Spinner Class - Animated loading indicator
SpinnerTask
Individual task in MultiSpinner
Table
TableColumn

Enums

CliIcons
Collection of predefined icons for CLI applications.
HintSymbol
Enum for hint symbols and separators
IndentLevel
LineSpacing
Enum for controlling spacing between lines in multi-line logging
LogLevel
Padding
Enum for controlling padding inside background colors
PointStyle
ProgressStyle
Different styles for displaying progress bars
Spacing
Enum for controlling spacing between elements
SpinnerType
Types of animated symbols available for spinner animations
TableAlignment
Enum for table column text alignment options
TaskStatus
Status of individual tasks in multi-task operations
TreeSymbol

Exceptions / Errors

ArgParserException
An exception thrown by ArgParser.
CliArgException
Custom exception for CLI argument parsing errors
CliConfigException
Exception thrown when configuration operations fail