Skip to main content

Discord

Badges
Build Nox semantic-release PyPI Read the Docs
Tests coverage pre-commit asv
Standards SemVer 2.0.0 Conventional Commits
Code uv Ruff Nox Checked with mypy
Repo GitHub issues GitHub stars GitHub license All Contributors Contributor Covenant

PyKTANE

Welcome to PyKTANE's documentation!

Solvers for Keep Talking and Nobody Explodes: you describe the bomb, PyKTANE reads the manual. It only asks for what a rule actually needs, tracks strikes and per-module state, supports undo, and can be extended with modded module packs.

It also ships an optional MCP server, so an AI assistant can play the expert for you.

Read the Docs

Installation

PyPI

pyktane is available on PyPI:

# With uv
uv add pyktane
# With pip
pip install pyktane
# With Poetry
poetry add pyktane

For the MCP server, add the mcp extra: pyktane[mcp].

GitHub

You can also install the latest version of the code directly from GitHub:

# With uv
uv add git+https://github.com/MicaelJarniac/pyktane
# With pip
pip install git+git://github.com/MicaelJarniac/pyktane
# With Poetry
poetry add git+git://github.com/MicaelJarniac/pyktane

Usage

For more examples, see the full documentation.

As a library

from pyktane import NeedsInfo, Session

bomb = Session()
simon = bomb.add_module("Simon Says")
try:
    bomb.solve(simon, {"flashes": ["red", "green"]})
except NeedsInfo as missing:
    print(missing.fact.question)  # What is the serial number?

bomb.set_fact("serial", "AB3CD4")
bomb.solve(simon, {"flashes": ["red", "green"]}).instruction  # 'Press blue, yellow.'
bomb.strike()  # Simon Says changes with strikes.
bomb.solve(simon, {"flashes": ["red", "green"]}).instruction  # 'Press yellow, blue.'
bomb.undo()  # Misreported? Take it back.

Supported modules so far: Wires, The Button, Simon Says and Memory.

With an AI assistant (MCP)

Add this to your MCP client's configuration (Claude Desktop, Claude Code, Cursor, opencode...):

{
  "mcpServers": {
    "pyktane": {
      "command": "uvx",
      "args": ["--from", "pyktane[mcp]", "pyktane-mcp"]
    }
  }
}

Then ask your assistant to be the expert, or use the server's defuse prompt. It records the edgework, asks you what it needs, and tells you what to do.

Tool What it does
new_bomb Start a new round
get_bomb Facts, strikes and modules so far
list_facts / set_facts What can be recorded about the bomb, and recording it
list_modules / describe_module Supported modules, and what to report for each
add_module / solve Add a module, then get the answer (or a question to ask first)
strike / mark_solved / undo Keep the bomb's state in sync

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

More details can be found in CONTRIBUTING.

Contributors ✨

License

MIT

This project was created with the MicaelJarniac/crustypy template.

Metadata

Release files for pyktane 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyktane 0.2.0
File Size Uploaded Provenance Actions
pyktane-0.2.0.tar.gz 155.2 kB With provenance Details for pyktane-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyktane 0.2.0
File Interpreter ABI Platform Actions
pyktane-0.2.0-py3-none-any.whl Python 3 none any Details for pyktane-0.2.0-py3-none-any.whl

Total release size: 188.4 kB

Release files / pyktane-0.2.0.tar.gz

Download URL pyktane-0.2.0.tar.gz
Size 155.2 kB
Tags Source
SHA-256 checksum
How to use checksums
87eb641478667efd6939248ecf2db0bdea3e8cfd7d41a99d99c9865786d26db5
BLAKE2b-256 checksum
How to use checksums
c2309ce5d97f8e690843c026c8ce79e4f3cc6b74330eeeebf33a5ba680651796
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / pyktane-0.2.0-py3-none-any.whl

Download URL pyktane-0.2.0-py3-none-any.whl
Size 33.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
594c213af1bf7ad69ef4202df004df39324a6f8c6f793ad747cff00ee98f1a48
BLAKE2b-256 checksum
How to use checksums
d4c7bdf9da47382305aee1890754da019e2a9e37b31e5627604853435d9240f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Security for pyktane 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyktane-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page