https://github.com/gabisonia/tsartsi
Go package for styling terminal output with ANSI escape codes.
https://github.com/gabisonia/tsartsi
ansi escape-codes go golang terminal
Last synced: 2 months ago
JSON representation
Go package for styling terminal output with ANSI escape codes.
- Host: GitHub
- URL: https://github.com/gabisonia/tsartsi
- Owner: gabisonia
- Created: 2025-01-07T15:43:36.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-07T16:05:07.000Z (over 1 year ago)
- Last Synced: 2025-10-26T23:52:58.905Z (9 months ago)
- Topics: ansi, escape-codes, go, golang, terminal
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tsartsi - ცარცი - Chalk 🖍️
Tsartsi (Georgian: **ცარცი**) means chalk, it is a lightweight Go package for styling terminal output with ANSI escape codes. It allows you to add colors, background colors, and text styles like bold or underline, making your console output visually appealing.
## Purpose
This project is part of my journey to learn and practice Go. While it may not be a production-ready or professional-grade package, it serves as a hands-on way to explore Go's features, modules, and test writing.
Feel free to use it for learning purposes or experiment with it in your own projects!
## Features
🎨 Foreground Colors: Red, Green, Blue, etc.
🖌️ Background Colors: White, Black, Yellow, etc.
✨ Text Styles: Bold, Underline, Invert, etc.
## Installation
To install the Tsartsi package, run:
```bash
go get github.com/gabisonia/tsartsi
```
## Usage
Here’s how to use Tsartsi in your Go projects:
```go
package main
import (
"github.com/gabisonia/tsartsi"
)
func main() {
style := tsartsi.NewStyle(tsartsi.Red, tsartsi.BgWhite, tsartsi.Bold)
style.Println("Hello, Tsartsi!")
}
```
## Testing
This package includes a test suite to ensure everything works as expected.
To run the tests, use:
```bash
go test ./...
```
## License
Tsartsi is fully free to use, modify, and distribute for any purpose, personal or commercial.
No attribution is required, but contributions and feedback are always welcome!