Expand description
Utilities: logging, clipboard, file operations, syntax highlighting
Constants§
- SUPPORTED_
LANGUAGES - Supported languages: (display name, aliases for CLI)
Functions§
- copy_
to_ clipboard - Copy text to system clipboard (macOS/Windows/Linux via arboard).
- from_
extension - Suggest language from file extension (e.g. “.rs” -> “rust”).
- from_
prompt - Suggest language from prompt (simple keyword heuristic).
- highlight_
to_ ansi - Highlight code to ANSI-colored string for terminal. Returns original code if no syntax found.
- is_
supported - Return true if
langis a supported language or alias. - normalize
- Normalize language (alias -> canonical name).
- read_
file - Read entire file as string.
- setup_
logging - Initialize logging from verbosity and debug flags. Call once at startup after parsing args.
- write_
file - Write content to a file. Creates parent dirs if needed.