Skip to main content

Automate posting to multiple social media platforms right from your terminal.

Project description

Valid Social CLI 📱

A powerful command-line tool designed to automate posting to multiple social media platforms, including Instagram and X (formerly Twitter), directly from your terminal.

Python Version License: MIT Version


Overview

Valid Social streamlines your social media workflow by leveraging browser automation to post content on your behalf. It uses a persistent browser profile to save your login sessions, so you only need to log in once. The interactive CLI guides you through selecting platforms, writing captions, and uploading media, making cross-platform posting fast and efficient.

✨ Features

  • Multi-Platform Support: Post to Instagram and X simultaneously. Support for Facebook and TikTok is planned for future releases.
  • Persistent Login: Log in once manually through the CLI. Your session is securely saved for all future automated posts.
  • Interactive Interface: An intuitive command-line interface guides you through composing your posts, from writing captions to selecting media.
  • Media Uploads: Attach images and videos to your posts with a simple file selector.
  • Stealth Automation: Utilizes Playwright with stealth configurations to mimic human behavior and reduce the risk of detection.

🚀 Getting Started

Follow these instructions to get the project up and running on your local machine.

Prerequisites

  • Python 3.9+
  • pip and venv

Installation

  1. Clone the Repository

    git clone https://github.com/thevalidcode/valid-social.git
    cd valid-social
    
  2. Create and Activate a Virtual Environment

    • On macOS/Linux:
      python3 -m venv venv
      source venv/bin/activate
      
    • On Windows:
      python -m venv venv
      .\venv\Scripts\activate
      
  3. Install Dependencies Install the project and its dependencies from pyproject.toml.

    pip install .
    
  4. Install Browser Binaries Playwright requires browser binaries to function. This command will download them.

    playwright install
    

⚙️ Usage

Using Valid Social involves two main steps: logging in to save your session and then creating posts.

1. Login to a Platform

You must first log in to each platform you want to automate. This command opens a browser window for you to log in manually. Once you're done, your session cookies are saved for future use.

  • For Instagram:

    valid-social login --platform instagram
    
  • For X (Twitter):

    valid-social login --platform x
    

After running the command, a browser will open. Log in to your account as you normally would. Once you see your feed, you can close the browser and return to the terminal.

2. Create a Post

To create a new post, use the post command. You can run it interactively or provide all the details via flags.

Interactive Mode

This is the easiest way to get started. The CLI will prompt you for each step.

valid-social post

You will be guided through:

  1. Selecting Platforms: A numbered list of available platforms will be displayed.
  2. Writing a Caption: An editor will open for you to type your caption. Type END on a new line to finish.
  3. Uploading Media: A system file picker will open, allowing you to select one or more images/videos.

Non-Interactive Mode (with flags)

You can also provide all the information directly as command-line arguments. This is useful for scripting.

valid-social post --platform Instagram --platform X --caption "Check out this amazing photo! #automation #python" --media "/path/to/your/image.jpg"

🛠️ Technologies Used

Technology Description
Python The core programming language used for the project.
Typer A modern and intuitive library for building CLIs.
Playwright A powerful library for reliable browser automation.

🤝 Contributing

Contributions are welcome! If you have an idea for a new feature or have found a bug, please follow these steps:

  1. Fork the repository on GitHub.
  2. Create a new branch: git checkout -b feature/your-feature-name
  3. Make your changes and commit them: git commit -m 'Add some feature'
  4. Push to the branch: git push origin feature/your-feature-name
  5. Open a Pull Request and describe your changes.

📄 License

This project is licensed under the MIT License.

👤 Author

Ibeh Precious (Valid)


Readme was generated by Dokugen

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

valid_social-0.1.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

valid_social-0.1.1-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file valid_social-0.1.1.tar.gz.

File metadata

  • Download URL: valid_social-0.1.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for valid_social-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fc64a272ca48624b10c530bff17af36d80a28770c54cd13588544a85d53a0f30
MD5 5bb36b399706c42357b7f7ae51e80d3a
BLAKE2b-256 e50522259b4e0d05e17b3c82ffb6c077054a9bd950928684b1c1d56a2b39e37c

See more details on using hashes here.

File details

Details for the file valid_social-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: valid_social-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for valid_social-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3fdb83d09b4740c5b11b433bf75ac15632cc2609b4eddffa579e31d34f7b28c5
MD5 55ec4213352a3be105286770d3324df7
BLAKE2b-256 5fab3b5a4944974fd29ed4eec6034ec6b720ff46b7a4f3dee1e07c5b0010f5cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page