Skip to content

thomasxm/haro-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Haro Code

Haro Code

Gundam-Themed Terminal Coding Agent

Version Bun TypeScript Licence Tools Agents Source Files Themes

Install with Bun

A Gundam-themed terminal coding agent with Haro's personality — full interactive TUI, 40+ built-in tools, multi-agent orchestration, and a Haro companion buddy.

Quick Start · Architecture · Haro UI Library · Project Structure · Disclaimer

Author: medjedtxm

Note This project is a non-commercial, educational derivative work. It is not affiliated with, endorsed by, or associated with Anthropic. See the Disclaimer section for full details.


What is Haro Code?

Haro Code is a themed fork of a terminal-based AI coding agent. It replaces the default branding, colours, spinner animations, and companion sprites with a Gundam/Haro aesthetic — Haro green, Federation blue, Gundam gold, and Char's red.

What Changed

Component Default Haro Code
Brand colour Orange Haro green rgb(0,204,102)
System spinner Blue Gundam gold rgb(255,204,0)
Permission prompts Blue Federation blue rgb(0,102,204)
Auto-accept Violet Char red rgb(255,51,51)
Fast mode Default Char red ("3x faster!")
Spinner animation ['·', '✢', '✳', '✶', '✻', '✽'] ['◉', '◎', '●', '○', '●', '◎'] (bouncing ball)
Status glyph (teardrop asterisk) (Haro's eye)
Buddy system 18 species 19 species (Haro added with ear-flap animation)
Plan mode Teal Tactical green rgb(0,153,76)
Version 2.x.x 1.0.0

All 6 theme variants are themed: dark, light, dark-ansi, light-ansi, dark-daltonised, light-daltonised.


Quick Start

Prerequisites

  • Bun >= 1.3.x
  • Valid Anthropic API key or OAuth login

Install and Run

git clone <repo-url> haro-code
cd haro-code

# Install dependencies
bun install

# Run interactive mode (needs TTY + API key)
export ANTHROPIC_API_KEY="your-key"
bash bin/haro-code

# Or headless print mode
bash bin/haro-code -p "your prompt" --output-format text

# Version check
bash bin/haro-code --version
# 1.0.0 (Haro Code)

Recovery Mode

If the full Ink TUI fails to start:

CLAUDE_CODE_FORCE_RECOVERY_CLI=1 bash bin/haro-code

This launches a simple readline REPL without the terminal UI.


Architecture

Haro Code is a full-featured terminal coding agent with:

Core Systems

User Input (Natural Language)
    |
    v
Interactive TUI (React Ink)
    |
    v
Tool Orchestration (40+ tools)
    |-- Bash / PowerShell execution
    |-- File Read / Write / Edit / Glob / Grep
    |-- LSP integration
    |-- Web Fetch / Web Search
    |-- MCP server connections
    |-- Agent spawning (sub-agents)
    |-- Task management
    |-- Notebook editing
    v
Claude API (Anthropic Messages API)
    |
    v
Response Rendering (themed output)

Multi-Agent System

Built-in agent types:

Agent Role Description
Plan Planner Read-only codebase exploration and implementation planning
Explore Research Fast codebase search and analysis
general-purpose Generator Full coding agent with all tools
verification Evaluator Adversarial testing — tries to break implementations
claude-code-guide Help Documentation and usage guidance
statusline-setup Config Terminal status line configuration

Swarm Orchestration

Multi-agent coordination with multiple backends:

  • In-process: agents run as concurrent tasks
  • tmux: agents in separate tmux panes
  • iTerm2: agents in native iTerm tabs

Coordinator/worker pattern with permission delegation across agents.

Dream System

Background memory consolidation ("Dream") that runs between sessions:

  • Time-gated (minimum hours between consolidations)
  • Session-gated (minimum sessions before triggering)
  • Lock-protected against concurrent runs
  • Runs as a forked sub-agent with its own context

Buddy Companion

Deterministic Tamagotchi-style companion pet:

  • 19 species (duck, goose, blob, cat, dragon, octopus, owl, penguin, turtle, snail, ghost, axolotl, capybara, cactus, robot, rabbit, mushroom, chonk, haro)
  • Haro sprite: 3-frame ear-flap animation
  • Rarity system: common (60%), uncommon (25%), rare (10%), epic (4%), legendary (1%)
  • Deterministic from user ID (Mulberry32 PRNG)

Haro UI Component Library

Included at haro-ui/ — a standalone Gundam-themed CSS component library and Claude skill.

Files

File Lines Purpose
SKILL.md 309 Claude skill definition — guides Gundam UI generation
haro-ui.css 790 Full CSS library with HUD effects
demo.html 363 Complete dashboard demo
components/crt-effects.css 106 Standalone HUD scanline effects
components/ms-card.html 117 Mobile Suit status card demo
components/mission-log.html 192 Mission log event terminal demo

Colour System

Token Hex Role
--haro-green #00CC66 Primary brand, headers, nominal data
--federation-blue #0066CC Wireframes, links, structure
--zeon-red #CC0000 Alerts, warnings, emergencies
--gundam-gold #FFCC00 Highlights, accents, rankings
--space-black #0A0A0F Background void
--steel-gray #B0B0B8 Secondary text
--newtype-cyan #00E5FF Special indicators

Typography

  • Saira Extra Condensed (700-800) — compressed display titles
  • JetBrains Mono (400-700) — data readouts, terminal text
  • Noto Sans JP (500-700) — Japanese text (Mobile Suit names in katakana)
  • Orbitron (400-700) — futuristic labels

Emergency Mode

Toggle Red Comet mode:

document.documentElement.dataset.mode = 'red-comet';

All greens shift to Char's red, scanlines speed up, pulsing red overlay.

Install as Claude Skill

mkdir -p ~/.claude/skills/haro-ui
cp haro-ui/SKILL.md ~/.claude/skills/haro-ui/SKILL.md

Then ask Claude: "Build me a tactical dashboard in Haro UI style."


Project Structure

haro-code/
├── bin/haro-code              # Entry point (bash -> bun)
├── preload.ts                 # Runtime MACRO injection (version, branding)
├── package.json               # Dependencies (62 packages)
├── bunfig.toml                # Bun runtime configuration
├── tsconfig.json              # TypeScript configuration
├── src/
│   ├── main.tsx               # Main entry (4,696 lines)
│   ├── entrypoints/cli.tsx    # CLI entry point
│   ├── utils/theme.ts         # 6 Haro-themed colour palettes
│   ├── buddy/                 # Companion system (Haro sprite)
│   │   ├── types.ts           # Species, rarity, eyes, hats
│   │   ├── sprites.ts         # ASCII art (19 species)
│   │   ├── companion.ts       # Deterministic generation
│   │   └── prompt.ts          # Soul generation prompt
│   ├── components/Spinner/    # Bouncing ball spinner
│   ├── constants/figures.ts   # Terminal glyphs (◉)
│   ├── tools/                 # 40+ tool implementations
│   │   ├── AgentTool/         # Multi-agent system
│   │   ├── BashTool/          # Shell execution
│   │   ├── FileEditTool/      # File editing
│   │   └── ...
│   ├── coordinator/           # Swarm coordinator
│   ├── services/autoDream/    # Background memory consolidation
│   └── ink/                   # Custom React Ink terminal renderer
├── stubs/                     # Native module stubs
└── haro-ui/                   # Gundam UI component library
    ├── SKILL.md               # Claude skill definition
    ├── haro-ui.css            # CSS library (790 lines)
    ├── demo.html              # Full dashboard demo
    └── components/            # Individual component demos

Modified Files from Base

File Change
src/utils/theme.ts All 6 theme palettes -> Haro/Gundam colours
src/buddy/types.ts Added haro species
src/buddy/sprites.ts 3-frame Haro ASCII art (ear-flap animation)
src/components/Spinner/utils.ts Bouncing ball spinner ['◉', '◎', '●', '○', '●', '◎']
src/constants/figures.ts Status glyph ->
src/components/LogoV2/Clawd.tsx Haro spherical logo with dark eyes and ear flaps
src/utils/autoUpdater.ts Version gate bypassed for local fork
src/localRecoveryCli.ts Rebranded to haro-code
preload.ts Version 1.0.0, package haro-code
package.json Name haro-code, bin haro-code

Disclaimer

This project is a non-commercial, educational derivative work created for research and learning purposes only.

The underlying source code structure is derived from the Claude Code v2.1.88 source, which was publicly exposed via a sourcemap file (.map) accidentally included in the @anthropic-ai/claude-code npm package on 31 March 2026. The source was extracted from the sourcesContent field of the sourcemap — no reverse engineering, decompilation, or circumvention of access controls was performed.

This project is not affiliated with, endorsed by, or associated with Anthropic in any way.

Terms of Use

  • No commercial use. This project must not be used for any commercial purpose, sold, sublicensed, or distributed for profit.
  • Educational and research use only. Use is limited to studying coding agent architecture, terminal UI design patterns, and multi-agent orchestration techniques.
  • No redistribution of the original source. Do not republish, repackage, or redistribute the underlying source code outside the context of this themed fork.

Removal Upon Request

The author (medjedtxm) will promptly remove this repository and all associated materials upon request from Anthropic or any authorised representative of the original rights holder. To request removal, please open an issue on this repository or contact the author directly.

What Was Modified

All theming, branding, colours, sprites, UI components, the Haro UI library, and documentation are original work by medjedtxm, licensed under GPL-3.0. The modifications are documented in the "Modified Files from Base" section above. A // Copyright (C) 2026 medjedtxm — Haro Code (GPL-3.0) header has been added to all source files.


Licence

Original modifications and additions: GPL-3.0 (see LICENSE)

Underlying source code structure: Proprietary to Anthropic. Used here under fair use for non-commercial educational research only.


Author: medjedtxm

About

Gundam-themed terminal coding agent (from Claude code) with Haro personality

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages