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)
- β
Windows-like commands (
dir
,cd
,mkdir
,del
,copy
,type
,cls
) - β Extensible via Java classes (easy to add new commands)
- β
Packaged into
.exe
using Launch4j - β Installer wizard using Inno Setup
- β
Works on Windows and Linux (via
jpackage
)
To build MyCMD you need:
- Java JDK 17+
- Apache Maven
- Launch4j (for
.exe
wrapping) - Inno Setup (for Windows installer)
(Linux users can use jpackage
instead of Launch4j/Inno Setup.)
scripts\build-windows.bat
ππ» This will:
-
Build the JAR with Maven
-
Wrap it into an .exe with Launch4j
-
Generate a setup.exe installer with 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
-
Fork the repo (or request an invite if itβs in the org)
-
Create a feature branch
-
Commit your changes
-
Open a Pull Request
Licensed under the Apache License You are free to use, modify, and distribute.