Skip to content

edd426/vim_network_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NetVim: Infrastructure Builder

A terminal-based game teaching vim navigation and network engineering skills.

Overview

You're hired as the infrastructure engineer at DataFlow Inc. Navigate config files using vim keys to build and secure the company's network—from startup to enterprise scale.

Quick Start

# Clone the repository
git clone https://github.com/edd426/vim_network_game.git
cd vim_network_game

# Run the game (uv handles everything automatically)
uv run python main.py

That's it! uv automatically creates a virtual environment, installs Python 3.12, and installs dependencies.

Installing uv

If you don't have uv installed:

curl -LsSf https://astral.sh/uv/install.sh | sh

Alternative (without uv)

pip install -r requirements.txt
python main.py

Requirements

  • Terminal with curses support (80x24 minimum)
  • Python 3.9+ (uv installs this automatically)

Gameplay

+--------------------------------------------------+
|  MISSION BRIEFING                                |
|  "Fix the DNS record before the site goes down!" |
+--------------------------------------------------+
|   CONFIG EDITOR                                  |
|  admin   IN  A  192.168.1.1  ; WRONG!           |
|  www     IN  CNAME @                             |
|  _                                               |
+--------------------------------------------------+
|  Keystrokes: 5/8 | Keys: h j k l w b | Score: 0 |
+--------------------------------------------------+
  1. Receive mission briefing with networking task
  2. Navigate config using vim keys
  3. Reach objective (cursor position)
  4. Score based on keystrokes + time

Controls

Navigation (Unlocked Progressively)

  • h j k l - Basic movement (left, down, up, right)
  • w b - Word forward/backward

Game Controls

  • Enter/Space - Select menu item
  • q - Quit to menu
  • r - Restart level

Levels

  1. Tutorial: Learn hjkl by navigating server status
  2. Word Jump: Use w/b to navigate faster
  3. DNS Fix: Find misconfigured A record
  4. Subnet Check: Identify wrong CIDR prefix
  5. Firewall Scan: Navigate to suspicious SSH rule

Scoring

  • Beat par keystrokes for 3 stars
  • Time bonus for fast completion
  • Progress saves automatically

Adding Custom Levels

Create YAML files in content/levels/:

id: "my_level"
title: "Custom Level"
chapter: "Chapter X"
narrative:
  briefing: "Your mission..."
  success: "Well done!"
content: |
  # Your config content here
objectives:
  - type: cursor_on_text
    contains: "target_text"
scoring:
  par_keystrokes: 10
  par_time: 30
unlocks:
  - w
  - b

License

MIT

About

a game for learning vim commands and learning computer networking concepts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages