ccigarette
v0.1.0
Published
A smouldering pixel cigarette that burns down as your Claude Code context window fills up.
Maintainers
Readme
🚬 ccigarette
Smoking kills. Your context window.
A smouldering pixel cigarette that replaces your Claude Code status line. The cigarette is your context window: as the context fills up, the ember creeps toward the filter. Smoke curls on its own line above the ember while the agent is working. Burned down to the filter? Time to /compact.

The top line is smoke — a wisp ~ is born above the ember and, cooling into °, drifts toward the burned side, frame by frame. The burned tobacco settles as ▁ ash, so the cigarette keeps its full original length and you always see how much you've smoked.
Features
- 🔥 Burns with your context —
context_window.used_percentagedrives the ember toward the filter. Reach the filter, reach for/compact. - 💨 Live smoke & flicker while the agent is working; a steady ember when idle. The animation is fully stateless — derived from the wall clock, with zero state kept between invocations.
- 🚬 Six brands, each with its own filter, colors, and burnable length. Lucky Strike burns the longest; Беломорканал burns out the fastest.
- 🎛 Interactive TUI configurator with a live animated preview —
npx ccigarette, pick a brand, install in one keystroke. - 🎨 Truecolor with an automatic 256-color downsample, a mirrorable orientation, and an optional dark backdrop for light terminals.
- 🛟 Never crashes the status line — broken JSON renders an unlit cigarette; any render error prints a bare
🚬and exits0.
Install
npx ccigaretteThis opens a terminal configurator: pick your brand (live animated preview), flip the orientation, toggle the label/percent/model, then hit Install — it writes the statusLine block into ~/.claude/settings.json (honoring CLAUDE_CONFIG_DIR) and you're smoking.
Manual install, if you prefer editing settings yourself:
{
"statusLine": {
"type": "command",
"command": "npx -y [email protected]",
"padding": 0,
"refreshInterval": 1
}
}The installed command pins the version you set up: it runs from the npx cache (works offline after the first run) and never auto-updates. To upgrade, run npx ccigarette again. Prefer scripts? npx ccigarette install / npx ccigarette uninstall do the same non-interactively.
Requirements
- Claude Code —
ccigaretteis astatusLineprovider. - Node.js ≥ 22
- A terminal with Unicode glyph support (any modern terminal). Truecolor is recommended; a 256-color fallback is included.
Brands
Each brand has its own filter, colors, and — importantly — its own burnable length. Your context feels different depending on what you smoke.
| Brand | Character | |---|---| | Marlboro | Cork filter with speckle, red band. The classic. | | KENT | White filter, blue band. Strict. | | Camel | Ochre, double-speckled cork. | | Parliament | Recessed filter — you can see the hollow. | | LUCKY STRIKE | No filter, red ring at the butt. Longest burn of the pack. | | Беломорканал (Belomorkanal) | A papirosa. Hollow paper mouthpiece, barely any tobacco — burns out fast. Honest. |
How it works
- Claude Code pipes status JSON to the command every second (
refreshInterval: 1); burn progress comes fromcontext_window.used_percentage. - Animation is stateless: the frame is derived from the wall clock, so smoke sways and the ember flickers with zero state between invocations.
- Smoke and flicker only happen while the agent is actually working (the transcript file's mtime is under 10 s old). An idle cigarette rests with a steady ember. No
transcript_path→ treated as active. - At 0% the cigarette is unlit. Past
warnAt(default 90%) the percent turns red. After/compactthe percentage drops — fresh cigarette, on the house. - The status line never crashes: broken JSON renders an unlit cigarette; a render error prints a bare
🚬and exits0.
Config
Lives at ~/.config/ccigarette/config.json (respects XDG_CONFIG_HOME). Managed by the TUI, editable by hand:
| Field | Default | Meaning |
|---|---|---|
| brand | "marlboro" | marlboro · kent · camel · parliament · lucky · belomor |
| direction | "right" | right = filter on the right, burns leftward; left = mirrored |
| showLabel | true | Brand name after the art |
| showPercent | true | Context percentage |
| showModel | true | Model display name |
| smoke | true | Smoke wisp drifting above the ember (one line) |
| backdrop | false | Render a dark card behind the art — readable on light terminals, matches the mockup |
| warnAt | 90 | Percent turns red at this threshold |
| colorMode | "truecolor" | truecolor or ansi256 (nearest-color downsample) |
Беломорканал
Отдельное слово про Беломор. Это папироса, а не сигарета: длинная полая бумажная гильза-мундштук ▐══════▌, которая не сгорает никогда, и совсем немного табака. Поэтому у Беломора самая короткая сгораемая часть в паке — контекст выгорает стремительно, зато мундштук вечен. Мы считаем, что это самая честная метафора работы с большим контекстом из всех доступных.
Uninstall
Run npx ccigarette, go to the Install screen, hit Enter. It removes only its own statusLine block and never touches the rest of your settings. If ccigarette replaced another statusLine on install, uninstall puts the original back. Non-interactive: npx ccigarette uninstall.
Contributing
PRs are welcome — it's a small, well-tested codebase. MIT-licensed.
Develop
git clone https://github.com/blackbalancef/ccigarette.git
cd ccigarette
npm install
npm run build # tsup → dist/
npm test # vitest
npm run typecheck # tsc --noEmitPreview every brand at several burn stages:
node design/preview.mjs # all brands, 0–100%
node design/preview.mjs --animate marlboro # live burn animation
node design/preview.mjs --flip # filter on the leftDry-run the status line exactly like Claude Code calls it:
echo '{"context_window":{"used_percentage":40},"model":{"display_name":"Sonnet 4.5"}}' | node dist/bin.jsDisclaimer
ccigarette is a joke — a pixel cigarette that visualizes your context window. It is not advertising and does not promote, endorse, or encourage tobacco use. Smoking is a leading cause of preventable death; if you smoke, please consider quitting — let the agent smoke instead. (See WHO — tobacco.)
The brand names and colors shown (Marlboro, KENT, Camel, Parliament, Lucky Strike, Беломорканал) are trademarks of their respective owners, used here only as cultural references and satire. This project is not affiliated with, sponsored by, or endorsed by any of them.
License
MIT. Smoking (this status line) is encouraged; the real thing kills you and doesn't show context usage.
