A Terminal Stock Ticker That Disguises Itself as a Docker Build
The tool solves a specific social-signaling problem in open-plan offices: switching to a browser or GUI app to check stock prices visibly signals "not working." By embedding live quotes inside a terminal and adding a one-key disguise, it removes that signal without changing the underlying behavior. The termios-based single-threaded input handling is also a reusable pattern for any terminal app that needs both real-time updates and instant keystroke response without pulling in curses.
BossKey-Stock pulls real-time Chinese A-share quotes from the free Sina Finance API and renders them inside a terminal UI built with Python's Rich library. The defining feature is a boss-key mode: pressing `b` instantly swaps the stock table for a procedurally generated Docker build log, complete with step numbers, occasional warnings, and a running timer. The tool requires no API keys or registration and runs entirely in a single thread using direct termios manipulation for non-blocking keystroke detection.
Version 0.2.1 adds position tracking with cost-basis and P&L columns, a Chinese/English UI toggle that defaults to English to strengthen the disguise, and an on-demand shortcut hint bar. The data layer handles trading-session detection, offline resilience, and automatic conversion of share counts to standard lots.
The project is a modern take on the classic boss key, addressing the social friction of visibly checking stock prices in an open office by embedding the entire workflow inside a terminal that always looks like work.
The project reframes a workplace taboo — checking stocks during work hours — as a UI problem: the issue isn't the activity itself but the visible signal it sends in an open office.
Defaulting the interface to English is a subtle but effective disguise tactic; it exploits the fact that non-native text takes longer to parse, making a quick glance over someone's shoulder far less revealing.
The termios approach sidesteps a common terminal-UI conflict: Rich and curses both want control of the terminal, but by only modifying input flags and leaving output alone, the two concerns stay decoupled.
Many 'slacking off' tools are really responses to environments that conflate visible screen content with productivity, and the boss-key pattern persists precisely because that conflation hasn't gone away.