This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
sysc-Go is a terminal animation library for Go that provides multiple visual effects with customizable color themes. The project includes a Go library (animations/), a plain CLI (syscgo), a Bubble Tea TUI (syscgo-tui), and a FIGlet font converter (flf2bit).
# Build individual binaries
go build -o syscgo ./cmd/syscgo/
go build -o syscgo-tui ./cmd/syscgo-tui/
go build -o flf2bit ./cmd/flf2bit/
# Build all packages
go build ./...
# Run all tests
go test ./...
# Run specific test
go test -run TestName ./animations/
# Run with verbose output
go test -v ./...
# Lint
golangci-lint run# Default (fire effect, dracula theme, 10 seconds)
./syscgo
# Specific effect and theme
./syscgo -effect matrix -theme nord -duration 30
# Text-based effect with file input
./syscgo -effect decrypt -theme tokyo-night -file message.txt -duration 15
# Infinite duration
./syscgo -effect skull-text -file art.txt -theme rama -duration 0
# Launch interactive TUI
./syscgo-tui
# Convert FIGlet font to .bit format
./flf2bit myfont.flf output.bitAll effects (particle: fire, matrix, rain, fireworks, aquarium, beams; text: fire-text, matrix-art, rain-art, beam-text, ring-text, blackhole, pour, print, decrypt; scene: skull, skull-text, burn)
All themes: dracula, gruvbox, nord, tokyo-night, catppuccin, material, solarized, monochrome, transishardjob, rama, eldritch, dark
sysc-Go/
├── animations/ # Core library: effects, palettes, registry, interfaces
├── tui/ # Bubble Tea TUI (syscgo-tui binary)
├── cmd/syscgo/ # Plain CLI
├── cmd/syscgo-tui/ # TUI entry point
├── cmd/flf2bit/ # FIGlet → .bit font converter
└── examples/ # Usage examples
type Animation interface {
Update() // Advance one frame
Render() string // Return frame as string
Reset() // Restart animation
}
// Optional: effects that support runtime text changes
type TextUpdatable interface {
SetText(text string)
}Palette system: Each effect has a Get*Palette(theme string) []string function returning hex colors. animations/palettes.go centralizes all theme definitions.
Effect registry: animations/registry.go exports EffectRegistry and ThemeRegistry with metadata (name, category, RequiresText flag, version added). Use IsTextBasedEffect(name) to check if an effect requires a -file input.
Effect configuration: Complex effects use dedicated config structs (e.g., DecryptConfig, PourConfig, PrintConfig) passed to constructors.
Full interactive UI built with Bubble Tea. The Model struct manages:
- Animation selector (effect, theme, file, duration) with live preview
- Custom text editor (
editorMode) with save/export to assets - BIT text editor (
bitEditorMode): banner text renderer using.bitJSON fonts (converted from FIGlet.flffiles viaflf2bit). Supports gradient, shadow, scale, alignment, kerning.
Assets (.txt files) are discovered from the assets/ directory and shown in the file selector.
When adding a new effect:
- Create effect struct with width, height, palette, and internal state
- Implement
Animationinterface; implementTextUpdatableif the effect takes text input - Add palette function to
animations/palettes.go - Add entry to
EffectRegistryinanimations/registry.go - Add effect runner to
cmd/syscgo/main.go(switch statement + runner function) - Add to the
animationslist intui/model.go(NewModel) - Wire up in
tui/animfactory.go - Implement
Resize(width, height int)if the effect needs to handle terminal resize
github.com/charmbracelet/lipgloss/v2- Terminal styling (animations)github.com/charmbracelet/bubbletea+bubbles+lipglossv1 - TUIgolang.org/x/term- Terminal size detectiongonum.org/v1/gonum- Math for physics-based effects
- Target 20 FPS:
time.Sleep(50 * time.Millisecond)in CLI;tea.Tick(50ms)in TUI - Duration:
frames = duration * 20(0 = infinite)
fmt.Print("\033[2J\033[H") // Clear screen (setup)
fmt.Print("\033[?25l") // Hide cursor
fmt.Print("\033[H") // Move to top (per frame)
fmt.Print("\033[?25h") // Show cursor (cleanup)- Normalize line endings with
normalizeMultilineText()(incommon.go) before processing any text input - Use
wrapText(text, width)incmd/syscgo/main.goto fit terminal width for text-based effects
- Add a case for the theme name in every palette function in
animations/palettes.go - Define 3–9 hex colors progressing from background to highlights
- Add a
ThemeMetadataentry toThemeRegistryinanimations/registry.go - Add to CLI help text in
cmd/syscgo/main.goand the themes slice intui/model.go
Fire / Fire-Text: PSX DOOM heat propagation. Bottom row is heat source; flames rise with horizontal randomness. fire-text uses text as negative space cut from the fire.
Matrix / Matrix-Art: Streams fall at varying speeds with fade trails. matrix-art overlays ASCII art as the reveal target.
Skull / Skull-Text: Skull drips with gravity; sequential accent illumination (top → eyes → cheekbones → teeth); two-layer ash particle system with wind drift. skull-text adds text sliding in from edges with easeOutBack bounce.
Decrypt: Multi-phase (typing → scramble → gradient reveal). Cycles random characters before showing final text.
Pour: Text pours from configurable direction with physics-based movement and gradient transitions.
IMPORTANT: When making commits to this repository:
- Commit only when explicitly requested by the repository owner
- Author attribution MUST be:
- Username:
Nomadcxx - Email:
noovie@gmail.com
- Username:
- NEVER add AI/Claude attribution — no Co-authored-by tags, no commit messages referencing AI assistance
- Pushing to remote is allowed as long as attribution rules are followed
PascalCasefor exported identifiers,camelCasefor unexported- Document all exported functions, types, and methods
- Group imports: standard library, third-party, internal
- Wrap errors with context using
fmt.Errorf - Animation timing must be frame-based, not time-based
- Configuration via dedicated structs, not variadic parameters
- Effects must gracefully handle small terminal sizes