codex-terminal-themes
v1.0.4
Published
Source-of-truth TextMate themes for local Codex and bat terminal highlighting.
Maintainers
Readme
Codex Terminal Themes
High-contrast TextMate .tmTheme files for Codex terminal sessions, bat, and other tools that can read TextMate themes.
Browse the theme gallery:
https://nick2bad4u.github.io/codex-terminal-themes/
What You Get
- 204 TextMate themes in
themes/. - Glow/Glamour JSON styles for the custom Codex Noir variants in
glow/styles/. - A searchable online gallery with syntax previews, theme metadata, hue filtering, and color matching.
- A generated metadata manifest at
metadata/themes.jsonfor scripts and theme pickers. - A dependency-light npm CLI for listing, previewing, installing, and diagnosing themes.
- Themes that can still be copied directly into Codex or Bat theme folders.
Recommended Theme
For Codex terminal use, start with:
themes/Nicks-Codex-Noir.tmThemeIt is the most customized AMOLED variant in this repo and has the broadest scope coverage for terminal-heavy workflows.
Use the v2 variant when testing the newer JSON, Markdown, TOML, PowerShell, JavaScript, TypeScript, and config-file readability overrides:
themes/Nicks-Codex-Noir-v2.tmThemeInstall With npm
Use the CLI without a global install:
npx codex-terminal-themes list --search noir
npx codex-terminal-themes show nicks-codex-noir
npx codex-terminal-themes install nicks-codex-noir --target bothOpen the interactive picker with an ANSI terminal preview:
npx codex-terminal-themes pickInstall directly from the picker:
npx codex-terminal-themes pick --install --target codexRun environment checks before installing:
npx codex-terminal-themes doctorCLI config is optional and only stores CLI defaults. It does not edit theme files or mutate Codex configuration:
npx codex-terminal-themes config set defaultTheme nicks-codex-noir
npx codex-terminal-themes config set defaultTarget both
npx codex-terminal-themes installUseful install overrides:
npx codex-terminal-themes install nicks-codex-noir --target codex --codex-dir "$env:USERPROFILE\.codex\themes"
npx codex-terminal-themes install nicks-codex-noir --target bat --bat-dir "$((bat --config-dir).Trim())\themes"
npx codex-terminal-themes install nicks-codex-noir --dry-run --jsonUse With Codex Manually
Copy the .tmTheme file you want into your Codex themes directory, then select it from your Codex configuration.
On Windows, that folder is usually:
$env:USERPROFILE\.codex\themesExample:
Copy-Item ".\themes\Nicks-Codex-Noir.tmTheme" "$env:USERPROFILE\.codex\themes\"Use With Bat Manually
Find Bat's config directory:
bat --config-dirCreate a themes folder there if it does not exist, copy the .tmTheme files into it, then rebuild Bat's cache:
$batConfig = bat --config-dir
New-Item -ItemType Directory -Force -Path "$batConfig\themes"
Copy-Item ".\themes\Nicks-Codex-Noir.tmTheme" "$batConfig\themes\"
bat cache --buildUse a theme once:
bat --theme "Nicks-Codex-Noir" README.mdTo make a Bat theme permanent, put the theme name in Bat's config file:
--theme="Nicks-Codex-Noir"Use With Glow
Glow uses Glamour JSON styles, not TextMate .tmTheme files. The translated custom Noir styles live in:
glow/styles/Use the v2 style once:
glow --style ".\glow\styles\nicks-codex-noir-v2.json" README.mdInstall the generated styles into Glow's local config directory:
$glowStyles = "$env:LOCALAPPDATA\glow\Config\styles"
New-Item -ItemType Directory -Force -Path $glowStyles
Copy-Item ".\glow\styles\*.json" $glowStyles -ForceThen point style in $env:LOCALAPPDATA\glow\Config\glow.yml at the JSON file you want:
style: "C:/Users/Nick/AppData/Local/glow/Config/styles/nicks-codex-noir-v2.json"These styles map the TextMate palette into Markdown element styles and Chroma token classes, so syntax colors are intentionally close but not a one-to-one scope conversion.
Sync Everything Locally
For local source checkout workflows, this repo also works with a drop-in PowerShell sync script named:
Sync-TerminalThemes.ps1Dry run first:
Sync-TerminalThemes.ps1 -WhatIfThen sync:
Sync-TerminalThemes.ps1The sync script copies valid .tmTheme files to the Codex theme folder and Bat's theme folder, then rebuilds Bat's cache.
Theme Metadata
Use metadata/themes.json when you need to inspect the collection without parsing XML plist files yourself.
It includes:
- theme id, display name, file name, path, UUID, author, semantic class, and color space
- detected dark, light, or unknown appearance
- global colors such as background, foreground, selection, caret, line highlight, and invisibles
- setting counts, color-reference counts, scoped-setting counts, and unique scope counts
- TextMate scopes used by each theme
- duplicate UUID groups for imported themes that share historical UUIDs
See metadata/README.md for the manifest field contract and a small consumption example.
Troubleshooting
If Bat does not show a theme, rebuild its cache:
bat cache --buildIf a downloaded theme does not work, make sure it is a raw .tmTheme XML plist file. Saving a rendered GitHub webpage as .tmTheme creates an HTML file that Codex and Bat cannot consume.
If a theme looks too flat, try another Nicks-Codex-Noir*.tmTheme variant. Nicks-Codex-Noir.tmTheme is the flagship Codex terminal theme, while the suffixed variants preserve earlier AMOLED experiments with different contrast and color balance.
Maintainers
Development commands, validation, generated files, and release checks live in DEVELOPMENT.md.
