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.