Whisper CLI is a command-line interface tool that allows users to interact with the Whisper application, performing actions like signing up, logging in, setting availability for chat, viewing profiles, and listing active users.
Make sure you have the following installed:
- Python 3.6+
pip(Python package installer)requestspackage for handling HTTP requests
To install the necessary dependencies, run the following command:
pip install whisper_chatOnce you have installed the dependencies, you can use the whisper command in your terminal to interact with the CLI tool.
The basic format for using the Whisper CLI is:
whisper <command> --username <username> --password <password> --option <option>Each command has specific options and flags as described below.
To create a new user account:
whisper signup --username <your-username> --password <your-password>This command registers you as a new user in the application. Ensure that both username and password are provided.
To log into the application:
whisper login --username <your-username> --password <your-password>This command logs you in using your credentials and returns an authentication token that will be used in subsequent requests.
To set your availability for chatting:
whisper ready_to_chat --username <your-username>After running this command, you will be prompted to enter whether you're ready to chat:
- Enter
Yes,Y, orONto mark yourself as available. - Enter
No,N, orOFFto mark yourself as unavailable.
To view your profile information:
whisper profile --username <your-username>This command retrieves and displays details about your profile, such as your username, email, and current availability status.
To view a list of all active users (users who are available for chatting):
whisper active_users --username <your-username>This command will return a list of all users who are online and ready to chat.
The CLI supports the following commands:
| Command | Description | Required Arguments | Optional Arguments |
|---|---|---|---|
login |
Logs into the application | --username, --password |
|
signup |
Registers a new user | --username, --password |
|
ready_to_chat |
Sets your chat availability (ready/not ready) | --username |
|
profile |
Displays your profile information | --username |
|
active_users |
Lists all users who are available for chatting | --username |
-
Login
whisper login --username Al-Areef --password Wagwan
-
Signup
whisper signup --username Al-Areef --password Wagwan
-
Set Ready to Chat
whisper ready_to_chat --username Al-Areef
Then you will be prompted to type
Yes/YorNo/Nto set your availability. -
View Profile
whisper profile --username sAl-Areef
-
List Active Users
whisper active_users --username Al-Areef
We welcome contributions! If you have any features or improvements, feel free to open an issue or submit a pull request. Make sure to include tests for your new features or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for more details.