IMPORTANT DISCLAIMER > Use with your own caution. You can be banned because of an automation it's unclear. This tool automates web-based AI platforms (ChatGPT, Gemini, Claude) which may violate their Terms of Service. Using automation could result in account suspension or permanent bans. The authors are not responsible for any consequences. Use at your own risk.
Automate bulk artifact generation (images, text, code) across multiple AI platforms using Selenium-based browser automation.
- What This Tool Does
- Features
- Project Structure
- Installation
- Configuration
- Usage
- Markdown Format
- Supported AI Providers
- How It Works
- Chrome Profile Options
- Common Issues
- Performance & Optimization
- Best Practices
- Extending the Tool
- License
This automation tool eliminates the tedium of manually generating hundreds of artifacts using AI web interfaces.
- Open ChatGPT/Gemini/Claude manually
- Type each prompt one by one
- Wait for generation
- Download each file individually
- Rename and organize files manually
- Define all artifacts in a markdown file
- Run one command:
python src/main.py prompts.md - Let automation handle everything
- Get organized artifacts in
./artifactsfolder
- Multi-Provider Support: Works with ChatGPT, Gemini, and Claude
- Bulk Generation: Process hundreds of artifacts automatically
- Smart Download Management: Automatic file detection, waiting, and organization
- Chrome Profile Support: Stay logged in or use your existing profile
- Flexible Configuration: JSON-based configuration system
- Error Handling: Automatic retries, detailed logging, error screenshots
- Progress Tracking: Real-time progress indicators and statistics
- Session Management: Reuses browser sessions across artifacts
- Type Support: Images, text documents, code files
- Skip Existing: Optionally skip already-generated artifacts
- Headless Mode: Run invisibly in the background
ai-tools-gui-automation/
βββ src/ # Source code
β βββ __init__.py # Package initialization
β βββ main.py # Main orchestration script
β βββ markdown_parser.py # Parse artifact definitions
β βββ file_manager.py # File operations and organization
β βββ base_provider.py # Base class for AI providers
β βββ gemini_provider.py # Gemini automation
β βββ chatgpt_provider.py # ChatGPT automation
β βββ claude_provider.py # Claude automation
β
βββ bulk_data/ # Your markdown prompt files
β βββ EXAMPLE_PROMPTS.md # Example: 76 prompts
β
βββ artifacts/ # Generated artifacts (gitignored)
βββ downloads/ # Temporary downloads (gitignored)
βββ chrome_automation_profile/ # Dedicated Chrome profile (gitignored)
β
βββ config.json # Configuration settings
βββ requirements.txt # Python dependencies
βββ test_setup.py # Setup verification script
βββ find_chrome_profile.py # Find your Chrome profile path
β
βββ PROJECT_SUMMARY.md # Detailed project documentation
βββ QUICK_START.md # Quick start guide
βββ example_usage.md # Usage examples
βββ README.md # This file
- Python 3.8+
- Google Chrome (latest version)
- Active accounts on AI platforms you want to use (ChatGPT, Gemini, Claude)
git clone https://github.com/yourusername/ai-tools-gui-automation.git
cd ai-tools-gui-automationpip install -r requirements.txtpython test_setup.pyThis checks:
- Python version
- Dependencies installation
- Chrome and ChromeDriver
- Directory structure
- Core functionality
Edit config.json to customize behavior:
{
"download_dir": "./downloads",
"artifacts_dir": "./artifacts",
"headless": false,
"timeout": 300,
"retry_attempts": 3,
"delay_between_artifacts": 5,
"chrome_profile": {
"enabled": true,
"use_existing_profile": false,
"user_data_dir": ".\\chrome_automation_profile",
"profile_directory": "Default"
},
"providers": {
"gemini": {
"enabled": true,
"url": "https://gemini.google.com/app"
},
"chatgpt": {
"enabled": true,
"url": "https://chat.openai.com"
},
"claude": {
"enabled": true,
"url": "https://claude.ai"
}
},
"file_handling": {
"create_backups": true,
"skip_existing": true,
"clear_downloads_after": true
},
"logging": {
"level": "WARNING",
"file": "automation.log"
}
}| Option | Description | Default |
|---|---|---|
download_dir |
Where browsers download files | ./downloads |
artifacts_dir |
Where to save organized artifacts | ./artifacts |
headless |
Run browsers invisibly | false |
timeout |
Max wait time for generation (seconds) | 300 |
retry_attempts |
Retries on failure | 3 |
delay_between_artifacts |
Delay between generations (seconds) | 5 |
skip_existing |
Skip already-generated artifacts | true |
python src/main.py bulk_data/EXAMPLE_PROMPTS.md# Only process Gemini artifacts
python src/main.py prompts.md --filter-provider gemini
# Only process images
python src/main.py prompts.md --filter-type image
# Only process text documents
python src/main.py prompts.md --filter-type text# Headless mode (no browser window)
python src/main.py prompts.md --headless
# Regenerate everything (don't skip existing)
python src/main.py prompts.md --no-skip-existing
# Custom config file
python src/main.py prompts.md -c custom_config.json
# Combine options
python src/main.py prompts.md --filter-provider gemini --headlessusage: main.py [-h] [-c CONFIG] [--headless] [--no-skip-existing]
[--filter-provider {gemini,chatgpt,claude}]
[--filter-type {image,text,code}]
markdown_file
positional arguments:
markdown_file Path to markdown file with artifact definitions
optional arguments:
-h, --help Show help message
-c CONFIG, --config CONFIG
Path to config file (default: config.json)
--headless Run in headless mode
--no-skip-existing Regenerate all artifacts, even if they exist
--filter-provider Only process artifacts for specific provider
--filter-type Only process artifacts of specific type
Define your artifacts in a markdown file using one of two formats:
### Luck Potion Icon
**Type:** image
**Provider:** gemini
**Output Name:** luck_potion_icon
**Extension:** png
Create a vibrant RPG game icon for a luck potion.
The icon should be 512x512 pixels with a transparent background.
Show a glass bottle filled with glowing green liquid and a four-leaf clover symbol.
Art style: Cartoon/stylized, bright colors, clear outlines.### Luck Potion Icon
Create a vibrant RPG game icon for a luck potion.Auto-assumes: type=image, provider=gemini, extension=png
| Field | Required | Description | Default |
|---|---|---|---|
Type |
No | image, text, or code |
image |
Provider |
No | gemini, chatgpt, or claude |
gemini |
Output Name |
No | Filename without extension | Generated from artifact name |
Extension |
No | File extension | png for images, txt for text/code |
See bulk_data/EXAMPLE_PROMPTS.md for a complete example with 76 game asset definitions.
- Best for: Image generation (Imagen 3)
- Supported types: Images, text
- URL: https://gemini.google.com/app
- Notes: Fast image generation, high quality
- Best for: DALL-E images, text generation
- Supported types: Images (DALL-E), text
- URL: https://chat.openai.com
- Notes: Requires ChatGPT Plus for DALL-E
- Best for: Text, code generation
- Supported types: Text, code
- URL: https://claude.ai
- Notes: No native image generation
- Parse Markdown: Extract artifact definitions from markdown file
- Initialize Providers: Set up browser automation for needed providers
- For Each Artifact:
- Get or create provider instance
- Clear download directory
- Select generation mode (image/text/code)
- Send prompt to AI platform
- Wait for completion
- Download artifact
- Rename and organize file
- Handle Errors: Retry on failure, save error screenshots
- Generate Report: Summary of successful and failed artifacts
The tool monitors your download directory and:
- Waits for new files to appear
- Checks file size is stable (not still downloading)
- Filters out temporary files (
.crdownload,.tmp) - Renames with meaningful names
- Moves to artifacts folder
- Keeps browsers open between artifacts
- Reuses login sessions
- Only one browser instance per provider
- Logs in once, generates many artifacts
Choose one of two approaches:
Pros: Already logged in to all AI platforms Cons: Must close Chrome while automation runs
{
"chrome_profile": {
"enabled": true,
"use_existing_profile": true
}
}Steps:
- Close all Chrome windows
- Run automation
- Already logged in!
Find your Chrome profile path:
python find_chrome_profile.pyPros: Runs alongside your regular Chrome, stays logged in Cons: Must log in once on first run
{
"chrome_profile": {
"enabled": true,
"use_existing_profile": false,
"user_data_dir": ".\\chrome_automation_profile"
}
}First time:
- Run automation
- Chrome opens, log into AI platforms
- Automation continues
Every time after: Just run - stays logged in!
Solution: Automatic via webdriver-manager. If fails, manually download ChromeDriver matching your Chrome version.
Solution:
- Increase timeout in config
- Manually log in when browser opens
- Use Chrome profile option to stay logged in
Solution: AI platform UI changed. Update selectors in provider code (src/*_provider.py).
Solution:
- Check download directory exists and has write permissions
- Ensure Chrome downloads to correct folder
- Check
config.jsondownload_dirpath
Solution:
- Increase
delay_between_artifactsin config - Use
--filter-typeor--filter-providerto process fewer artifacts - Spread generation across multiple days
Remember: This tool violates most AI platforms' Terms of Service. Use at your own risk.
-
Headless Mode: 20-30% faster
python src/main.py prompts.md --headless
-
Skip Existing: Only generate new artifacts
"file_handling": { "skip_existing": true }
-
Reduce Delay: Decrease wait time between artifacts (risk rate limiting)
"delay_between_artifacts": 2
- Memory: ~200-500MB per browser instance
- Disk: Downloads cleaned up automatically
- Network: Varies by artifact size
- Can process hundreds of artifacts
- Limited by AI platform rate limits
- Can distribute across multiple machines with separate accounts
- Start Small: Test with 2-3 artifacts first
- Monitor First Run: Don't use headless mode initially
- Clear Prompts: Detailed prompts = better results
- Use Chrome Profiles: Avoid repeated logins
- Check Logs: Review
automation.logfor issues - Respect Rate Limits: Don't overwhelm AI platforms
- Backup Important Work: Keep copies of critical artifacts
- Version Control: Track markdown files, not artifacts (add to
.gitignore) - Test Providers: Verify each provider works before bulk generation
- Read ToS: Understand risks of automation
- Create
src/new_provider.py:
from base_provider import BaseAIProvider
class NewProvider(BaseAIProvider):
def __init__(self, download_dir, headless=False):
super().__init__(download_dir, headless)
self.base_url = "https://newai.example.com"
def login(self, credentials=None):
# Implement login logic
self.driver.get(self.base_url)
# Handle authentication
def select_mode(self, mode):
# Implement mode selection (image/text/code)
pass
def send_prompt(self, prompt):
# Implement prompt submission
pass
def wait_for_completion(self, timeout=300):
# Implement waiting for AI to finish
pass
def download_artifact(self, artifact_name):
# Implement download logic
pass- Register in
src/main.py:
from new_provider import NewProvider
# In get_provider method:
elif provider_name == "newprovider":
provider = NewProvider(
download_dir=self.config.get("download_dir"),
headless=self.config.get("headless", False)
)- Update
config.json:
"providers": {
"newprovider": {
"enabled": true,
"url": "https://newai.example.com"
}
}Extend the orchestrator:
class CustomOrchestrator(AIAutomationOrchestrator):
def process_artifact(self, artifact):
# Custom pre-processing
print(f"Processing with custom logic: {artifact.name}")
result = super().process_artifact(artifact)
# Custom post-processing
if result:
self.apply_custom_filters(artifact)
return result- selenium (4.16.0): Web automation framework
- webdriver-manager (4.0.1): Automatic ChromeDriver management
- pathlib2 (2.3.7): Enhanced path handling
- python-dotenv (1.0.0): Environment configuration
- tqdm (4.66.1): Progress bars
- colorama (0.4.6): Colored terminal output
MIT License
Copyright (c) 2024
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Use with your own caution. You can be banned because of an automation it's unclear.
This tool automates interactions with web-based AI platforms, which may violate their Terms of Service. Potential consequences include:
- Account suspension or permanent ban
- Loss of paid subscriptions
- IP address blocking
- Legal action (unlikely but possible)
The authors of this software:
- Do NOT encourage violating Terms of Service
- Are NOT responsible for any consequences
- Provide this tool for educational purposes only
- Recommend reviewing each platform's ToS before use
Use at your own risk. You have been warned.
- PROJECT_SUMMARY.md: Detailed technical documentation
- QUICK_START.md: Quick start guide for Chrome profiles
- example_usage.md: Usage examples and patterns
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
- Issues: Check
automation.logfor detailed error information - Screenshots: Error screenshots saved to downloads directory
- Documentation: See additional markdown files in repository
- Testing: Run
python test_setup.pyto verify setup
Built with Python and Selenium for automated AI artifact generation
Remember: Use responsibly and at your own risk!