Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ragul-rofi/javacommandprompt
A terminal inspiration with basic commands in a GUI environment completely built in JAVA.
https://github.com/ragul-rofi/javacommandprompt
commad-line-interface gui java javafx swing
Last synced: 11 days ago
JSON representation
A terminal inspiration with basic commands in a GUI environment completely built in JAVA.
- Host: GitHub
- URL: https://github.com/ragul-rofi/javacommandprompt
- Owner: ragul-rofi
- License: mit
- Created: 2024-12-01T20:43:20.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-21T18:56:50.000Z (about 2 months ago)
- Last Synced: 2024-12-21T19:36:44.095Z (about 2 months ago)
- Topics: commad-line-interface, gui, java, javafx, swing
- Language: Java
- Homepage: https://ragul-rofi.github.io/JavaCommandPrompt/
- Size: 178 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ragul's Command Prompt
This project is a simple command-line interface (CLI) implemented using Java and Swing. It simulates a terminal/command prompt experience with a few basic commands like `ls`, `cd`, `pwd`, and `exit`. The program is designed to be used as a terminal emulator with the following features:
- **Directory Navigation**: Change directories and list files.
- **Command Execution**: Execute simple terminal commands.
- **Simple UI**: A graphical user interface (GUI) that mimics a Linux terminal.## Features
- **Directory Navigation**:
- `cd `: Change the current directory.
- `pwd`: Display the current directory path.
- `ls`: List files in the current directory.
- `touch`: Creates a new empty file.
- `rmvf`: Deletes the file in the directory.
- **Exit the Program**:
- `exit`: Exit the terminal.
- **Keyboard Shortcuts**:
- **Enter**: Submit a command.
- **Ctrl + q**: Exit the application.## Installation
To use the Command Prompt, you'll need to have Java installed on your machine.
### 1. Clone the Repository
Clone the project to your local machine:
```bash
git clone https://github.com/your-username/command-prompt.git
```
### 2. Compile the Project
Navigate to the project directory and compile the Java file:
```bash
javac CommandPrompt.java
```
### 3. Run the program
After compiling, run the application using the following command:
``` bash
java CommandPrompt
```Usage
-----Once the program starts, a window will appear that simulates a terminal. The current directory will be displayed followed by the `%` prompt. You can type commands like:
* `ls` to list the files in the current directory.
* `cd` to change the current directory.
* `pwd` to show the current directory path.
* `touch` to create a new file.
* `rmvf` deletes the file.
* `exit` to close the terminal.
Contributions
Feel free to fork the project and submit pull requests with any improvements or bug fixes.
License
-------This project is open-source and available under the MIT License.