cli

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package cli provides Zyra's colored terminal output: leveled log lines, the startup banner, timed build steps, and the route table printer used by the CLI and dev server. It has no dependencies beyond the standard library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildStep

func BuildStep(label string, fn func() error) error

BuildStep runs fn, logging its start, and then either a timed success message or an error message if fn fails.

func Colorize

func Colorize(color, text string) string

func Error

func Error(format string, args ...interface{})

Error prints a red-colored error log line to stderr.

func Info

func Info(format string, args ...interface{})

Info prints a cyan-colored informational log line.

func LogLine

func LogLine(color, level, format string, args ...interface{})

func PrintBanner

func PrintBanner(version string)

PrintBanner prints Zyra's startup banner, sized to fit the given version string, e.g. PrintBanner("v0.1").

func PrintRoutes

func PrintRoutes(routes []router.Route)

PrintRoutes prints a colorized startup route table.

func PrintWizardHeader

func PrintWizardHeader(title string)

PrintWizardHeader prints a styled header for CLI wizards (e.g. `zyra create`).

func Success

func Success(format string, args ...interface{})

Success prints a green-colored success log line.

func Warn

func Warn(format string, args ...interface{})

Warn prints a yellow-colored warning log line.

Types

This section is empty.

Jump to

Keyboard shortcuts

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