hacking-sim
v1.5.0
Published
Zero-dependency cyberpunk hacking simulations for modern terminals.
Downloads
216
Maintainers
Readme
hacking-sim
A responsive cyberpunk dashboard and seven visual simulations for modern terminals.
hacking-sim is pure Hollywood terminal theatre. It performs no real scanning, exploitation, credential checking, brute force, exfiltration, or remote access.
Highlights
- Fullscreen TUI with live previews, search, categories, favorites, and responsive panels.
- Seven visually distinct ANSI simulations with compact and wide layouts.
- Centered, responsive style panels that preserve aligned tables and telemetry.
- Unicode-aware clipping, truecolor/256-color fallback, and
NO_COLORsupport. - Clean raw-mode, alternate-screen, timer, signal, keypress, and resize lifecycle.
- Zero runtime and development dependencies; built entirely on Node.js APIs.
- Works as both
hackandhacking-sim.
Installation
Requires Node.js 18 or newer and npm 9 or newer.
From npm
npm install --global hacking-sim
hackFrom this repository
git clone https://github.com/XSaitoKungX/hacking-sim.git
cd hacking-sim
npm install --global .
hackA local global install is a live link. Changes in the checkout become available immediately without reinstalling.
CLI
| Command | Description |
| --------------------- | ---------------------------------------- |
| hack | Open the interactive dashboard |
| hack <style> | Launch a style directly |
| hack random | Launch a random style |
| hack list | Print all styles without requiring a TTY |
| hack update --check | Check for an npm update |
| hack update | Install the latest published version |
| hack --version | Print the installed version |
| hack --help | Print command help |
Animations require interactive stdin and stdout. Non-interactive hack prints the style list; direct animation commands fail with a clear message and non-zero exit code.
Dashboard controls
| Key | Action |
| -------------------- | ------------------------------------------- |
| ↑ / ↓, j / k | Select a style |
| Tab, ← / → | Change category |
| / | Search names, IDs, descriptions, and tags |
| Enter | Apply a search or launch the selected style |
| Esc | Clear search input or exit the dashboard |
| f | Toggle a session favorite |
| r | Launch a random style from the visible set |
| 1–7 | Launch a style directly |
| x | Clear the active search filter |
| q | Exit the dashboard |
Inside every style, q, Esc, or Ctrl+C returns safely to the dashboard or exits a direct launch.
Styles
| ID | Experience | Visual language |
| ---------- | --------------------------- | ----------------------------------------- |
| matrix | Digital rain | Katakana trails, glitch heads, signal HUD |
| breach | Fictional terminal session | Typing, hash reveal, centered access finale |
| nmap | Fictional reconnaissance | Recon radar, live discoveries, risk matrix |
| decrypt | Cipher reveal | Key phases, entropy, fragments, verification |
| exfil | Fictional transfer pipeline | Pipeline stages, channels, throughput, events |
| glitch | Corrupted display core | RGB corruption, fault states, clock drift |
| overload | Reactor meltdown | Escalation phases, coolant, field, neutron flux |
Responsive behavior
The dashboard and simulations read live terminal dimensions. Wide terminals receive centered content blocks and extended telemetry; medium terminals use reduced panels; very small terminals retain only essential status. Tables remain aligned inside centered blocks, and ANSI output is truncated by display-cell width rather than JavaScript string length.
Color output adapts automatically:
COLORTERM=truecoloror24bit: 24-bit gradients.- Other interactive terminals: 256-color fallback.
NO_COLOR=1: no color sequences.TERM=dumb: non-interactive output only.
Architecture
flowchart LR
User[Terminal user] --> Entry[bin/hack.js]
Entry --> Parser[src/cli.js]
Entry --> Screen[src/ui.js lifecycle]
Screen --> Dashboard[src/menu.js]
Dashboard --> Registry[src/styles/index.js]
Registry --> Styles[src/styles/*.js]
Styles --> Shared[src/styles/shared.js]
Shared --> Screen
Entry --> Updates[src/update.js]sequenceDiagram
participant CLI as bin/hack.js
participant UI as withScreen()
participant Menu as Dashboard
participant Style as Selected style
CLI->>UI: open alternate screen
UI->>Menu: render with live size
Menu->>Style: run(context)
loop animation
Style->>UI: buffered ANSI frame
end
Style-->>Menu: q / Esc / Ctrl+C
Menu-->>UI: exit dashboard
UI-->>CLI: restore cursor, raw mode, listeners.
├── bin/hack.js # executable and dashboard controller
├── src/
│ ├── cli.js # argument parsing
│ ├── menu.js # responsive dashboard
│ ├── ui.js # ANSI, input, animation, lifecycle
│ ├── update.js # explicit npm update flow
│ └── styles/ # registry, shared helpers, simulations
├── test/ # node:test suites
├── .github/ # CI and contribution templates
├── AGENTS.md # rules for coding agents
└── package.jsonDevelopment
No dependency installation is required.
npm start # open the local dashboard
npm test # run all node:test suites
npm run check # tests plus syntax checks
npm run release:check # checks plus npm package dry-runAdding a style
- Add
src/styles/<id>.jswith a default export containing{ id, name, desc, tags, run(ctx) }. - Register it in
src/styles/index.js. - Add its path to the syntax-check script.
- Test resize, tiny terminals, every exit path, menu return, and restart.
- Update this README and
CHANGELOG.md.
See AGENTS.md for the full terminal and architecture contract.
Releases
The project follows Semantic Versioning and maintains a human-curated changelog.
npm run version:patch # or version:minor / version:major
npm run release:check
npm publish --access publicAfter changing a local checkout, refresh the global live link with npm install --global .. A published installation can be refreshed with hack update or npm install --global hacking-sim@latest.
Publishing, Git tags, and GitHub releases are intentionally manual so the maintainer can review each release.
Contributing and security
Contributions are welcome. Read CONTRIBUTING.md and the Code of Conduct before opening a pull request. Report vulnerabilities privately according to SECURITY.md.
License
Licensed under the MIT License. Copyright © 2026 XSaitoKungX.
