GramAddict Documentation

repository·master·Indexed 23 days ago

https://github.com/gramaddict/bot

An open-source Instagram automation tool that simulates human behavior to grow accounts safely. Instead of using the Instagram API, GramAddict operates via ADB (Android Debug Bridge) and uiautomator2 to control physical Android devices or emulators. Key features include human-like interactions, advanced filtering, scrape mode, and Telegram reporting. Requires Python 3 and an Android device running Android 4.4+ with Instagram set to English.

Tokens
2K
Snippets
4
Records
14
Agent score
82%

What's inside GramAddict

  1. Overview of GramAddict Instagram Automation

    master

    GramAddict is a free and open-source Instagram automation bot designed to grow following and engagement. Unlike many other bots, it does not use the Instagram API, which reduces the risk of account bans. Instead, it operates via ADB (Android Debug Bridge) and is powered by uiautomator2, acting as a wrapper for Android devices or emulators. It simulates human-like interactions on a physical Android phone, tablet, or emulator.

    Key Features:

    • No Root Required: Works on standard Android devices.
    • Human-like Behavior: Includes realistic random delays, human-like typing (using suggestions rather than letter-by-letter), and story watching.
    • Versatile Interactions: Can interact with followers, following, hashtag likers, place likers, specific bloggers, your feed, or lists of users/posts from .txt files.
    • Advanced Filtering: Supports blacklisting/whitelisting, filtering by account type (private/public/business), biography/name characters, and follower/following counts.
    • Scrape Mode: Can be used to collect usernames instead of interacting with them.
    • Reporting: Supports receiving activity reports via Telegram.
  2. GramAddict Account Directory Structure

    master

    When you run gramaddict init <account_name>, the following directory structure is created for that account. You should place your configuration and lists in these files:

    accounts/
      <youraccountname/
        config.yml
        telegram.yml
        filters.yml
        whitelist.txt
        blacklist.txt
        comments_list.txt
        pm_list.txt
  3. How GramAddict works and stays secure

    master

    GramAddict avoids the common pitfall of using Instagram's API, which often leads to bans within 1-30 days. Instead, it uses a testing-based approach:

    1. ADB & uiautomator2: The bot uses the Android Debug Bridge (ADB) and the uiautomator2 library to control an Android device or emulator.
    2. Device-Based Execution: The bot performs actions directly on the device (or emulator) just as a human would, making it significantly more secure and harder for Instagram to detect as a bot.
    3. Human Simulation: To prevent bans, the bot must be configured to mimic human patterns (e.g., not scrolling all day, not performing too many actions in a row).
  4. Set up an Android device or emulator

    master

    The bot requires an Android device (physical or emulator) running Android 4.4+ with Instagram installed and logged in. Instagram must be set to English.

    Physical Device

    1. Enable Developer Options and USB Debugging on the phone.
    2. Connect the phone to your computer via USB.
    3. Accept the connection prompt on the phone.

    Emulator (macOS)

    1. Install Homebrew and cask.
    2. Install Android Studio.
    3. Use the Virtual Device Manager in Android Studio to create a device (Pixel 2 API 28 is recommended).
    4. Run the device and install/log into Instagram.

    Verify Connection

    Run adb devices to ensure your device is recognized. You should see a device ID followed by device.

    adb devices
  5. Install GramAddict via pip or git

    master

    You can install GramAddict using pip (recommended) or by cloning the repository with git.

    Important Note: If you install via git, the CLI commands gramaddict init, gramaddict dump, and gramaddict run will not work. You must use the run.py script instead.

    It is highly recommended to use a Python virtual environment to avoid dependency conflicts.

    # 1. Create and activate a virtual environment
    python3 -m venv .venv
    source .venv/bin/activate
    
    # 2. Install via pip (Recommended)
    pip3 install GramAddict
    
    # Verify installation
    gramaddict --version
    
    # OR: Install via git
    git clone https://github.com/GramAddict/bot.git gramaddict
    cd gramaddict
    pip3 install -r requirements.txt
  6. Hardware and Software Requirements for GramAddict

    master

    To run GramAddict, you need a computer (Windows, macOS, Linux, or Raspberry Pi) and an Android device or emulator.

    Recommended Setup by OS:

    • Windows: Use Memu as an emulator.
    • macOS: Android Studio is recommended (can be installed via brew install --cask android-studio).
    • Mobile-only: You can run the bot directly on your phone using Termux.

    Core Technologies:

    • Python 3
    • ADB (Android Debug Bridge)
    • uiautomator2
  7. Initialize and run GramAddict

    master

    Before running the bot, you must initialize the environment and your specific account configuration.

    1. Initialize uiautomator2: uiautomator2 init
    2. Initialize GramAddict: gramaddict init <your_ig_account_name>
      • This creates an account folder at accounts/<your_ig_account_name>/ containing config.yml, telegram.yml, filters.yml, etc.
      • Note: This command only works if installed via pip. If installed via git, you must create these folders manually.
    3. Configure: Edit the generated .yml files in your account folder.
    4. Run the bot: Use the --config flag to point to your account's configuration file.
  8. Install and configure ADB (Android Debug Bridge)

    master

    GramAddict requires adb to communicate with your Android device or emulator.

    1. Download the Android SDK Platform-Tools.
    2. Add the path to the unzipped platform-tools folder to your system's PATH environment variable.
      • Linux/macOS: Add export PATH=/path/to/platform-tools:$PATH to your ~/.bash_profile or equivalent, then restart the terminal.
      • Windows: Add the folder path to your System Environment Variables via the 'Environment Variables' menu in System Properties.
    3. Verify the installation by running adb version in your terminal.
    adb version
  9. Run the GramAddict bot with run()

    master
    The run() function is the primary entrypoint for starting the GramAddict bot. It acts as a wrapper around start_bot and accepts arbitrary keyword arguments (**kwargs) which are passed directly to the bot's core flow. These arguments typically include configuration settings or overrides for the bot's behavior.
  10. Reference: GramAddict CLI Commands

    master

    The GramAddict CLI supports the following subcommands:

    CommandDescriptionFlags
    initCreates account folders under accounts/ with configuration files.account_name (positional, one or more)
    runStarts the bot.--config (optional path to config.yml)
    dumpDumps the current screen (screenshot + XML hierarchy) into a ZIP file.--device (device name), --no-kill (boolean flag)
  11. Initialize account configuration with 'init'

    master

    The init command sets up the necessary files to start using GramAddict for a specific Instagram account. It creates a folder under accounts/{account_name} containing configuration templates downloaded from the official repository. It also ensures a run.py file exists in the current working directory.

    Note: After running this, you must edit the generated config.yml file according to the GramAddict documentation.

  12. Dump current screen with 'dump'

    master

    The dump command captures the current state of the connected Android device. It generates a ZIP archive containing a screenshot (screenshot.png) and the UI hierarchy (hierarchy.xml). This is useful for debugging or providing context to developers.

    Flags:

    • --device: Specify the device name if multiple devices are connected via ADB.
    • --no-kill: Prevents the command from killing the atx-agent (uiautomator2 daemon).