podx
v2.0.2
Published
π PODx - Ultimate X (Twitter) Scraper CLI with AI-powered bot detection and crypto analysis
Maintainers
Readme
PODx - Ultimate X (Twitter) Scraper CLI
π PODx is the ultimate X (Twitter) scraper and crypto analysis tool. Built with modern technologies and optimized for performance, PODx provides comprehensive Twitter data collection, advanced sentiment analysis, cryptocurrency signal generation, and powerful API capabilities.
β¨ Features
π¦ Advanced Twitter Scraping
- Real-time scraping from any public Twitter account
- Batch processing with rate limiting and concurrency control
- Search functionality with advanced filters (date ranges, engagement metrics)
- Hashtag and ticker tracking for crypto-related content
- Reply and conversation analysis for deeper insights
π Cryptocurrency Analysis
- Token extraction from tweets with blockchain validation
- Sentiment analysis with AI-powered emotion detection
- Bot detection to filter out spam and manipulation
- Trading signal generation based on social sentiment
- Solana contract analysis for DeFi protocols
π§ Powerful CLI Interface
- Interactive mode with guided workflows
- Batch processing for multiple accounts
- Progress tracking with real-time updates
- Flexible output formats (JSON, CSV, database)
- Configuration management for credentials and preferences
π REST API Server
- JWT authentication with tiered access control
- Real-time endpoints for live data streaming
- Signal API for trading applications
- Token analytics with market correlation
- Rate limiting and request management
π Data Analysis & Reporting
- Comprehensive analytics with statistical insights
- Trend detection and pattern recognition
- Export capabilities to multiple formats
- Database integration with Convex
- Performance monitoring and metrics
π¦ Installation
System Requirements
- Node.js: 20.0.0 or higher
- Bun: 1.0.0 or higher (recommended)
- Operating System: Linux, macOS, or Windows
Quick Install
# Install globally via npm
npm install -g podx
# Or install globally via bun (recommended)
bun add -g podx
# Or run directly with npx
npx podx --helpLocal Development Setup
# Clone the repository
git clone https://github.com/podx/podx.git
cd podx
# Install dependencies
bun install
# Build all packages
bun run build
# Link for development
bun link
# Verify installation
podx --versionDocker Installation
# Pull the official image
docker pull podx/podx:latest
# Run with Docker
docker run -it podx/podx --help
# Run with mounted volume for data persistence
docker run -it -v $(pwd)/data:/app/data podx/podx scrape -u elonmuskπ Quick Start
1. Initial Setup
# First run will guide you through setup
podx
# Or configure manually
podx config2. Basic Scraping
# Scrape tweets from an account
podx scrape -u elonmusk -c 100
# Scrape multiple accounts
podx batch -u "vitalik,cz_binance,solanatracker"
# Search for crypto content
podx crypto-search -t "BTC,ETH,SOL" -c 2003. Analysis
# Analyze scraped tweets
podx analyze -f scraped_data/elonmusk/tweets.json
# Generate trading signals
podx analyze -f crypto_tweets.json -o signals.json
# Account reputation analysis
podx accounts -f batch_results.json4. Start API Server
# Start the REST API server
podx serve -p 3000
# Generate API token
podx token -u trader1 -t premium -d 7d
# Use the API
curl -H "Authorization: Bearer YOUR_TOKEN" \
http://localhost:3000/api/v1/signals/topπ Usage Guide
Interactive Mode
PODx features an intuitive interactive mode for guided usage:
podxThis launches an interactive menu where you can:
- Configure credentials and preferences
- Choose scraping targets and parameters
- Select analysis options
- View results and export data
- Access help and documentation
Command Line Usage
Scraping Commands
# Single account scraping
podx scrape -u username -c 300
# Batch scraping
podx batch -u "user1,user2,user3" -c 200 --concurrent 3
# Search-based scraping
podx search -q "blockchain OR crypto" -c 500 --min-likes 10
# Hashtag tracking
podx hashtags -h "bitcoin,ethereum,defi" -c 300
# Ticker monitoring
podx tickers -t "BTC,ETH,SOL" -c 400Analysis Commands
# Sentiment analysis
podx analyze -f tweets.json -o sentiment_analysis.json
# Bot detection
podx accounts -f tweets.json -o bot_analysis.json
# Reply analysis
podx replies -f tweets.json -t BTC -c 50
# Solana contract extraction
podx solana-contracts -f tweets.jsonSystem Commands
# View system status
podx status
# Clean data and cache
podx clean --all
# Configuration management
podx config
# Generate API tokens
podx token -u user123 -t premium -d 7dAdvanced Usage
Custom Rate Limiting
# Respectful scraping with delays
podx scrape -u influencer --delay 5000
# High-volume batch processing
podx batch -f accounts.txt --concurrent 2 --delay 10000Output Customization
# JSON output (default)
podx scrape -u user -c 100 -o results.json
# CSV export for analysis
podx scrape -u user -c 100 -o results.csv --format csv
# Database export
podx convex -f results.json -t tweetsProgress Monitoring
# Real-time progress tracking
podx scrape -u large_account -c 1000 --progress
# Batch progress with ETA
podx batch -f users.txt --progress --etaπ Authentication & Security
Twitter/X Authentication
PODx requires Twitter credentials for scraping:
# Set environment variables
export XSERVE_USERNAME="your_twitter_username"
export XSERVE_PASSWORD="your_twitter_password"
export XSERVE_EMAIL="[email protected]"
# Or use the config command
podx configAPI Security
# Generate JWT tokens
podx token -u trader -t premium -d 30d
# Use tokens for API access
curl -H "Authorization: Bearer YOUR_TOKEN" \
http://localhost:3000/api/v1/signals/topData Privacy
- No data collection: PODx only scrapes public Twitter data
- Local storage: All data stored locally by default
- Optional cloud sync: Convex integration for data persistence
- Secure credentials: Encrypted credential storage
π API Reference
REST API Endpoints
Health & Status
GET /api/v1/health
GET /api/v1/ready
GET /api/v1/statusSignals & Analysis
GET /api/v1/signals/top
GET /api/v1/signals?ticker=BTC
POST /api/v1/signals/analyzeToken Information
GET /api/v1/tokens/trending
GET /api/v1/tokens/{symbol}
GET /api/v1/tokens/{symbol}/signalsAuthentication
POST /api/v1/auth/login
POST /api/v1/auth/token
GET /api/v1/auth/verifyAPI Examples
# Get top signals
curl -H "Authorization: Bearer TOKEN" \
http://localhost:3000/api/v1/signals/top
# Analyze specific token
curl -H "Authorization: Bearer TOKEN" \
-X POST \
-d '{"token": "BTC", "timeframe": "24h"}' \
http://localhost:3000/api/v1/signals/analyze
# Get trending tokens
curl http://localhost:3000/api/v1/tokens/trending?limit=10π Data Analysis Features
Sentiment Analysis
PODx uses advanced AI to analyze tweet sentiment:
- Emotion Detection: Identifies joy, anger, fear, surprise
- Confidence Scoring: Provides confidence levels for analysis
- Trend Analysis: Tracks sentiment changes over time
- Context Awareness: Considers tweet context and engagement
Bot Detection
Advanced algorithms identify bot accounts:
- Behavioral Analysis: Examines posting patterns and engagement
- Content Analysis: Detects repetitive or spammy content
- Network Analysis: Identifies coordinated bot networks
- Machine Learning: Uses ML models for classification
Signal Generation
Generates trading signals based on social data:
- Sentiment Signals: Bullish/bearish sentiment indicators
- Volume Signals: High engagement and mention volume
- Momentum Signals: Rapid changes in social sentiment
- Risk Assessment: Provides confidence and risk levels
Token Extraction
Automatically identifies cryptocurrency mentions:
- Symbol Recognition: Detects ticker symbols ($BTC, $ETH)
- Address Validation: Validates blockchain addresses
- Contract Analysis: Analyzes smart contract interactions
- Multi-chain Support: Bitcoin, Ethereum, Solana, and more
πΎ Data Storage & Export
Local Storage
# Default local storage
scraped_data/
βββ elonmusk/
β βββ tweets_2024-01-01T12-00-00.json
β βββ analysis_results.json
βββ batch_results/
βββ tweets_combined.json
βββ bot_analysis.jsonDatabase Integration
# Save to Convex database
podx convex -f analysis.json -t signals
# Query stored data
podx convex -q "signals.where(confidence > 0.8)"Export Formats
- JSON: Structured data with metadata
- CSV: Spreadsheet-compatible format
- Database: Direct database insertion
- API: Real-time data streaming
β‘ Performance & Optimization
Rate Limiting
PODx includes intelligent rate limiting:
// Automatic rate limiting based on tier
const rateLimits = {
free: { requests: 100, window: 3600000 }, // 100/hour
premium: { requests: 1000, window: 3600000 }, // 1000/hour
enterprise: { requests: 10000, window: 3600000 } // 10000/hour
};Concurrent Processing
# Optimize for your system
podx batch -f accounts.txt --concurrent 4 --delay 2000
# Auto-scale based on system resources
podx scrape -u large_account --auto-scaleMemory Management
- Streaming Processing: Handles large datasets without memory issues
- Chunked Analysis: Processes data in manageable chunks
- Garbage Collection: Automatic memory cleanup
- Resource Monitoring: Tracks memory and CPU usage
π§ Configuration
Environment Variables
# Twitter Credentials
XSERVE_USERNAME=your_username
XSERVE_PASSWORD=your_password
[email protected]
# API Configuration
JWT_SECRET=your-secret-key
API_PORT=3000
# Database
CONVEX_URL=your_convex_url
# Scraping
DEFAULT_MAX_TWEETS=300
CONCURRENT_SCRAPES=3
RATE_LIMIT_DELAY=2000
# Storage
DATA_DIR=./scraped_data
ANALYSIS_DIR=./analysisConfiguration File
Create .podxrc in your project root:
{
"scraping": {
"maxTweets": 300,
"concurrent": 3,
"delay": 2000,
"rateLimit": 30
},
"analysis": {
"sentimentThreshold": 0.7,
"botDetectionThreshold": 0.8,
"tokenConfidenceThreshold": 0.6
},
"api": {
"port": 3000,
"cors": true,
"rateLimit": {
"windowMs": 900000,
"max": 100
}
},
"logging": {
"level": "info",
"format": "json",
"outputs": ["console", "file"]
}
}π§ͺ Testing & Quality Assurance
Built-in Testing
# Run all tests
bun test
# Run specific test suites
bun test --scraping
bun test --analysis
bun test --api
# Run integration tests
bun test --integration
# Generate coverage report
bun test --coverageQuality Gates
- Type Safety: 100% TypeScript coverage
- Linting: ESLint with strict rules
- Security: Automated security scanning
- Performance: Benchmark testing
- Compatibility: Cross-platform testing
π Deployment
Production Server
# Build for production
bun run build
# Start production server
NODE_ENV=production podx serve -p 80
# Use process manager
pm2 start "podx serve -p 3000" --name podx-apiDocker Deployment
FROM oven/bun:latest
WORKDIR /app
COPY package.json bun.lockb ./
RUN bun install --production
COPY . .
RUN bun run build
EXPOSE 3000
CMD ["bun", "run", "start:prod"]# Build and run
docker build -t podx .
docker run -p 3000:3000 podxCloud Deployment
Vercel
# Deploy API to Vercel
vercel --prod
# Deploy CLI as serverless functions
vercel functions deployRailway
# Deploy to Railway
railway upRender
# Deploy to Render
render deployπ Monitoring & Analytics
System Monitoring
# View system status
podx status
# Monitor performance
podx status --performance
# View logs
podx status --logs
# Check API health
curl http://localhost:3000/api/v1/healthAnalytics Dashboard
PODx provides built-in analytics:
- Scraping Metrics: Success rates, speed, errors
- Analysis Results: Sentiment trends, signal accuracy
- API Usage: Request patterns, performance
- Data Quality: Bot detection rates, token validation
π€ Contributing
Development Setup
# Fork and clone
git clone https://github.com/yourusername/podx.git
cd podx
# Install dependencies
bun install
# Set up development environment
cp .env.example .env
# Edit .env with your credentials
# Run in development mode
bun run devCode Standards
- TypeScript: Strict type checking enabled
- ESLint: Airbnb config with TypeScript support
- Prettier: Consistent code formatting
- Husky: Pre-commit hooks for quality gates
Testing
# Run tests
bun test
# Run tests in watch mode
bun test --watch
# Run tests with coverage
bun test --coverage
# Run integration tests
bun test --integrationPull Request Process
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Wait for review and approval
π License
This project is licensed under the ISC License. See the LICENSE file for details.
π Acknowledgments
- Bun: For the blazingly fast JavaScript runtime
- Commander.js: For the excellent CLI framework
- Hono: For the lightning-fast web framework
- TypeScript: For type safety and developer experience
- Convex: For the real-time database platform
π Support & Community
Getting Help
- π§ Email: [email protected]
- π¬ Discord: PODx Community
- π Documentation: docs.podx.dev
- π Issues: GitHub Issues
- π‘ Discussions: GitHub Discussions
Community
- π Star the repo if you find it useful
- π Contribute by submitting issues and pull requests
- π’ Share PODx with your network
- π Sponsor the project to support ongoing development
π Roadmap
Version 2.1 (Coming Soon)
- [ ] Real-time WebSocket streaming
- [ ] Advanced ML models for sentiment analysis
- [ ] Multi-language support
- [ ] Plugin system for custom analyzers
Version 2.2 (Future)
- [ ] Mobile app companion
- [ ] Browser extension
- [ ] Advanced trading integrations
- [ ] Decentralized data storage
Built with β€οΈ for the crypto and social media analysis community
