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.1.0

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: ~/.local/share/dosctl/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: ~/.local/share/dosctl/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 standard user directories. On macOS, this will be:

  • Configuration: ~/.config/dosctl/run_config.json
  • Data & Cache: ~/.local/share/dosctl/

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.1.0.tar.gz (25.2 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.1.0-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for dosctl-0.1.0.tar.gz
Algorithm Hash digest
SHA256 048e6cdca6869edd43e49afaf28ea79d10e02b41f2ca4d2ab40cda2d41490f23
MD5 00c084e8534c1f05b49ef0e0ccf7246d
BLAKE2b-256 20299550c62c40cb78cad297ac08ef0318e2fc394a60fdd2185ad86f63b59cf8

See more details on using hashes here.

Provenance

The following attestation bundles were made for dosctl-0.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: dosctl-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.6 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 407e278e70df88a02c5d7dde35c67c95b38dbabe6bf47a814523efcf2211700d
MD5 b82aeb34c63aa6036a144cc94dfe725b
BLAKE2b-256 5c43f1c6bfd0149c39e93fa1b31e4f3ed7c7a33d927c290dd27ca9aeb46f4599

See more details on using hashes here.

Provenance

The following attestation bundles were made for dosctl-0.1.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