MyCMD
A custom command prompt implemented in Java that mirrors Windows cmd.exe with familiar commands and easy installers for Windows and Linux.
Build: passingJava: 17+License: ApacheWindows | Linux
Features
Windows-like Commands
dir, cd, mkdir, del, copy, type, cls, help, exit and more.
Extensible
Add new commands by implementing simple Java classes.
Installers
Launch4j executable and Inno Setup installer for Windows. jpackage for Linux.
Cross-platform
Works on Windows and Linux with Java 17+.
Open Source
Apache License. Contributions welcome.
Simple Scripts
Build scripts for packaging and distribution are included.
Project Structure
MyCMD/ ┣ README.md ┣ pom.xml ┣ src/ ┃ ┗ main/ ┃ ┗ java/ ┃ ┗ com/ ┃ ┗ mycmd/ ┃ ┣ App.java ┃ ┣ ShellContext.java ┃ ┣ Command.java ┃ ┗ commands/ ┃ ┣ 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/ ┣ scripts/ ┣ installer/ ┗ dist/
Installation
Windows
scripts\\build-windows.bat
Builds the JAR, wraps it into an .exe with Launch4j, and generates a setup.exe with Inno Setup.
Linux
chmod +x scripts/build-linux.sh ./scripts/build-linux.sh
Uses jpackage to build a .deb or .rpm package.
Usage
> dir > cd .. > mkdir test > echo Hello World! > type file.txt > del file.txt > help > exit
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Open a Pull Request
License
Apache License as per the original project.