ui

package
v6.16.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2026 License: Apache-2.0 Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package ui provides user interface components for KSail CLI.

This package contains subpackages for terminal-based user interaction:

  • asciiart: ASCII art rendering with color formatting for logos and graphics
  • errorhandler: Cobra command execution with error formatting and normalization

Related packages for user interaction (located in pkg/utils):

  • pkg/utils/notify: Formatted message display with symbols, colors, and timing information
  • pkg/utils/timer: Execution time tracking for single-stage and multi-stage operations

The ui package components work together with the utils packages to provide a consistent, user-friendly command-line interface experience with colorized output, timing information, and proper error handling.

Example usage:

// Display ASCII logo
asciiart.PrintKSailLogo(os.Stdout)

// Track command execution time
timer := timer.New()
timer.Start()
// ... perform operation ...
notify.WriteMessage(notify.Message{
    Type:    notify.SuccessType,
    Content: "Operation complete",
    Timer:   timer,
})

// Execute Cobra command with error handling
executor := errorhandler.NewExecutor()
err := executor.Execute(rootCmd)

Directories

Path Synopsis
Package asciiart provides ASCII art printing functionality for KSail.
Package asciiart provides ASCII art printing functionality for KSail.
Package chat provides an interactive Bubbletea TUI for conversing with GitHub Copilot.
Package chat provides an interactive Bubbletea TUI for conversing with GitHub Copilot.
Package confirm provides confirmation prompt utilities for destructive operations.
Package confirm provides confirmation prompt utilities for destructive operations.
Package errorhandler centralizes Cobra command execution with KSail's error formatting rules.
Package errorhandler centralizes Cobra command execution with KSail's error formatting rules.
Package picker provides a reusable interactive list picker built on bubbletea.
Package picker provides a reusable interactive list picker built on bubbletea.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL