Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CodePhyt/LinkedIn-Autopilot

Repository files navigation

GhostLink - The Autonomous LinkedIn Agent

A local-first, full-stack application that automates LinkedIn engagement using your existing Chrome browser session via Remote Debugging Port.

๐Ÿš€ Features

  • Browser Connection: Connects to existing Chrome session (no login needed)
  • Stealth Mechanics: Human-like behavior with random delays, mouse movements, and scrolling
  • Auto Engagement: Automatically likes and comments on posts
  • Connection Management: Sends personalized connection requests
  • Inbox Handling: Reads and drafts replies to messages using AI
  • Safety Limits: Daily action limits to prevent bans
  • Real-time Dashboard: Flutter desktop app with live terminal and safety gauges

๐Ÿ“‹ Prerequisites

  1. Python 3.12+
  2. Flutter SDK (for desktop support)
  3. Chrome/Chromium with remote debugging enabled
  4. Google Gemini API Key

๐Ÿ› ๏ธ Setup

1. Start Chrome with Remote Debugging

# Windows
chrome.exe --remote-debugging-port=9222
# macOS
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
# Linux
google-chrome --remote-debugging-port=9222

2. Backend Setup

cd backend
pip install -r requirements.txt
playwright install chromium
# Set your Gemini API key
export GEMINI_API_KEY=your_api_key_here
# Or create a .env file with GEMINI_API_KEY=your_api_key_here
# Run the backend
python main.py

The backend will start on http://localhost:8000

3. Frontend Setup

cd frontend
flutter pub get
flutter run -d windows # or -d macos, -d linux

๐Ÿ“ Project Structure

LinkedIn Autopilot/
โ”œโ”€โ”€ backend/
โ”‚ โ”œโ”€โ”€ browser_manager.py # Browser CDP connection
โ”‚ โ”œโ”€โ”€ humanizer.py # Stealth mechanics
โ”‚ โ”œโ”€โ”€ ai_service.py # Gemini AI integration
โ”‚ โ”œโ”€โ”€ feed_scanner.py # LinkedIn feed scanning
โ”‚ โ”œโ”€โ”€ auto_engager.py # Auto like/comment
โ”‚ โ”œโ”€โ”€ connection_manager.py # Connection requests
โ”‚ โ”œโ”€โ”€ inbox_handler.py # Message handling
โ”‚ โ”œโ”€โ”€ daily_limit_service.py # Safety limits
โ”‚ โ”œโ”€โ”€ main.py # FastAPI application
โ”‚ โ”œโ”€โ”€ database/
โ”‚ โ”‚ โ”œโ”€โ”€ models.py # SQLAlchemy models
โ”‚ โ”‚ โ””โ”€โ”€ database.py # Database setup
โ”‚ โ””โ”€โ”€ requirements.txt
โ”œโ”€โ”€ frontend/
โ”‚ โ”œโ”€โ”€ lib/
โ”‚ โ”‚ โ”œโ”€โ”€ main.dart # Flutter app entry
โ”‚ โ”‚ โ”œโ”€โ”€ screens/
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ dashboard_screen.dart
โ”‚ โ”‚ โ”œโ”€โ”€ widgets/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ terminal_widget.dart
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ control_panel_widget.dart
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ safety_gauge_widget.dart
โ”‚ โ”‚ โ””โ”€โ”€ providers/
โ”‚ โ”‚ โ”œโ”€โ”€ websocket_provider.dart
โ”‚ โ”‚ โ””โ”€โ”€ api_provider.dart
โ”‚ โ””โ”€โ”€ pubspec.yaml
โ””โ”€โ”€ README.md

๐ŸŽฎ Usage

  1. Start Chrome with remote debugging (port 9222)
  2. Log into LinkedIn in that Chrome window
  3. Start the backend: python backend/main.py
  4. Start the frontend: flutter run from the frontend directory
  5. Use the dashboard to:
    • View real-time logs in the terminal
    • Toggle auto-engagement features
    • Start agent tasks (Engage Feed, Check Inbox)
    • Monitor safety limits

โš™๏ธ Configuration

Daily Limits (in daily_limit_service.py)

  • Max Connects: 20/day
  • Max Likes: 50/day
  • Max Comments: 30/day
  • Max Messages: 10/day

AI Settings

The AI service uses Google Gemini 1.5 Flash for:

  • Generating comments on posts
  • Creating personalized connection notes
  • Drafting message replies (with RAG from resume.txt)

๐Ÿ”’ Safety Features

  • Daily Limits: Prevents exceeding LinkedIn's rate limits
  • Human-like Behavior: Random delays, mouse movements, scrolling
  • Error Handling: Graceful handling of missing elements
  • Action Logging: All actions are logged to the database

๐Ÿ“ Notes

  • Resume.txt: Place a resume.txt file in the project root for RAG-based message replies
  • Database: SQLite database is created automatically in backend/database/ghostlink.db
  • WebSocket: Real-time logs are streamed via WebSocket to the Flutter frontend

โš ๏ธ Disclaimer

This tool is for educational purposes. Use responsibly and in accordance with LinkedIn's Terms of Service. Automated actions may violate LinkedIn's policies.

๐Ÿ› Troubleshooting

Browser not connecting?

  • Make sure Chrome is running with --remote-debugging-port=9222
  • Check that port 9222 is not blocked by firewall

AI service not working?

  • Verify your GEMINI_API_KEY is set correctly
  • Check API quota limits

Flutter build errors?

  • Run flutter pub get to install dependencies
  • Ensure you have Flutter desktop support enabled

๐Ÿ“„ License

This project is for educational purposes only.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle ใซใ‚ˆใฃใฆๅค‰ๆ›ใ•ใ‚ŒใŸใƒšใƒผใ‚ธ (->ใ‚ชใƒชใ‚ธใƒŠใƒซ) /