TUI Clock (As Basic As It Gets)
A large, colorful terminal clock that fills most of your terminal using pure Go and ANSI escape sequences.
Screenshot

The clock dynamically scales to fit your terminal size with beautiful gradient colors.
Features
- 🎨 Colorful Display: Beautiful gradient colors for each row
- 📏 Dynamic Scaling: Automatically scales to fit your terminal size
- 🌍 Timezone Support: Display time in any IANA timezone
- ⏰ 24-Hour Format: Clean, easy-to-read time display
- 🎯 Centered Layout: Always perfectly centered with proper borders
- 🚀 Zero Dependencies: Pure Go, no external dependencies
Prerequisites
Installation
From Source
git clone https://github.com/AlexAvilov/tui-clock.git
cd tui-clock
go build -o tui-clock
Using Go Install
go install github.com/AlexAvilov/tui-clock@latest
Usage
Basic Usage
# Use local time zone
go run .
# Or if installed
tui-clock
Specify Timezone
# Use UTC
go run . -tz=UTC
# Use a specific timezone
go run . -tz=Europe/London
go run . -tz=America/New_York
go run . -tz=Asia/Tokyo
Building
# Build for current platform
go build -o tui-clock
# Build for specific platforms
GOOS=linux GOARCH=amd64 go build -o tui-clock-linux
GOOS=darwin GOARCH=amd64 go build -o tui-clock-macos
GOOS=windows GOARCH=amd64 go build -o tui-clock-windows.exe
How It Works
The clock renders in 24-hour format, hides the cursor, and responds to Ctrl+C for graceful exit. The digits scale dynamically to:
- Cover approximately 80% of the terminal height
- Expand horizontally to roughly 90% of the available width
- Stay perfectly centered with at least a single-character border
The scaling algorithm ensures the clock never overflows your terminal while maximizing the display size.
Controls
License
MIT License - see LICENSE file for details.