Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 41 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<p align="center">
<b>Random hypercar art in your terminal.</b><br>
One of the first open-source projects to bring curated automotive art to terminal startup screens.<br>
633 curated cars across 24 brands, verified free-license, mixed with system info via fastfetch.
690 curated cars across 29 brands, verified free-license, mixed with system info via fastfetch.
</p>

<p align="center">
Expand Down Expand Up @@ -36,12 +36,12 @@ The tool is a single Go binary. Nothing runs in the background. Nothing writes o

## Features

- **633 cars, 24 brands, 1940s → 2020s.** Ferrari, Lamborghini, McLaren, Pagani, Koenigsegg, Bugatti, Porsche, Rolls-Royce, Aston Martin, Lotus, Rimac, Hennessey, plus Japanese and American icons.
- **690 cars, 29 brands, 1940s → 2020s.** Ferrari, Lamborghini, McLaren, Pagani, Koenigsegg, Bugatti, Porsche, Rolls-Royce, Aston Martin, Lotus, Rimac, Hennessey, plus Japanese and American icons.
- **Every image is free-license.** CC0, CC BY, CC BY-SA, GFDL, Public Domain, or Free Art. Every image ships with a JSON attribution file. See [`CREDITS.md`](CREDITS.md).
- **Smart lookup.** Type `--car chiron` or `--car "rolls royce ghost"` or `--car "porsche 911"` — it resolves aliases, matches by tokens, corrects typos, and shows a numbered picker when multiple cars fit.
- **Real images or ANSI fallback**, chosen automatically based on your terminal's capabilities. Force one mode with `--set-mode auto|ansi`.
- **Pokemon mixing is opt-in.** The installer asks; you can toggle later with `--set-mix on|off`.
- **Vintage cars are opt-in.** Default install is modern (2000+). Add pre-2000 cars any time with `./install-vintage.sh`.
- **Vintage cars are opt-in.** Default install is modern (2000+). Add pre-2000 cars any time with `--install-vintage` or `./install-vintage.sh`.
- **`--doctor`** health check tells you exactly what's wrong when something isn't working.
- **Contributor scripts** for adding new cars (`add_car.py`) or replacing existing images (`manual_override.py`) with automated background removal and license validation.
- **Zero background daemons, zero telemetry, zero non-standard paths.** Uses XDG directories.
Expand Down Expand Up @@ -98,7 +98,7 @@ Pick [1-10, q to quit]:
Lamborghini 73 cars 1963–2024
...

24 brands, 633 cars total
29 brands, 690 cars total
```
</details>

Expand Down Expand Up @@ -160,7 +160,7 @@ make build
The installer asks these questions:

1. **Rendering mode** — `auto` (image when possible, ANSI otherwise) or `ansi` (always ANSI)
2. **Include vintage cars?** — pre-2000 cars, ~15 MB extra (default: no; add later with `./install-vintage.sh`)
2. **Include vintage cars?** — pre-2000 cars, ~15 MB extra (default: no; add later with `--install-vintage` or `./install-vintage.sh`)
3. **Mix pokemon with cars?** — only asked if `pokemon-colorscripts` is installed (toggle later with `--set-mix on|off`)
4. **Which shell rc files** — installs into your login shell's rc by default; offers to also install into secondary shells if present

Expand Down Expand Up @@ -290,31 +290,58 @@ Use this first when troubleshooting.
| `--list-categories` | List all categories with counts |
| `--set-mode auto\|ansi` | Change default rendering mode |
| `--set-mix on\|off` | Toggle pokemon mixing in shell startup |
| `--install-vintage` | Add pre-2000 cars (needs source repo) |
| `--uninstall-vintage` | Remove pre-2000 cars (self-contained) |
| `--doctor` | Environment health check |
| `--no-newline` | Suppress trailing newline (for shell prompts) |
| `--data-dir <path>` | Override the data directory |
| `--help` | Full CLI help |

## Vintage cars

Vintage = pre-2000. Off by default because most people want modern cars.
Vintage = pre-2000. Off by default because most people want modern cars,
but easy to add or remove anytime — either from the binary or from the
cloned source repo.

**Add vintage cars** to an existing install:
### From the installed binary

**Add vintage cars:**

```bash
cd path/to/hypercar-colorscripts/cli
./install-vintage.sh
hypercar-colorscripts --install-vintage
```

Shows disk impact (~15 MB), asks confirmation, adds the cars. Idempotent — safe to re-run.
The binary looks for your source clone at these locations, in order:

1. `$HYPERCAR_SRC` (if set)
2. Current directory
3. `~/hypercar-colorscripts`, `~/car-test/hypercar-colorscripts`,
`~/projects/hypercar-colorscripts`, `~/src/hypercar-colorscripts`,
`~/Documents/hypercar-colorscripts`, `~/Downloads/hypercar-colorscripts`

**Remove vintage cars** from an existing install:
If found, it runs `install-vintage.sh` automatically. If not found, it
prints clone instructions with the `HYPERCAR_SRC` escape hatch.

**Remove vintage cars:**

```bash
./uninstall-vintage.sh
hypercar-colorscripts --uninstall-vintage
```

Works even without the cloned repo — operates entirely on `~/.local/share/hypercar-colorscripts/`. To bring vintage back later, re-run `./install-vintage.sh` from the cloned repo.
This is fully self-contained — no source repo needed. It reads the
installed manifest, removes pre-2000 cars, deletes their asset files,
and updates the manifest.

### From the source repo

Same functionality via shell scripts, useful if the binary isn't
installed yet or if you prefer scripts:

```bash
cd path/to/hypercar-colorscripts/cli
./install-vintage.sh # add vintage
./uninstall-vintage.sh # remove vintage
```

## Terminal support

Expand Down Expand Up @@ -503,7 +530,7 @@ hypercar-colorscripts/
├── NOTICE ← attribution requirements
├── COPYING.assets ← code-vs-asset licensing explanation
├── CREDITS.md ← per-image attribution summary
├── manifest.json ← 633 cars, generated by build_manifest.py
├── manifest.json ← 690 cars, generated by build_manifest.py
├── assets/
│ ├── images/ ← 512×256 PNGs, one per car
Expand Down
19 changes: 16 additions & 3 deletions cli/internal/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ var (
flagSetMode string // --set-mode flag
flagSetMix string // --set-mix flag

// CHANGE 1: Added vintage flags
flagInstallVintage bool
flagUninstallVintage bool

flagCar string
flagInfo string
flagLicense string
Expand Down Expand Up @@ -77,7 +81,6 @@ Examples:
SilenceUsage: true,
SilenceErrors: true,
RunE: run,
// CHANGE 2: Disable Cobra's built-in 'completion' subcommand
CompletionOptions: cobra.CompletionOptions{
DisableDefaultCmd: true,
},
Expand All @@ -88,6 +91,10 @@ Examples:
pf.StringVar(&flagSetMode, "set-mode", "", "update default_mode in config (auto|ansi) and exit")
pf.StringVar(&flagSetMix, "set-mix", "", "toggle pokemon mixing in shell startup (on|off) and exit")

// CHANGE 2: Registered vintage flags
pf.BoolVar(&flagInstallVintage, "install-vintage", false, "install vintage cars (pre-2000) from the source repo")
pf.BoolVar(&flagUninstallVintage, "uninstall-vintage", false, "remove vintage cars (pre-2000) from the installation")

f := root.Flags()
// Selection
f.StringVar(&flagCar, "car", "", "show this specific car (slug)")
Expand Down Expand Up @@ -132,8 +139,6 @@ Examples:
root.MarkFlagsMutuallyExclusive("auto", "ansi-only", "image-only")
root.MarkFlagsMutuallyExclusive("with-pokemon", "no-pokemon", "pokemon-only")

// CHANGE 1: All RegisterFlagCompletionFunc calls DELETED

return root.Execute()
}

Expand Down Expand Up @@ -204,6 +209,14 @@ func run(cmd *cobra.Command, args []string) error {
return nil
}

// CHANGE 3: Dispatch vintage flags
if flagInstallVintage {
return runInstallVintage()
}
if flagUninstallVintage {
return runUninstallVintage()
}

// --pokemon-only short-circuits everything else
if flagPokemonOnly {
if !pokemon.Available() {
Expand Down
Loading
Loading