A command-line interface (CLI) tool for interacting with a chat application built using FastAPI. This tool allows users to create users, create rooms, get room details, and join rooms for chatting and many more (under development).
- User Management: Create new users with usernames and passwords.
- Room Management: Create new chat rooms with room names and creator IDs.
- Room Details: Retrieve details of existing chat rooms.
- Chatting: Join existing chat rooms and start chatting with other users.
-
Clone the repository:
git clone https://github.com/Utkarsh4517/fast_chat.git
-
Install dependencies:
pip install -r requirements.txt
-
Navigate to the
appdirectory:cd fast_chat/app -
Run the FastAPI app using Uvicorn:
uvicorn app:app --reload
-
Navigate to the
clidirectory:cd fast_chat/cli -
Run the CLI:
python cli.py <command>
To create a new user, run the following command:
python cli.py create_userFollow the prompts to enter the username and password for the new user.
To create a new room, run the following command:
python cli.py create_roomFollow the prompts to enter the room name and creator ID for the new room.
To get details of a specific room, run the following command:
python cli.py get_room_detailsFollow the prompts to enter the room ID.
To join a room and start chatting, run the following command:
python cli.py join_roomFollow the prompts to enter your username and the room ID.
The project uses SQLite as the database. The database file is named chat.db and contains tables for storing users, rooms, and messages.
This project is licensed under the MIT License.