data-center-tui 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 yusuf0279
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,130 @@
1
+ Metadata-Version: 2.4
2
+ Name: data-center-tui
3
+ Version: 0.1.0
4
+ Summary: A pixel-art idle tycoon for your terminal: build servers, hire Vibecoders, survive crises, relocate forever.
5
+ Author: yusuf0279
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/yusuf0279/data-center-tui
8
+ Project-URL: Source, https://github.com/yusuf0279/data-center-tui
9
+ Project-URL: Issues, https://github.com/yusuf0279/data-center-tui/issues
10
+ Project-URL: Privacy, https://github.com/yusuf0279/data-center-tui/blob/main/PRIVACY.md
11
+ Keywords: game,idle,tycoon,clicker,tui,terminal,textual,incremental
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: End Users/Desktop
15
+ Classifier: Topic :: Games/Entertainment
16
+ Classifier: Operating System :: POSIX
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: textual>=8.2
26
+ Dynamic: license-file
27
+
28
+ > **Inspired by [fourtysevencode/My-Data-Center](https://github.com/fourtysevencode/My-Data-Center)**, an idle tycoon you play over SSH. This is an independent rewrite for the local terminal; see [Credits](#credits).
29
+
30
+ # My Data Center
31
+
32
+ A pixel-art idle tycoon for your terminal. Buy servers, hire Vibecoders, survive crises, and relocate to ever-bigger data centers, from a budget VPS to a black hole colocation. Built to sit in a tmux pane while you wait on something else.
33
+
34
+ ![My Data Center](https://raw.githubusercontent.com/yusuf0279/data-center-tui/main/docs/screenshot.svg)
35
+
36
+ ## Install
37
+
38
+ ```
39
+ pipx install data-center-tui # once it is on PyPI (or: pip install data-center-tui)
40
+ data-center-tui
41
+ ```
42
+
43
+ From source:
44
+
45
+ ```
46
+ git clone https://github.com/yusuf0279/data-center-tui
47
+ cd data-center-tui
48
+ pip install .
49
+ data-center-tui # or: python -m data_center_tui
50
+ ```
51
+
52
+ Needs Python 3.10 or newer and a terminal with colour; 100×30 or larger looks best (80×24 works, with a smaller hall). It plays fine inside tmux and uses the keyboard only.
53
+
54
+ ```
55
+ data-center-tui --no-online # never contact the leaderboard server
56
+ data-center-tui --save my.json # use a different save file
57
+ ```
58
+
59
+ ## Controls
60
+
61
+ | Key | Action |
62
+ |---|---|
63
+ | `1`-`9`, `0` | Pick an item in the open card (`0` is the 10th): buy a server, install a chip, or hire/train crew |
64
+ | `s` `c` `h` `d` `b` | Open the **s**ervers, **c**hips, crew (**h**ire), **d**ata centers or leaderboard (**b**oard) card |
65
+ | `,` / `.` | Scroll the open card when it has more rows than fit |
66
+ | `↑` `↓` `PgUp` `PgDn` `Home` `End` | Scroll the data hall |
67
+ | `x` | **Relocate** to the next data center (when your newest one reaches its target) |
68
+ | `[` / `]` | Visit the older / newer data center (or press `d`, then `1`-`6`) |
69
+ | `f` | Fix the current crisis yourself |
70
+ | `a` | Crew **a**utopilot on/off |
71
+ | `n` | Give the data center you are looking at your own **n**ame |
72
+ | `m` or `Esc` | The **m**enu: join or leave the leaderboard, change your name, rename a data center, autopilot, change theme, save and quit |
73
+ | `j` | **J**oin or leave the online leaderboard (also in the menu) |
74
+ | `ctrl+p` | Command palette, including **Change theme** |
75
+ | `q` | Save and quit |
76
+
77
+ ## How it plays
78
+
79
+ - **Ten server tiers**, each with its own pixel sprite and colour: Budget VPS, Compute Node, GPU Cluster, AI Datacenter, Quantum Farm, Orbital Cloud, Fusion Campus, Dyson Swarm, Neutron Star Farm, Black Hole Colo. Cheap tiers pay back in about 30 seconds, the biggest in about 40 minutes, so each tier has its moment. Every extra copy costs a little more than the last (+7% on the cheapest up to +13% on the biggest).
80
+ - **Milestones.** Owning 25, 50, 100, 200, 300, 400 ... of a tier doubles that tier's income, and the shop shows the next one (`x2@25`).
81
+ - **Chip upgrades.** Twenty levels per tier (five chip families, four editions each), every level doubling that tier's income and costing 4x the last. Named with puns on some very familiar GPUs and CPUs ("Radeoff", "Rizzen", "Thread-Shred", "H-100 (a kidney)", "Bee-200 (melts)", "Ultra Max"...).
82
+ - **On-call crew.** Ten roles, from Vibecoder up to Founder Mode CEO, one **specialist per tier**. Train them to level 10 and they unlock perks: at Lv2 they **auto-buy their tier's cheap servers**, at Lv4 they **double that tier's income**, at Lv6 they **auto-buy its cheap chips**, at Lv8 they double it again. They also fix crises (bigger crises need more senior people), and every level adds +5% income. "Cheap" means a purchase costing at most 1/50 of a second of your income, so autopilot handles the small repetitive buying and can never use up the money you are saving for big purchases. `a` pauses it if you want to buy everything yourself.
83
+ - **Random crises.** Power cuts, flaky CI, an intern pushing to main on a Friday: they cut your income until fixed, by you (`f`) or by your crew.
84
+ - **Relocate, forever.** Reach $10 quadrillion in your newest data center and you can relocate to the next one (Garage in Palo Alto, Abandoned Mall in Ohio, Decommissioned Missile Silo, ... and on into Parallel Universes). You **start from scratch** there: money, servers, chips and crew all reset. The old data center is **decommissioned**: you can visit it (`d`, or `[` and `]`) and look around, with the lights off and everything washed out, but you can't buy anything there and it earns nothing. Your newest data center keeps earning while you look. Each new data center has bigger numbers and a target 1000x higher, and takes a little longer than the last. There is no last level.
85
+ - **Fame and status.** Every relocation earns **Fame** (more if you waited past the target): each point is +2% income in every data center, forever. Fame also climbs your status ladder: Nobody, Intern, Junior Dev, Senior Dev, Tech Lead, Engineering Manager, Director, VP of Engineering, CTO, Tech CEO, Tech Billionaire, Tech Overlord, and then Tech Overlord II, III, ... without end.
86
+ - **Names.** Every data center can be given your own name (`n`, or the menu), up to 24 plain characters; leave it blank for the default.
87
+ - **Scrollable data hall.** All your racks are drawn, cheapest tier first, with a scrollbar; it follows the newest racks until you scroll.
88
+ - **Offline earnings.** While the game is closed the data center you were in earns **75%** of its normal income, with no time limit.
89
+
90
+ ### Themes
91
+
92
+ Panels, text and the hall follow your Textual theme (`ctrl+p`, then Change theme; it starts on gruvbox and remembers your choice). Each server type keeps the **same colour in every theme**, so you can always tell them apart:
93
+
94
+ ![The ten servers in every theme](https://raw.githubusercontent.com/yusuf0279/data-center-tui/main/docs/themes.png)
95
+
96
+ ### Tmux friendly
97
+
98
+ The screen only repaints when something changed. If the game runs in a tmux pane that isn't the active one, it keeps playing in the background but redraws only every 20 seconds, because every repaint of a background pane makes tmux flick your real cursor over to it.
99
+
100
+ ## Online leaderboard (optional)
101
+
102
+ On first launch the game asks whether you want to join. If you do, it asks for a name and sends only that name, your Fame and your number of data centers to `data-center.openexplorer.xyz` (the code is in [`server/`](server/)). You can join, leave or change your name at any time from the menu (`m`); it is not a one-time question. It is an honour-system board. Everything the game sends and stores is listed in [PRIVACY.md](PRIVACY.md), and `--no-online` (or `DC_ONLINE=0`) switches every online feature off.
103
+
104
+ ## Saves
105
+
106
+ Every data center's money, servers, chips and crew, plus your Fame, names and theme, are saved to `~/.local/share/dc-tui/save.json` (or `$XDG_DATA_HOME/dc-tui/save.json`) every second and on quit. Set `DC_SAVE=/path/to/file.json` or use `--save` for a different file. Older saves are converted automatically.
107
+
108
+ ## Development
109
+
110
+ ```
111
+ pip install -e .
112
+ python -m unittest discover -s tests # the game (about 45 s)
113
+ python -m unittest discover -s server -p test_server.py # the leaderboard server
114
+ ```
115
+
116
+ `data_center_tui/game.py` is the whole game, `server/` is the leaderboard server (see [`server/README.md`](server/README.md)), `tests/` holds the tests. The web port lives in `web/`; `npm run build` copies it into the VS Code extension (`vscode/media`) and the browser extensions (`browser/dist/chrome`, `browser/dist/firefox`), and `npm test` runs its Node tests.
117
+
118
+ What was verified headlessly: the build output, that both browser manifests parse and reference only files that exist in `browser/dist`, the extension CSP and host permission strings, `vsce package` producing a `.vsix`, and the web tests under `web/test/`. Not verified: loading the extensions in a real Chrome, Firefox or VS Code, rendering, and live requests to the leaderboard server from inside a webview or extension page. The extensions' leaderboard is opt-in and sends only name, Fame and number of data centers to `data-center.openexplorer.xyz`; clearing extension storage loses the leaderboard identity token.
119
+
120
+ ## Credits
121
+
122
+ The idea, the "buy servers and watch the money roll in" loop and the first six tiers' income figures come from [My Data Center](https://github.com/fourtysevencode/My-Data-Center) by fourtysevencode. That project runs as an SSH server with its own accounts. The prices, price scaling, milestones, chips, crew, crises and everything after the first version are this repository's own.
123
+
124
+ The reset-and-Fame loop and the milestone doublings are inspired by mobile idle tycoons such as [Cash, Inc.](https://apps.apple.com/us/app/cash-inc-fame-fortune-game/id1270598321) and AdVenture Capitalist. The numbers here are tuned with a simulated player and are not copied from any of them.
125
+
126
+ This repository is a from-scratch rewrite in [Textual](https://textual.textualize.io/). It shares no source code with the original, whose repository has no license file.
127
+
128
+ ## License
129
+
130
+ [MIT](LICENSE)
@@ -0,0 +1,103 @@
1
+ > **Inspired by [fourtysevencode/My-Data-Center](https://github.com/fourtysevencode/My-Data-Center)**, an idle tycoon you play over SSH. This is an independent rewrite for the local terminal; see [Credits](#credits).
2
+
3
+ # My Data Center
4
+
5
+ A pixel-art idle tycoon for your terminal. Buy servers, hire Vibecoders, survive crises, and relocate to ever-bigger data centers, from a budget VPS to a black hole colocation. Built to sit in a tmux pane while you wait on something else.
6
+
7
+ ![My Data Center](https://raw.githubusercontent.com/yusuf0279/data-center-tui/main/docs/screenshot.svg)
8
+
9
+ ## Install
10
+
11
+ ```
12
+ pipx install data-center-tui # once it is on PyPI (or: pip install data-center-tui)
13
+ data-center-tui
14
+ ```
15
+
16
+ From source:
17
+
18
+ ```
19
+ git clone https://github.com/yusuf0279/data-center-tui
20
+ cd data-center-tui
21
+ pip install .
22
+ data-center-tui # or: python -m data_center_tui
23
+ ```
24
+
25
+ Needs Python 3.10 or newer and a terminal with colour; 100×30 or larger looks best (80×24 works, with a smaller hall). It plays fine inside tmux and uses the keyboard only.
26
+
27
+ ```
28
+ data-center-tui --no-online # never contact the leaderboard server
29
+ data-center-tui --save my.json # use a different save file
30
+ ```
31
+
32
+ ## Controls
33
+
34
+ | Key | Action |
35
+ |---|---|
36
+ | `1`-`9`, `0` | Pick an item in the open card (`0` is the 10th): buy a server, install a chip, or hire/train crew |
37
+ | `s` `c` `h` `d` `b` | Open the **s**ervers, **c**hips, crew (**h**ire), **d**ata centers or leaderboard (**b**oard) card |
38
+ | `,` / `.` | Scroll the open card when it has more rows than fit |
39
+ | `↑` `↓` `PgUp` `PgDn` `Home` `End` | Scroll the data hall |
40
+ | `x` | **Relocate** to the next data center (when your newest one reaches its target) |
41
+ | `[` / `]` | Visit the older / newer data center (or press `d`, then `1`-`6`) |
42
+ | `f` | Fix the current crisis yourself |
43
+ | `a` | Crew **a**utopilot on/off |
44
+ | `n` | Give the data center you are looking at your own **n**ame |
45
+ | `m` or `Esc` | The **m**enu: join or leave the leaderboard, change your name, rename a data center, autopilot, change theme, save and quit |
46
+ | `j` | **J**oin or leave the online leaderboard (also in the menu) |
47
+ | `ctrl+p` | Command palette, including **Change theme** |
48
+ | `q` | Save and quit |
49
+
50
+ ## How it plays
51
+
52
+ - **Ten server tiers**, each with its own pixel sprite and colour: Budget VPS, Compute Node, GPU Cluster, AI Datacenter, Quantum Farm, Orbital Cloud, Fusion Campus, Dyson Swarm, Neutron Star Farm, Black Hole Colo. Cheap tiers pay back in about 30 seconds, the biggest in about 40 minutes, so each tier has its moment. Every extra copy costs a little more than the last (+7% on the cheapest up to +13% on the biggest).
53
+ - **Milestones.** Owning 25, 50, 100, 200, 300, 400 ... of a tier doubles that tier's income, and the shop shows the next one (`x2@25`).
54
+ - **Chip upgrades.** Twenty levels per tier (five chip families, four editions each), every level doubling that tier's income and costing 4x the last. Named with puns on some very familiar GPUs and CPUs ("Radeoff", "Rizzen", "Thread-Shred", "H-100 (a kidney)", "Bee-200 (melts)", "Ultra Max"...).
55
+ - **On-call crew.** Ten roles, from Vibecoder up to Founder Mode CEO, one **specialist per tier**. Train them to level 10 and they unlock perks: at Lv2 they **auto-buy their tier's cheap servers**, at Lv4 they **double that tier's income**, at Lv6 they **auto-buy its cheap chips**, at Lv8 they double it again. They also fix crises (bigger crises need more senior people), and every level adds +5% income. "Cheap" means a purchase costing at most 1/50 of a second of your income, so autopilot handles the small repetitive buying and can never use up the money you are saving for big purchases. `a` pauses it if you want to buy everything yourself.
56
+ - **Random crises.** Power cuts, flaky CI, an intern pushing to main on a Friday: they cut your income until fixed, by you (`f`) or by your crew.
57
+ - **Relocate, forever.** Reach $10 quadrillion in your newest data center and you can relocate to the next one (Garage in Palo Alto, Abandoned Mall in Ohio, Decommissioned Missile Silo, ... and on into Parallel Universes). You **start from scratch** there: money, servers, chips and crew all reset. The old data center is **decommissioned**: you can visit it (`d`, or `[` and `]`) and look around, with the lights off and everything washed out, but you can't buy anything there and it earns nothing. Your newest data center keeps earning while you look. Each new data center has bigger numbers and a target 1000x higher, and takes a little longer than the last. There is no last level.
58
+ - **Fame and status.** Every relocation earns **Fame** (more if you waited past the target): each point is +2% income in every data center, forever. Fame also climbs your status ladder: Nobody, Intern, Junior Dev, Senior Dev, Tech Lead, Engineering Manager, Director, VP of Engineering, CTO, Tech CEO, Tech Billionaire, Tech Overlord, and then Tech Overlord II, III, ... without end.
59
+ - **Names.** Every data center can be given your own name (`n`, or the menu), up to 24 plain characters; leave it blank for the default.
60
+ - **Scrollable data hall.** All your racks are drawn, cheapest tier first, with a scrollbar; it follows the newest racks until you scroll.
61
+ - **Offline earnings.** While the game is closed the data center you were in earns **75%** of its normal income, with no time limit.
62
+
63
+ ### Themes
64
+
65
+ Panels, text and the hall follow your Textual theme (`ctrl+p`, then Change theme; it starts on gruvbox and remembers your choice). Each server type keeps the **same colour in every theme**, so you can always tell them apart:
66
+
67
+ ![The ten servers in every theme](https://raw.githubusercontent.com/yusuf0279/data-center-tui/main/docs/themes.png)
68
+
69
+ ### Tmux friendly
70
+
71
+ The screen only repaints when something changed. If the game runs in a tmux pane that isn't the active one, it keeps playing in the background but redraws only every 20 seconds, because every repaint of a background pane makes tmux flick your real cursor over to it.
72
+
73
+ ## Online leaderboard (optional)
74
+
75
+ On first launch the game asks whether you want to join. If you do, it asks for a name and sends only that name, your Fame and your number of data centers to `data-center.openexplorer.xyz` (the code is in [`server/`](server/)). You can join, leave or change your name at any time from the menu (`m`); it is not a one-time question. It is an honour-system board. Everything the game sends and stores is listed in [PRIVACY.md](PRIVACY.md), and `--no-online` (or `DC_ONLINE=0`) switches every online feature off.
76
+
77
+ ## Saves
78
+
79
+ Every data center's money, servers, chips and crew, plus your Fame, names and theme, are saved to `~/.local/share/dc-tui/save.json` (or `$XDG_DATA_HOME/dc-tui/save.json`) every second and on quit. Set `DC_SAVE=/path/to/file.json` or use `--save` for a different file. Older saves are converted automatically.
80
+
81
+ ## Development
82
+
83
+ ```
84
+ pip install -e .
85
+ python -m unittest discover -s tests # the game (about 45 s)
86
+ python -m unittest discover -s server -p test_server.py # the leaderboard server
87
+ ```
88
+
89
+ `data_center_tui/game.py` is the whole game, `server/` is the leaderboard server (see [`server/README.md`](server/README.md)), `tests/` holds the tests. The web port lives in `web/`; `npm run build` copies it into the VS Code extension (`vscode/media`) and the browser extensions (`browser/dist/chrome`, `browser/dist/firefox`), and `npm test` runs its Node tests.
90
+
91
+ What was verified headlessly: the build output, that both browser manifests parse and reference only files that exist in `browser/dist`, the extension CSP and host permission strings, `vsce package` producing a `.vsix`, and the web tests under `web/test/`. Not verified: loading the extensions in a real Chrome, Firefox or VS Code, rendering, and live requests to the leaderboard server from inside a webview or extension page. The extensions' leaderboard is opt-in and sends only name, Fame and number of data centers to `data-center.openexplorer.xyz`; clearing extension storage loses the leaderboard identity token.
92
+
93
+ ## Credits
94
+
95
+ The idea, the "buy servers and watch the money roll in" loop and the first six tiers' income figures come from [My Data Center](https://github.com/fourtysevencode/My-Data-Center) by fourtysevencode. That project runs as an SSH server with its own accounts. The prices, price scaling, milestones, chips, crew, crises and everything after the first version are this repository's own.
96
+
97
+ The reset-and-Fame loop and the milestone doublings are inspired by mobile idle tycoons such as [Cash, Inc.](https://apps.apple.com/us/app/cash-inc-fame-fortune-game/id1270598321) and AdVenture Capitalist. The numbers here are tuned with a simulated player and are not copied from any of them.
98
+
99
+ This repository is a from-scratch rewrite in [Textual](https://textual.textualize.io/). It shares no source code with the original, whose repository has no license file.
100
+
101
+ ## License
102
+
103
+ [MIT](LICENSE)
@@ -0,0 +1,3 @@
1
+ """My Data Center: a pixel-art idle tycoon for your terminal."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,3 @@
1
+ from .game import main
2
+
3
+ main()