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