Git Product home page Git Product logo

pankajsingh92533 / cli-chat Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 2.0 60 KB

Cli-Chat is a terminal-based chat application that empowers developers to send crucial messages, commands, and files directly from their command line interface. Built with Node.js, Python, and Firebase, it offers secure, real-time communication for tech enthusiasts. Join us and enhance your command line communication experience today!

Home Page: https://termichat.vercel.app/

License: MIT License

JavaScript 22.86% Python 77.14%

cli-chat's Introduction

Server and Client CLI Project

CodeQL Build Binary Release

This project consists of a Node.js server and a client CLI written in Python. The server provides a set of APIs that the client can use to perform various operations.

Getting Started

To get started with this project, you'll need to follow these steps:

  1. Clone the repository to your local machine.
  2. Install the necessary dependencies by running npm install in the server directory.
  3. Start the server by running npm start in the server directory.
  4. Download the client CLI from the client-cli.py file in the client directory.
  5. Run the client CLI by running python client-cli.py in the client directory.

Alternatively, you can download the pre-built binaries for the client CLI from the releases page on GitHub.

Server

The server.js file is the main file for the Node.js server in this project. It provides a set of APIs for a client application to perform various operations. The server uses Express and Socket.IO to handle incoming requests and real-time communication with clients. The server also uses Firebase for authentication and database storage.

Client CLI

The client-cli.py file is a command-line interface (CLI) for the client in this project. It is written in Python and communicates with the server over a network using the APIs provided by the server.

Usage

To use the client CLI, run python client-cli.py in the client directory. The CLI will prompt you for input and provide output based on the commands you enter.

The following commands are available in the client CLI:

  • get_contacts: Gets a list of contacts.
  • add_contact: Adds a new contact.
  • send_message: Sends a message to a contact.
  • get_message_history: Gets the message history for a contact.
  • exit: Exits the client CLI.

Authentication in the Client CLI

The client CLI uses Firebase for authentication. When you run the python client-cli.py command, the CLI will open a URL in your default web browser that prompts you to log in to the Firebase authentication service.

Once you have logged in, Firebase will redirect you to a success or a failure page. The client CLI will automatically extract this token from the URL and use it to authenticate with the server.

After you have successfully authenticated, the client CLI will display your username and a message indicating that you are logged in. The authentication token will be stored in a file called .clientCredentials in the home directory.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Usage

To use the client CLI, run python client-cli.py in the client directory. The CLI will prompt you for input and provide output based on the commands you enter.

Building from Source

To build the client CLI from source, you'll need to have Python 3 installed on your machine. Then, follow these steps:

  1. Clone the repository to your local machine.
  2. Install the necessary dependencies by running pip install -r requirements.txt in the client directory.
  3. Run pyinstaller --onefile client-cli.py in the client directory.
  4. The built binaries will be located in the dist directory.

Contributing

If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Make your changes and commit them.
  4. Push your changes to your fork.
  5. Create a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

cli-chat's People

Contributors

dependabot[bot] avatar sukhmeetsingh2002 avatar

Forkers

zahid92 radhey644

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.