Skip to main content

A command-line tool to manage and play DOS games via DOSBox.

Project description

DOSCtl

A command-line tool to manage and play DOS games via DOSBox.

DOSCtl Screenshot

Installation

Requirements: Python 3.8+, DOSBox

# Install DOSBox
brew install dosbox          # macOS
sudo apt install dosbox      # Ubuntu/Debian

# Install DOSCtl
pip install dosctl
Other install methods
# From GitHub
pip install git+ssh://git@github.com/xesco/dosctl.git

# Development (editable)
git clone git@github.com:xesco/dosctl.git
cd dosctl
pip install -e ".[dev]"

Getting Started

  1. List games — the game catalog downloads automatically on first run:
    dosctl list
    
  2. Search for a game:
    dosctl search "Dune" --sort-by year
    
  3. Play a game by its ID. On first run, dosctl downloads, installs, and asks you to pick the executable:
    dosctl play <game-id>
    

Commands

Every game has a unique 8-character ID (shown in list/search output). Use it for all operations.

dosctl list

Lists all available games.

Flag Description
-s, --sort-by [name|year] Sort by name or year
-i, --installed Only show installed games

dosctl search <query>

Searches for games. Query is optional if --year is used.

Flag Description
-y, --year <year> Filter by year
-c, --case-sensitive Case-sensitive search
-s, --sort-by [name|year] Sort by name or year

dosctl play <game-id> [command-parts...]

Runs a game. Downloads and installs it if needed. On first run, prompts for the main executable; the choice is saved for future runs.

Flag Description
-c, --configure Force re-selection of the default executable
-a, --floppy Also mount game directory as A: drive (for floppy-based installers)
-n, --no-exec Open DOSBox with the game directory mounted but don't run anything (for debugging)

You can override the saved executable by passing command parts directly, or use --configure to re-pick interactively:

dosctl play 62ef2769                    # Use saved default
dosctl play 62ef2769 --configure        # Re-pick executable interactively
dosctl play 62ef2769 setup.exe          # Run a specific executable
dosctl play 62ef2769 game.exe -level 5  # Pass arguments to the executable

Some games include floppy-based installers that expect source files on A: and install to C:. Use -a to mount the game directory as both drives:

dosctl play 62ef2769 install.bat C: -a  # Run installer with floppy mode
dosctl play 62ef2769 STARCON2/GAME.EXE  # Then run the installed game normally

To troubleshoot a game, open DOSBox at the game directory without running anything:

dosctl play 62ef2769 --no-exec          # Drop to C:\> prompt
dosctl play 62ef2769 --no-exec -a       # Drop to A:\> prompt (floppy mode)

dosctl inspect <game-id>

Shows installed files for a game. Use -e, --executables to show only .exe/.com/.bat files.

dosctl delete <game-id>

Deletes an installed game and its downloaded archive.

dosctl refresh --force

Re-downloads the master game list from the Internet Archive.

dosctl net host <game-id>

Hosts a multiplayer game using DOSBox IPX networking. By default, hosts on your local network. Use --internet to enable internet play with automatic UPnP port mapping and a discovery code.

Flag Description
-p, --port <port> UDP port for the IPX server (default: 19900)
-c, --configure Force re-selection of the default executable
-i, --internet Enable internet play (UPnP port mapping + discovery code)
-I, --public-ip <ip> Specify your public IP (skips automatic detection; requires --internet)
-U, --no-upnp Skip UPnP port mapping (requires --internet)
-n, --no-exec Open DOSBox with IPX server running but don't run anything (for debugging)

dosctl net join <game-id> <host>

Joins a multiplayer game hosted by another player. The host argument can be a raw IP address (for LAN) or a discovery code (for internet play).

Flag Description
-p, --port <port> UDP port of the IPX server (default: 19900)
-c, --configure Force re-selection of the default executable

Example — LAN play:

# Player 1 (host):
dosctl net host 62ef2769
# Output: "Your local IP appears to be: 192.168.1.42"

# Player 2 (join with IP):
dosctl net join 62ef2769 192.168.1.42

Example — internet play:

# Player 1 (host with internet mode):
dosctl net host 62ef2769 --internet
# Output: "Your discovery code: DOOM-3KF8A"

# Player 2 (join with discovery code):
dosctl net join 62ef2769 DOOM-3KF8A

If UPnP fails or you've already forwarded the port manually:

dosctl net host 62ef2769 --internet --no-upnp --public-ip 203.0.113.5

Both DOSBox instances start with IPX networking enabled. Configure multiplayer in the game's own network/modem menu (select IPX). DOSBox stays open after the game exits so you can play again without reconnecting.

Configuration

Data is stored in platform-appropriate directories:

Platform Base directory
Linux/macOS ~/.local/share/dosctl/
Windows %USERPROFILE%\AppData\Local\dosctl\
<base-dir>/
  downloads/       # Downloaded .zip archives
  installed/       # Extracted games
  collections/     # Game list cache

Collection Backend

Games are sourced from the Total DOS Collection Release 14 on the Internet Archive. The catalog is downloaded on first use; individual games are downloaded on demand when you run them.

Disclaimer

This tool does not host or distribute any games — it manages content from external sources. You are responsible for ensuring you have legal rights to any content you use. Windows support is experimental; Linux and macOS are the primary platforms.

See LICENSE for the full MIT license.

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

dosctl-1.6.0.tar.gz (41.9 kB view details)

Uploaded Source

Built Distribution

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

dosctl-1.6.0-py3-none-any.whl (37.0 kB view details)

Uploaded Python 3

File details

Details for the file dosctl-1.6.0.tar.gz.

File metadata

  • Download URL: dosctl-1.6.0.tar.gz
  • Upload date:
  • Size: 41.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dosctl-1.6.0.tar.gz
Algorithm Hash digest
SHA256 affe9019a60116895a0d7aaab512925eb5bbbcfbe2a145cbc02baa5c55b78c6f
MD5 f1ea04fb2481363b1c6e36db4a8a52ca
BLAKE2b-256 bba1153408f6bbc383f8f13e4e37594077106fcc44ea4b9fd8a904043fe3a01f

See more details on using hashes here.

Provenance

The following attestation bundles were made for dosctl-1.6.0.tar.gz:

Publisher: semantic-release.yml on xesco/dosctl

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

File details

Details for the file dosctl-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: dosctl-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 37.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dosctl-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e762b83d7c90fd208b3f4a6ac1a9f80b9553aaa4147195aad03147d38600b1dd
MD5 48d5a8956e93bf1570ca139db7764e13
BLAKE2b-256 16d4c3c053c0d92e33e363cdf182b0f2c317c85880185a6a8e7f9d83bcdbebec

See more details on using hashes here.

Provenance

The following attestation bundles were made for dosctl-1.6.0-py3-none-any.whl:

Publisher: semantic-release.yml on xesco/dosctl

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