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.

Version: 0.2.0

⚠️ Windows Support Notice Windows support is currently experimental. While the core functionality should work, it has not been extensively tested on Windows systems. Linux and macOS are the primary supported platforms.

Installation

Requirements

  • Python: 3.8 or higher
  • DOSBox: Required for running games

Install DOSBox

# macOS
brew install dosbox

# Ubuntu/Debian
sudo apt install dosbox

# Windows
# Download from https://www.dosbox.com/

Install DOSCtl

pip install dosctl

Getting Started

  1. List Games: Find a game you want to play. The tool will automatically download the game list from the Total DOS Collection Release 14 on the first run.
    dosctl list
    
  2. Search for a Game: Narrow down the list with a search.
    dosctl search "Dune" --sort-by year
    
  3. Run a Game: Run the game using its ID. The first time you run a game, dosctl will download and install it, then ask you to choose the correct executable.
    dosctl run <game-id>
    

Core Concepts

Game IDs

Every game in the collection is assigned a unique 8-character ID (a hash of its path). You use this ID for all operations like running, inspecting, or deleting games.

First-Time Run

The first time you run a game, dosctl will prompt you to select the main executable file from a list of possibilities (.exe, .com, .bat). Your choice is remembered, so subsequent runs will launch the game immediately. You can force this selection again by using the --configure flag.

Command Parts

You can specify exactly what DOS command to run by providing command parts after the game ID. This gives you fine-grained control over game execution:

  • Without command parts: dosctl run <game-id> uses the saved default executable
  • With command parts: dosctl run <game-id> setup.exe -silent runs the exact command you specify

Command parts are joined with spaces to form the final DOS command. This is useful for:

  • Running different executables (setup, configuration tools, etc.)
  • Passing command-line arguments to games
  • Running batch files with parameters
  • Bypassing the saved default when needed

Examples:

dosctl run 62ef2769 setup.exe          # Run setup instead of main game
dosctl run 62ef2769 game.exe -debug     # Run with debug flag
dosctl run 62ef2769 install.bat /q      # Run batch file quietly
dosctl run 62ef2769 editor.exe level1   # Run level editor with specific level

Usage Examples

List only your installed games

$ dosctl list -i
Available Games:
  [53ad2f67] (1991) Lemmings (1991)(Psygnosis Limited) [Strategy, Action]
  [fdcc9602] (1990) Secret of Monkey Island, The (VGA) (1990)(Lucasfilm Games LLC) [Adventure]

Search for a game

$ dosctl search "metal mutant"
Found 5 game(s):
  [dd228682] (1991) Metal Mutant (1991)(Silmarils) [Action, Adventure]
  [55123659] (1991) Metal Mutant (1991)(Silmarils) [Codes]
  [9a5aa0b6] (1991) Metal Mutant (Es) (1991)(Silmarils) [Action, Adventure]

Run a game for the first time

$ dosctl run dd228682
Downloading 'Metal Mutant (1991)(Silmarils) [Action, Adventure].zip'...
✅ Successfully installed 'Metal Mutant (1991)(Silmarils) [Action, Adventure]'
No default executable set for game 'dd228682'. Searching...
Found a single executable: 'METAL.EXE'. Setting as default.
Starting 'METAL.EXE' with DOSBox...

Run a specific executable directly

$ dosctl run dd228682 setup.exe
Starting 'SETUP.EXE' with DOSBox...

Run with command-line arguments

$ dosctl run dd228682 game.exe -difficulty hard -level 3
Starting 'GAME.EXE -DIFFICULTY HARD -LEVEL 3' with DOSBox...

Run main executable with required parameters

$ dosctl run dd228682 metal.exe soundblaster
Starting 'METAL.EXE SOUNDBLASTER' with DOSBox...

Force reconfiguration of saved executable

$ dosctl run dd228682 --configure
Please choose one of the following to run:
  1: METAL.EXE
  2: SETUP.EXE
  3: README.BAT
Select a file to execute: 2
Starting 'SETUP.EXE' with DOSBox...

Inspect game files

$ dosctl inspect dd228682
Inspecting files for 'Metal Mutant (1991)(Silmarils) [Action, Adventure]' (ID: dd228682)
Location: <dosctl-data-dir>/installed/dd228682
----------------------------------------
  METAL.EXE
  SETUP.EXE
  README.TXT
  DATA/LEVELS.DAT
  DATA/SOUNDS.DAT

Show only executable files

$ dosctl inspect dd228682 --executables
Inspecting files for 'Metal Mutant (1991)(Silmarils) [Action, Adventure]' (ID: dd228682)
Location: <dosctl-data-dir>/installed/dd228682
----------------------------------------
Executable files:
  METAL.EXE
  SETUP.EXE

Commands

  • dosctl list

    • Lists all available games.
    • -s, --sort-by [name|year]: Sort the list by name or year.
    • -i, --installed: Only show games that are currently installed.
  • dosctl search <query>

    • Searches for games. The query is optional if --year is used.
    • -y, --year <year>: Filter by a specific year.
    • -c, --case-sensitive: Make the search case-sensitive.
    • -s, --sort-by [name|year]: Sort the results by name or year.
  • dosctl run <game-id> [command-parts...]

    • Runs a game. Downloads and installs it if necessary.
    • Prompts for an executable on the first run.
    • Command Parts: You can specify the exact DOS command to run instead of using the saved default.
    • -c, --configure: Force the interactive executable selection menu to appear.

    Examples:

    dosctl run 62ef2769                    # Use saved/default executable
    dosctl run 62ef2769 --configure        # Choose executable interactively
    dosctl run 62ef2769 setup.exe          # Run specific executable
    dosctl run 62ef2769 game.exe -level 5  # Run with command-line arguments
    dosctl run 62ef2769 install.bat quiet  # Run batch file with parameters
    
  • dosctl inspect <game-id>

    • Shows the list of installed files for a game.
    • -e, --executables: Show only executable files (.exe, .com, .bat).
  • dosctl delete <game-id>

    • Deletes an installed game and its files.
  • dosctl refresh --force

    • Forces a re-download of the master game list from the Internet Archive.

Configuration

dosctl stores its data in platform-appropriate directories following OS conventions.

File Locations

Linux & macOS:

~/.local/share/dosctl/
├── downloads/         # Downloaded game archives (.zip files)
├── installed/         # Extracted and installed games
├── collections/       # Game collection metadata cache
├── current_session.json
└── installations.json

Windows:

%USERPROFILE%\AppData\Local\dosctl\
├── downloads\         # Downloaded game archives (.zip files)
├── installed\         # Extracted and installed games
├── collections\       # Game collection metadata cache
├── current_session.json
└── installations.json

Examples:

  • Linux: /home/username/.local/share/dosctl/
  • macOS: /Users/username/.local/share/dosctl/
  • Windows: C:\Users\username\AppData\Local\dosctl\

Storage Requirements

  • downloads/: Game archives (typically 1-50 MB each)
  • installed/: Extracted games (typically 2-100 MB each)
  • collections/: Metadata cache (~5 MB)

Plan for several GB of storage if you install many games.

Collection Backend

By default, dosctl uses the Total DOS Collection Release 14 from the Internet Archive as its game collection source. This comprehensive collection contains thousands of DOS games from the 1980s and 1990s, all ready to download and play.

The collection includes:

  • Classic DOS games from various genres (adventure, action, strategy, RPG, etc.)
  • Games from major publishers like LucasArts, Sierra, id Software, and many others
  • Both well-known titles and obscure gems
  • Games in their original format, preserved for historical accuracy

When you first run dosctl list or dosctl search, the tool will automatically download the complete game catalog from this collection. The games themselves are downloaded individually only when you choose to run them.

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-0.2.0.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

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

dosctl-0.2.0-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for dosctl-0.2.0.tar.gz
Algorithm Hash digest
SHA256 736dfd4a0f7805ca76e32bdcb69945b61e3cbc97ba6f997230f505f1330ef2e4
MD5 ae8d94036de48d47bd55694e05717c18
BLAKE2b-256 bc20828fc1b7f13ccc79d7d5f03a2d3bb36420b3f59b8c75c4ed44e541614cfe

See more details on using hashes here.

Provenance

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

Publisher: publish.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-0.2.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for dosctl-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d4c5510ee5d9e01cf2072848843d69fc70db0106a1e045d2c596ca43c9f0a9d
MD5 2a6421339ea139a9dd8ad5cead7dcd05
BLAKE2b-256 16a499dc4ccfc12407caac97d0a983a0ec919a5a894aca9b359a988b4a2282e9

See more details on using hashes here.

Provenance

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

Publisher: publish.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