Skip to content

MyCustomShell is an open-source project focused on creating a modern, intuitive, and powerful command-line experience. Unlike traditional shells, our goal is to provide helpful feedback to the user, such as intelligent suggestions for mistyped commands.

License

Notifications You must be signed in to change notification settings

PedrinDev1447/MyCMD

 
 

Repository files navigation

💻 MyCMD – A Custom Command Prompt in Java

Build Java License Platform

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.


📂 Project Structure

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)

🚀 Features

  • ✅ 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)

📦 Requirements

To build MyCMD you need:

(Linux users can use jpackage instead of Launch4j/Inno Setup.)


🛠️ Build Instructions

🔹 Windows

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

Final Output

dist/
 ┣ bin/MyCMD.exe
 ┣ lib/dependencies.jar
 ┗ setup.exe

Linux

chmod +x scripts/build-linux.sh
./scripts/build-linux.sh

This will build a .deb or .rpm package using jpackage.

🖥️ Usage

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

🧩 Extending MyCMD

Note

There are many commands left like ls and Ping Command

🤝 Contributing

  • Fork the repo (or request an invite if it’s in the org)

  • Create a feature branch

  • Commit your changes

  • Open a Pull Request

📜 License

Licensed under the Apache License You are free to use, modify, and distribute.

About

MyCustomShell is an open-source project focused on creating a modern, intuitive, and powerful command-line experience. Unlike traditional shells, our goal is to provide helpful feedback to the user, such as intelligent suggestions for mistyped commands.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 96.3%
  • Inno Setup 1.5%
  • Shell 1.2%
  • Batchfile 1.0%