Skip to content

A command-line application that provides a secure and user-friendly way to manage your sensitive pins

License

Notifications You must be signed in to change notification settings

CoderRony955/PinSL

Repository files navigation

PinSL: A Secure Console-Based Pin Manager

PinSL is a command-line application that provides a secure and user-friendly way to manage your sensitive pins and credentials directly from the console. It uses a local PostgreSQL database to store your information, ensuring that your data remains private and under your control.

Key Features

  • Secure Credential Storage: All pins are stored in a local PostgreSQL database, offering a robust and secure storage solution.
  • Intuitive CLI Commands: PinSL offers a simple and intuitive set of commands to manage your credentials, including adding, updating, viewing, and deleting pins.
  • User-Friendly Interface: The application leverages the rich library to provide a visually appealing and easy-to-navigate console interface.
  • Environment-Based Configuration: Database connection details are managed through a .pinsl.env file, keeping your credentials separate from the main codebase.

Getting Started

Prerequisites

  • Python 3.13 or higher
  • PostgreSQL installed and running on your local machine

Installation

  1. Clone the repository:

    git clone https://github.com/CoderRony955/PinSL
    cd PinSL
  2. Install dependencies:

    pip install -r requirements.txt
  3. Set up the database:

    • Create a new PostgreSQL database named mypins.
    • Create a allpins table using the following SQL command:
    CREATE TABLE public.allpins
    (
       id bigserial NOT NULL,
       platform text NOT NULL,
       pin text NOT NULL,
       PRIMARY KEY (id)
    );
    
    ALTER TABLE IF EXISTS public.allpins
       OWNER to postgres;

    or you can use the following image to create table in pgAdmin: Database Setup

  4. Run the application:

    python pinsl.py

    On the first run, you will be prompted to enter your database credentials, which will be saved in a .pinsl.env file for future use.

Windows Installation

For Windows users, a pre-built .exe file is available in the build folder. Follow these steps to run PinSL on your system:

  1. Download the pinsl folder for Windows.
  2. Set the environment variable:
    • Open the Start Menu and search for "environment variables."
    • Click on "Edit the system environment variables."
    • In the System Properties window, click the "Environment Variables" button.
    • In the "System variables" section, select the Path variable and click "Edit."
    • Click "New" and add the full path to the pinsl folder.
  3. Run PinSL from the terminal:
    • Open a new terminal window.
    • Type pinsl and press Enter.
    • Add Database Credentials.
    • Then restart the pinsl and all set!

Note: if you entered wrong credentials for your local postgres databse connection then no need to worry, you just need to go C:/Users/<name> and find for .pinsl.env file just delete it and run pinsl again in your terminal and enter your right database connection credentials.

Usage

PinSL provides a straightforward command-line interface for managing your pins. Below are the available commands:

Command Description
pinadd -cred 'pin' -of 'platform' Add a new pin for a specific platform.
pinup -new 'pin' -of 'platform' Update an existing pin for a platform.
pinrm -of 'platform' Remove a pin for a specific platform.
pins View all your saved pins.
pin -of 'platform' View a specific pin for a platform.
help or h Display all available commands.
q, exit, or quit Exit the PinSL console.

Project Structure

The project is organized into the following directories:

  • about/: Contains modules for displaying the welcome message and command information.
  • db/: Manages database operations, including connecting to the database and performing CRUD operations.
  • operations/: Implements the core logic for handling different commands, such as adding, updating, and deleting pins.
  • sql_queries/: Includes SQL scripts for setting up the database and tables.
  • style/: Provides text styling for the console output.

Contributing

Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.

License

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

About

A command-line application that provides a secure and user-friendly way to manage your sensitive pins

Topics

Resources

License

Stars

Watchers

Forks

Languages