CLI tool for connecting to OpenConvert OpenAgents network for file conversion
Project description
๐ OpenConvert CLI
Intelligent File Conversion for the Distributed Age
Transform any file to any format using distributed AI agents
๐ Quick Start โข ๐ Documentation โข ๐ค Contributing โข ๐ฌ Community
๐ What is OpenConvert?
OpenConvert CLI is a command-line tool that connects to distributed OpenAgents networks to discover and utilize file conversion services. Instead of installing multiple conversion tools, OpenConvert leverages distributed agents to handle various file conversion tasks.
โ Currently Implemented
๐ Network-Powered โข Connect to OpenAgents conversion networks
๐ค Prompt Support โข Use natural language prompts (agent-dependent)
๐ Batch Processing โข Convert files and directories
๐ Auto-Detection โข Automatic MIME type detection
๐ก๏ธ Error Handling โข Comprehensive error reporting
โก Async Operations โข Non-blocking network operations
๐ง Python API โข Import and use from openconvert import convert
๐ Format Discovery โข --list-formats to see available conversions
๐ง Planned Features
๐ Enhanced Format Support โข Expand to 50+ formats as agents join
๐ณ Easy Deployment โข Docker and Kubernetes support
โ๏ธ Configuration Files โข YAML config for defaults and preferences
๐ฌ See It In Action
# Convert a document with AI enhancement
openconvert -i data.csv -o report.pdf --prompt "Create a professional report with charts"
# Batch convert an entire photo library
openconvert -i photos/ -o pdfs/ --from image/jpeg --to application/pdf
# Simple format conversion
openconvert -i document.txt -o document.pdf
# Discover available conversions
openconvert --list-formats
๐ก Pro Tip: Use natural language prompts to guide conversions (depends on agent capabilities)!
๐ Quick Start
Installation
# Currently: Install from source
git clone https://github.com/openagents/openconvert.git
cd openconvert
pip install -e .
# Future: PyPI package (planned)
# pip install openconvert
Your First Conversion
# Start an OpenConvert network (one-time setup)
openagents launch-network demos/openconvert/network_config.yaml
# Launch some conversion agents
python demos/openconvert/run_agent.py doc &
python demos/openconvert/run_agent.py image &
# Convert your first file!
openconvert -i document.txt -o document.pdf
That's it! ๐
โ ๏ธ Current Status: This is an early-stage project. Basic functionality works, but many advanced features are still in development.
๐ Usage
Basic Syntax
openconvert -i INPUT -o OUTPUT [OPTIONS]
Real-World Examples
๐ Document Conversions
# Text to PDF with custom styling
openconvert -i notes.txt -o notes.pdf --prompt "Use a professional layout with headers"
# Markdown to Word document
openconvert -i README.md -o README.docx
# CSV to formatted Excel with charts
openconvert -i sales.csv -o sales.xlsx --prompt "Add charts and formatting"
๐ผ๏ธ Image Processing
# Convert and compress images
openconvert -i photos/ -o thumbnails/ --from image/jpeg --to image/webp --prompt "Resize to 800px width"
# Create PDF from images
openconvert -i scans/ -o document.pdf --from image/png --to application/pdf
# Batch image format conversion
openconvert -i raw_images/ -o processed/ --from image/tiff --to image/png
๐ต Media Files
# Audio format conversion
openconvert -i music.wav -o music.mp3 --prompt "High quality encoding"
# Video format conversion
openconvert -i video.avi -o video.mp4 --prompt "Optimize for web streaming"
# Extract audio from video
openconvert -i movie.mp4 -o soundtrack.mp3
๐๏ธ Archives & Data
# Create compressed archives
openconvert -i project/ -o project.zip
# Convert between archive formats
openconvert -i backup.rar -o backup.tar.gz
# JSON to other formats
openconvert -i data.json -o data.xlsx --prompt "Create tables with proper headers"
Command-Line Options
| Option | Description | Example |
|---|---|---|
-i, --input |
Input file or directory | -i documents/ |
-o, --output |
Output file or directory | -o converted/ |
--from |
Source MIME type | --from image/png |
--to |
Target MIME type | --to application/pdf |
--prompt |
AI conversion instructions | --prompt "Compress by 50%" |
--host |
Network host | --host remote.example.com |
--port |
Network port | --port 8765 |
-v, --verbose |
Detailed output | -v |
-q, --quiet |
Minimal output | -q |
--list-formats |
Discover available conversions | --list-formats |
๐ Supported Formats
| Category | Formats | Count |
|---|---|---|
| ๐ Documents | txt, pdf, docx, html, md, rtf, csv, xlsx, epub | 9+ |
| ๐ผ๏ธ Images | png, jpg, gif, bmp, tiff, svg, webp, ico | 8+ |
| ๐ต Audio | mp3, wav, ogg, flac, aac, m4a | 6+ |
| ๐ฌ Video | mp4, avi, mkv, mov, webm, gif | 6+ |
| ๐๏ธ Archives | zip, rar, 7z, tar, gz, bz2 | 6+ |
| ๐ป Code | json, xml, yaml, html, css, js, py | 7+ |
| ๐ฏ 3D Models | stl, obj, fbx, ply, glb | 5+ |
Total: 50+ formats supported!
๐ Growing Library: New formats added regularly as agents join the network
๐๏ธ Network Setup
Quick Network Setup
# 1. Clone the OpenAgents repository
git clone https://github.com/openagents/openagents.git
cd openagents
# 2. Start the network
openagents launch-network demos/openconvert/network_config.yaml
# 3. Launch conversion agents (in separate terminals)
python demos/openconvert/run_agent.py doc # Document conversions
python demos/openconvert/run_agent.py image # Image processing
python demos/openconvert/run_agent.py audio # Audio conversions
python demos/openconvert/run_agent.py video # Video processing
Production Deployment (Planned)
๐ง Coming Soon: Docker and Kubernetes deployment configurations are being developed.
Currently: Use the manual setup method above for development and testing.
๐ง Advanced Usage
Batch Processing Power
# Convert all images in a folder structure
find ./photos -name "*.raw" -exec openconvert -i {} -o {}.jpg \;
# Parallel processing with xargs
ls *.txt | xargs -I {} -P 4 openconvert -i {} -o {}.pdf
# Directory-wide conversions
openconvert -i ./documents --from text/plain --to application/pdf --prompt "Professional formatting"
Python Integration
# Simple file conversion
from openconvert import convert_file
success = convert_file("document.txt", "document.pdf")
if success:
print("โ
Conversion successful!")
# Advanced batch conversion
from openconvert import convert
from pathlib import Path
success = convert(
input_files=[Path("file1.txt"), Path("file2.txt")],
output_path=Path("merged.pdf"),
from_format="text/plain",
to_format="application/pdf",
prompt="Merge into single document with table of contents"
)
# Advanced async usage (for custom integrations)
from openconvert.client import OpenConvertClient
async def custom_conversion():
client = OpenConvertClient()
await client.connect("my-network.com", 8765)
result = await client.convert_file(
input_file=Path("data.xlsx"),
output_file=Path("report.pdf"),
source_format="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
target_format="application/pdf",
prompt="Create executive summary with charts"
)
await client.disconnect()
return result
Configuration Files (Planned)
๐ง Coming Soon: Configuration file support is planned for future releases.
๐ ๏ธ Development
Project Structure
openconvert/
โโโ ๐ openconvert/ # Main package
โ โโโ ๐ __init__.py # Package init
โ โโโ ๐ฅ๏ธ openconvert_cli.py # CLI interface
โ โโโ ๐ client.py # Network client
โ โโโ ๐ __main__.py # Module entry
โโโ ๐งช tests/ # Test suite
โโโ ๐ docs/ # Documentation
โโโ ๐ณ docker/ # Docker configs
โโโ โ๏ธ setup.py # Installation
โโโ ๐ README.md # This file
Contributing Workflow
# 1. Fork & clone
git clone https://github.com/yourusername/openconvert.git
cd openconvert
# 2. Create feature branch
git checkout -b feature/amazing-feature
# 3. Set up development environment
pip install -e ".[dev]"
pre-commit install
# 4. Make changes & test
pytest tests/
black openconvert/
flake8 openconvert/
# 5. Submit PR
git push origin feature/amazing-feature
Running Tests
# Unit tests
pytest tests/
# Integration tests (requires network)
pytest tests/integration/ --network
# Performance tests
pytest tests/performance/ --benchmark
# Coverage report
pytest --cov=openconvert --cov-report=html
๐ค Contributing
We โค๏ธ contributions! Here's how you can help:
๐ Found a Bug?
- Open an issue
- Include reproduction steps
- Mention your OS and Python version
๐ก Have an Idea?
- Start a discussion
- Propose new features or improvements
- Share your use cases
๐ ๏ธ Want to Code?
- Check good first issues
- Read our contributing guide
- Join our developer Discord
๐ Improve Documentation?
- Fix typos or unclear sections
- Add examples and tutorials
- Translate to other languages
๐ฌ Community
- ๐ฌ Chat: Discord Server
- ๐ฆ Updates: @openagents
- ๐ก Discussions: GitHub Discussions
- ๐ง Email: hello@openagents.org
๐บ๏ธ Roadmap
๐ Coming Soon
- Plugin System - Custom conversion agents
- Web Interface - Browser-based UI
- API Gateway - REST API for integrations
- Cloud Hosting - Managed OpenConvert service
- Mobile Apps - iOS and Android clients
๐ฏ Long Term
- AI-Generated Agents - Automatic agent creation
- Blockchain Integration - Decentralized agent rewards
- Real-time Collaboration - Multi-user conversion workflows
- Format Prediction - ML-powered format suggestions
๐ Acknowledgments
Special thanks to:
- OpenAgents Team - For the amazing framework
- Contributors - Everyone who helps improve OpenConvert
- Community - Users who provide feedback and ideas
- Dependencies - All the great open source libraries we use
Built With
- OpenAgents - Distributed agent framework
- Click - Command line interface
- AsyncIO - Asynchronous programming
- Typer - CLI framework
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
โญ Star this repo if you found it helpful!
Made with โค๏ธ by the OpenAgents community
Transforming files, one conversion at a time ๐
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openconvert-1.0.0.tar.gz.
File metadata
- Download URL: openconvert-1.0.0.tar.gz
- Upload date:
- Size: 126.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
056970cbda22abbd36d29fb62f504d3137edcbf6f799b9bed88dc4884449e75d
|
|
| MD5 |
48a64c9087b3473ae7d06195f8b84a29
|
|
| BLAKE2b-256 |
7897f7e7d96880c49cf252974cdc68cfb9690db45c5ecb61731c3fead367cfd5
|
File details
Details for the file openconvert-1.0.0-py3-none-any.whl.
File metadata
- Download URL: openconvert-1.0.0-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
958fe0cda4b500a366678bfa95afbf37e6374b93f6e372176378c6eb3257af96
|
|
| MD5 |
8008e7ea4eab7ab910372ac7cff875e1
|
|
| BLAKE2b-256 |
fdd709939fbfaa6f23e5c054b132917cb648b9259a2aa0788c81ca4c4d87ab7b
|