MyCMD is a fully custom command prompt implemented in Java.
It mimics the behavior of Windows cmd.exe with commands like dir, cd, echo, mkdir, del, and more — plus it has its own installer.
For a complete guide detailing the syntax, arguments, and options for every command, please see the full COMMANDS.md file.
MyCMD/ ┣ README.md # Project description, badges, usage ┣ pom.xml # Maven build config ┣ src/ ┃ ┗ main/ ┃ ┗ java/ ┃ ┗ com/ ┃ ┗ mycmd/ ┃ ┣ App.java # Main entry point (starts the shell) ┃ ┣ ShellContext.java # Stores current working dir, state ┃ ┣ Command.java # Interface for all commands ┃ ┗ commands/ # All custom command classes ┃ ┣ DirCommand.java ┃ ┣ CdCommand.java ┃ ┣ EchoCommand.java ┃ ┣ MkdirCommand.java ┃ ┣ RmdirCommand.java ┃ ┣ CopyCommand.java ┃ ┣ DelCommand.java ┃ ┣ TypeCommand.java ┃ ┣ ClsCommand.java ┃ ┣ HelpCommand.java ┃ ┣ ExitCommand.java ┃ ┗ VersionCommand.java ┣ icons/ ┃ ┗ mycmd.ico # App/installer icon ┣ scripts/ ┃ ┣ build-windows.bat # Build + package EXE + run installer script ┃ ┗ build-linux.sh # Build + package for Linux (deb/rpm) ┣ installer/ ┃ ┗ mycmd.iss # Inno Setup script for Windows installer ┗ dist/ # Output folder (auto-created after build) ┣ bin/ ┃ ┗ MyCMD.exe # Wrapped executable (via Launch4j or jpackage) ┣ lib/ ┃ ┗ dependencies.jar # Extra JAR dependencies (if any) ┗ setup.exe # Generated installer (from Inno Setup) | Feature | Description |
|---|---|
| ✅ Windows-like Commands | Supports dir, cd, mkdir, del, copy, type, cls |
| ⚡ Extensible | Easily add new commands via Java classes |
| 🖥️ Executable Packaging | Packaged into .exe using Launch4j |
| 🛠️ Installer Wizard | Simple setup using Inno Setup |
| 🌐 Cross-Platform | Works on Windows and Linux (via jpackage) |
To build MyCMD you need:
- Java JDK 17+
- Apache Maven
- Launch4j (for
.exewrapping) - Inno Setup (for Windows installer)
(Linux users can use jpackage instead of Launch4j/Inno Setup.)
Building MyCMD is simple and automated for both Windows 🪟 and Linux 🐧 platforms
scripts\build-windows.bat📦 This script will automatically:
1.🧩 Build the JAR using Apache Maven
2.⚙️ Wrap it into an .exe using Launch4j
3.🪄 Generate a setup.exe installer via Inno Setup
dist/ ┣ bin/MyCMD.exe ┣ lib/dependencies.jar ┗ setup.exe chmod +x scripts/build-linux.sh ./scripts/build-linux.sh This will build a .deb or .rpm package using jpackage.
After installation, run:
MyCMD You can now use commands like:
> dir > cd .. > mkdir test > echo Hello World! > type file.txt > del file.txt > help > exit Note
There are many commands left like ls and Ping Command
Contributions are what make the open-source community such an amazing place to learn, inspire, and create! 💪
We welcome all kinds of improvements — from fixing bugs 🐛 to adding new commands ⚙️.
- 🍴 Fork the repository
- 🌿 Create a new branch
git checkout -b feature/your-feature-name
🧾 Apache License 2.0
This project is open-source and available for anyone to use, modify, and share under the terms of the Apache License.
✨ Attribution is appreciated but not required.
📎 For complete terms, check the LICENSE file.