MCPcopy Index your code
hub / github.com/daypunk/punkdoku

github.com/daypunk/punkdoku @v1.1.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.3 ↗ · + Follow
89 symbols 201 edges 14 files 27 documented · 30%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

punkdoku

개요

punkdoku는 macOS, Linux에서 동일하게 동작하는 터미널 스도쿠 게임입니다. Go로 작성되었고 Bubble Tea와 Lipgloss로 보기 좋은 TUI를 제공합니다. 퍼즐은 난이도별로 생성되며, Daily 모드는 UTC 날짜 기반 시드를 사용해 모든 사용자가 동일한 퍼즐을 받습니다. 입력 애니메이션, Undo, Auto‑Check, 타이머 등을 지원합니다.

Overview

punkdoku is a cross‑platform terminal Sudoku for macOS and Linux. It's written in Go, built on Bubble Tea and Lipgloss for a clean, responsive TUI. Puzzles are generated per difficulty with a focus on uniqueness and reproducibility; Daily mode uses a UTC date‑based seed so everyone plays the same grid. The game ships with input flashes, undo/redo, auto‑check, and a compact timer.

Installation

Homebrew (Recommended)

brew install daypunk/tap/punkdoku

Direct Download

# macOS
curl -L https://github.com/daypunk/punkdoku/releases/latest/download/punkdoku-macos -o /usr/local/bin/punkdoku && chmod +x /usr/local/bin/punkdoku

# Linux
curl -L https://github.com/daypunk/punkdoku/releases/latest/download/punkdoku-linux -o /usr/local/bin/punkdoku && chmod +x /usr/local/bin/punkdoku

Run

punkdoku

How to Play

  1. Launch: Run punkdoku in your terminal
  2. Navigate: Use arrow keys to move around
  3. Input: Press 1-9 to place numbers, 0 to clear
  4. Settings: Press a for auto-check, t for timer

Difficulty Levels

  • Easy: Perfect for beginners
  • Normal: Balanced challenge
  • Hard: Requires strategy
  • Lunatic: Expert level
  • Daily: Everyone gets the same puzzle based on the date

Controls

  • Arrow keys: Navigate the grid
  • 1-9: Place numbers
  • 0/Space: Clear cell
  • u: Undo last move
  • a: Toggle auto-check (highlights mistakes)
  • t: Toggle timer
  • m: Return to main menu
  • q: Quit

Features

  • Clean interface: Minimalist design that stays out of your way
  • Daily puzzles: Same puzzle for everyone, changes each day
  • Smart generation: Every puzzle has exactly one solution
  • Undo/Redo: Full move history
  • Auto-check: Optional real-time error highlighting
  • Timer: Track your solving speed

Technical Details

The game generates puzzles by starting with a complete solution and carefully removing numbers while ensuring uniqueness. Daily puzzles use the UTC date as a seed, so everyone worldwide gets the same puzzle.

  • Generator uses backtracking with randomization
  • Solver verifies puzzle uniqueness
  • UI built with Bubble Tea and Lipgloss
  • Single binary, no dependencies

Project Structure

cmd/
  punkdoku/
    main.go              # entrypoint
internal/
  config/               # YAML load/save under ~/.punkdoku
  game/                 # board state, moves, duplicates/conflicts
  generator/            # difficulty params, daily seeding, carving
  solver/               # backtracking solver + uniqueness counting
  theme/                # color palette (Punk theme)
  ui/                   # Bubble Tea app, model, view, styles, keymap

Development

# Run locally
go run ./cmd/punkdoku

# Build
go build -o punkdoku ./cmd/punkdoku

Built for modern terminals with Unicode support. Works best with monospace fonts and true color support.

Core symbols most depended-on inside this repo

clamp
called by 8
internal/ui/model.go
gradientText
called by 8
internal/ui/app.go
Generate
called by 5
internal/generator/generator.go
NewAdaptiveColors
called by 5
internal/theme/theme.go
isSolved
called by 4
internal/ui/model.go
GetGradientColors
called by 3
internal/theme/theme.go
BuildStyles
called by 3
internal/ui/styles.go
hashStringToUint64
called by 2
internal/generator/internal_core.go

Shape

Function 49
Method 22
Struct 13
TypeAlias 5

Languages

Go100%

Modules by API surface

internal/ui/model.go16 symbols
internal/ui/app.go15 symbols
internal/theme/theme.go12 symbols
internal/game/board.go10 symbols
internal/generator/generator.go8 symbols
internal/solver/solver.go6 symbols
internal/generator/internal_core.go6 symbols
internal/config/config.go5 symbols
internal/ui/view.go3 symbols
internal/ui/keymap.go3 symbols
internal/ui/styles.go2 symbols
internal/ui/example.go1 symbols

For agents

$ claude mcp add punkdoku \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact