This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
ccsay is a joke CLI tool that displays text in ASCII art similar to cowsay. It renders text using block-style Unicode characters in orange color (ANSI escape code). By default, it displays "CLAUDE CODE" but accepts custom text as command-line arguments. It supports color customization and help options.
This project uses Bun as the JavaScript runtime. Ensure Bun is installed:
curl -fsSL https://bun.sh/install | bash
source ~/.bashrc# Install dependencies
bun install
# Run in development
bun run dev
bun run src/index.ts "YOUR TEXT"
bun run src/index.ts --help # Show help
# Run tests
bun test
bun test --watch
# Lint and format
bun run lint # Check for issues
bun run lint:fix # Fix auto-fixable issues
bun run format # Format code
# Build standalone binary
bun run build # Creates bin/ccsay-standaloneccsay/
├── src/
│ ├── index.ts # CLI entry point
│ └── fonts.ts # ASCII art font definitions
├── test/
│ ├── fonts.test.ts # Font tests
│ └── index.test.ts # CLI tests
├── biome.json # Formatter/linter config
├── vitest.config.ts # Test runner config
└── package.json # Project configuration
- Runtime: Bun (fast JavaScript runtime)
- Language: TypeScript
- Formatter/Linter: Biome (fast, unified toolchain)
- Test Runner: Vitest
- Build: Bun's built-in compiler for standalone executables
The project consists of two main modules:
fonts.ts: Contains the BLOCK_FONT dictionary mapping characters to 6-line ASCII art arraysindex.ts: CLI interface that processes arguments, handles help flags, and outputs colored ASCII art
Tests are written using Vitest and cover:
- Font character availability (A-Z, 0-9, punctuation)
- Text-to-ASCII conversion logic
- CLI argument parsing (color flags, help flags)
- Help functionality and output formatting
- Edge cases (empty strings, unknown characters)