Skip to main content

A simple command-line sudoku game

Project description

clidoku

 ██████╗██╗     ██╗██████╗  ██████╗ ██╗  ██╗██╗   ██╗
██╔════╝██║     ██║██╔══██╗██╔═══██╗██║ ██╔╝██║   ██║
██║     ██║     ██║██║  ██║██║   ██║█████╔╝ ██║   ██║
██║     ██║     ██║██║  ██║██║   ██║██╔═██╗ ██║   ██║
╚██████╗███████╗██║██████╔╝╚██████╔╝██║  ██╗╚██████╔╝
 ╚═════╝╚══════╝╚═╝╚═════╝  ╚═════╝ ╚═╝  ╚═╝ ╚═════╝

    A simple command-line sudoku game

Python 3.12+ License: BSD-3-Clause Code style: ruff

clidoku is a command-line sudoku game for your terminal. Not a sudoku solver!

Made completely for fun, so that you can waste time without leaving the comfort of your terminal.

Built by Barney Jackson using only Python's standard library, and finished with the help of Augment code agent.

Quick Start

Install

brew tap barneyjackson/clidoku
brew install clidoku

Play

# Start a new game
clidoku new

# Add a number to cell a0 (top-left corner)
clidoku add a0 5

# Show current game (games auto-save)
clidoku show

Usage

Games automatically save to ~/.clidoku/savegame.jsonl and resume when you return.

Supports 4x4 and 9x9 grids with Easy, Medium, and Hard difficulty levels.

Commands

# Start a new game
clidoku new                           # 9x9 medium difficulty
clidoku new --difficulty easy         # easier puzzle
clidoku new --grid-size 4             # 4x4 grid

# Playing (coordinates: rows a-i, columns 0-8)
clidoku add a0 5                      # add number 5 to cell a0
clidoku remove a0                     # remove number from cell a0
clidoku show                          # display current game
clidoku check                         # validate current grid

# Aliases
clidoku put a0 5                      # same as 'add'
clidoku rm a0                         # same as 'remove'
clidoku ls                            # same as 'show'
clidoku                               # same as 'show' when game exists

Installation

Homebrew

brew install clidoku

From Source

git clone https://github.com/barneyjackson/clidoku.git
cd clidoku
pip install -e .

Development

Setup

git clone https://github.com/barneyjackson/clidoku.git
cd clidoku

# Install rye (if not already installed)
curl -sSf https://rye-up.com/get | bash

# Sync dependencies
rye sync

# Run in development mode
rye run python -m clidoku.main --help

Testing

rye run pytest                        # run tests
rye run coverage run -m pytest        # with coverage
rye run coverage report               # coverage report

Code Quality

rye fmt                               # format code
rye lint                              # lint code
rye run mypy -p clidoku

Building

rye build                             # build package for distribution

Contributing

Though I don't plan to actively maintain this project, I'm open to pull requests. If you'd like to contribute, please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests and linting (rye run pytest && rye lint)
  5. Submit a Pull Request

License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clidoku-0.1.2.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clidoku-0.1.2-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file clidoku-0.1.2.tar.gz.

File metadata

  • Download URL: clidoku-0.1.2.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for clidoku-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d375bccaaaa5542366ab106e57596a09351fb3ed23154294ae9bb6a324c506a6
MD5 4cff8862a415ca4aa0e0941b566adf89
BLAKE2b-256 83982583364d4a99b9bc9e35d6f823650e58a3c58ddc3ea7b8146cb4065bcef6

See more details on using hashes here.

Provenance

The following attestation bundles were made for clidoku-0.1.2.tar.gz:

Publisher: release.yml on barneyjackson/clidoku

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clidoku-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: clidoku-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for clidoku-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7ddd2ad8fe5617c8b7d659194735ae4423770ff7c93c65862e9b40898ac4d753
MD5 b7f11bda0da0edb385f7f709c4746a4c
BLAKE2b-256 d78f87c0ec877ff0edf9a6eedd5929dbfb5cbad0247daa2f8319379eb2907b74

See more details on using hashes here.

Provenance

The following attestation bundles were made for clidoku-0.1.2-py3-none-any.whl:

Publisher: release.yml on barneyjackson/clidoku

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page