{"id":31721287,"url":"https://github.com/cumulus13/ddf","last_synced_at":"2026-05-03T01:38:11.682Z","repository":{"id":327628762,"uuid":"1069789226","full_name":"cumulus13/ddf","owner":"cumulus13","description":"A powerful command-line utility for analyzing, managing, and editing Docker Compose files with rich terminal output and advanced features.","archived":false,"fork":false,"pushed_at":"2025-12-05T16:57:42.000Z","size":6757,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-03T01:38:11.319Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cumulus13.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/contributing.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-04T16:18:14.000Z","updated_at":"2025-12-23T21:49:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cumulus13/ddf","commit_stats":null,"previous_names":["cumulus13/ddf"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/cumulus13/ddf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cumulus13%2Fddf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cumulus13%2Fddf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cumulus13%2Fddf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cumulus13%2Fddf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cumulus13","download_url":"https://codeload.github.com/cumulus13/ddf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cumulus13%2Fddf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32555839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T00:31:16.350Z","status":"ssl_error","status_checked_at":"2026-05-03T00:31:15.546Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","yaml"],"created_at":"2025-10-09T03:46:09.921Z","updated_at":"2026-05-03T01:38:11.676Z","avatar_url":"https://github.com/cumulus13.png","language":"Python","funding_links":["https://www.buymeacoffee.com/cumulus13","https://ko-fi.com/cumulus13","https://www.patreon.com/cumulus13"],"categories":[],"sub_categories":[],"readme":"# DDF - Enhanced Docker Compose Tools/Utility\n\n[![License](https://img.shields.io/github/license/cumulus13/ddf.svg)](https://github.com/cumulus13/ddf/blob/main/LICENSE)\n[![Documentation Status](https://readthedocs.org/projects/ddf/badge/?version=latest)](https://ddf.readthedocs.io/en/latest/?badge=latest)\n\n**DDF** is a powerful command-line tool for analyzing, managing, and editing Docker Compose files configurations with advanced features like intelligent caching, server mode operation, automatic backups, and sophisticated file editing capabilities.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/cumulus13/ddf/master/logo.png\" alt=\"Logo\"\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/cumulus13/ddf/master/screenshot.png\" alt=\"Screenshot\"\u003e\n\u003c/p\u003e\n\n\n## 🚀 Features\n\n- **Service Management**: List, view, edit, duplicate, copy, rename, remove, and create services\n- **Port Analysis/Management**: Find duplicate ports **: Find duplicate ports and resolve conflicts easily, check port usage across services\n- **Resource Inspection**: View volumes, devices, hostnames, and port configurations\n- **Dockerfile Integration**: Read, edit, copy, and set Dockerfiles associated with services\n- **Entrypoint Management**: View and edit entrypoint scripts\n- **File Management**: Read and edit files referenced in Dockerfile COPY commands\n- **Pattern Matching**: Powerful wildcard and regex support for service names\n- **File Monitoring**: Real-time file change detection for non-blocking editors\n- **Rich Terminal Output**: Colorized syntax highlighting and formatted display\n- **Pattern Matching**: Support for wildcards, regex, and substring matching for service names\n- **Intelligent Caching**: Multiple cache backends (Redis, Memcached, Pickle) for improved performance\n- **Advanced Editing**: Support for multiple editors with real-time change detection\n- **Automatic Backups**: Create and restore backups before making changes\n- **Detached Mode**: Open editors in separate terminal windows\n- **Server Mode**: Background server with system tray integration for seamless operation\n\n\n## 📦 Installation\n\n### Prerequisites\n\n- Python 3.6+\n- Required Python packages:\n  ```bash\n  pip install pyyaml rich pydebugger configset rich-argparse clipboard gntplib redis richcolorlog\n  ```\n\n### Setup\n\n```bash\n   pip install git+https://github.com/cumulus13/ddf\n```\n\n#### With All Features\n\n```bash\n   pip install git+https://github.com/cumulus13/ddf[all]\n```\n\n#### Specific Features\n\n```bash\n# Cache backends (Redis, Memcached)\npip install git+https://github.com/cumulus13/ddf[cache]\n\n# Server mode with tray icon\npip install git+https://github.com/cumulus13/ddf[server]\n\n# File monitoring\npip install git+https://github.com/cumulus13/ddf[monitoring]\n```\n\n## 🔧 Configuration\n\nThere is `ddf.ini` file in the same directory as `ddf.py` edit as you want or Create new one `ddf.ini` file in the same directory as `ddf.py`:\n\n```ini\n[docker-compose]\nfile = /path/to/docker-compose.yml\nroot_path = /path/to/project\n\n[editor]\nnames = nvim, vim, nano\n\n[cache]\nbackend = redis\nenabled = true\nttl = 3600\nredis_host = localhost\nredis_port = 6379\n\n[backup]\ndirectory = /path/to/backups\n\n[server]\nactive = false\nhost = 127.0.0.1\nport = 9876\n```\n\n\nThere is `ddf.ini` file in the same directory as `ddf.py` edit as you want:\n\n```ini\n[docker-compose]\nfile = /path/to/your/docker-compose.yml\nroot_path = /path/to/your/project/root\n\n[editor]\nnames = nvim,nano,vim\n...\n```\n\n- `file`: Path to the default Docker Compose YAML file.\n- `root_path`: Project root directory (defaults to `c:\\PROJECTS` on Windows if exists, else current directory).\n- `names`: Comma-separated list of preferred editors.\n\n## 🎯 Quick Start\n\n```bash\n# List all services\nddf -L\n\n# Find duplicate ports\nddf\n\n# Edit a service\nddf myservice -E\n\n# Edit Dockerfile\nddf myservice -e\n\n# Show service details\nddf myservice -d\n\n# Find port usage\nddf -f 8080\n```\n\n## Usage\n\n### Basic Syntax\n\n```bash\nddf [service_name] [options]\n```\n\n### 🖥️ Server Mode\n\nStart DDF in server mode for background operation:\n\n```bash\n# Start server\nddf --server-mode \u0026\n\n# Enable in config\ncat \u003e\u003e ddf.ini \u003c\u003c EOF\n[server]\nactive = true\nEOF\n\n# All editing commands now run through server\nddf myservice -E\n```\n## 📚 Documentation\n\nFull documentation is available at [ddf.readthedocs.io](https://ddf.readthedocs.io)\n\n- [Installation Guide](https://ddf.readthedocs.io/en/latest/installation.html)\n- [Quick Start](https://ddf.readthedocs.io/en/latest/quickstart.html)\n- [Configuration](https://ddf.readthedocs.io/en/latest/configuration.html)\n- [Usage Guide](https://ddf.readthedocs.io/en/latest/usage.html)\n- [API Reference](https://ddf.readthedocs.io/en/latest/api/core.html)\n\n\n## 💡 Usage Examples\n\n### Find and Fix Port Conflicts\n\n```bash\n# Find duplicates\nddf\n\n# Output: ❌ web/8080/tcp --\u003e api/8080/tcp\n\n# Inspect services\nddf web -P\nddf api -P\n\n# Edit service to fix\nddf api -E\n```\n\n### Service Management\n\n```bash\n# Create new service\nddf newservice -n\n\n# Duplicate service\nddf oldservice -dd newservice\n\n# Rename service\nddf oldname -rn newname\n\n# Remove service\nddf myservice -rm\n```\n\n### List all services\n```bash\nddf -L\n```\n\n### Filter services by pattern\n```bash\nddf -L -F web* app\n```\n\n### Show service details\n```bash\nddf webapp -d\n```\n\n### Find duplicate ports\n```bash\nddf\n```\n\n### Find services using port 8080\n```bash\nddf -f 8080\n```\n\n### Check if port 3000 is duplicated\n```bash\nddf -p 3000\n```\n\n### List ports for a service\n```bash\nddf webapp -l\n```\n\n### Show volumes for services with \"web\" in name\n```bash\nddf web -vol\n```\n\n### Show hostnames\n```bash\nddf webapp -hn\n```\n\n### Edit a service configuration\n```bash\nddf webapp -E\n```\n\n### Advanced Editing\n\n```bash\n# Edit in detached terminal\nddf myservice -E -dt\n\n# Edit multiple services simultaneously\nddf service1 -E -dt\nddf service2 -E -dt\nddf service3 -E -dt\n\n# Edit Dockerfile\nddf myservice -e\n\n# Edit entrypoint script\nddf myservice -ed\n```\n\n### Read Dockerfile for a service\n```bash\nddf webapp -r\n```\n\n### Edit Dockerfile\n```bash\nddf webapp -e\n```\n\n### Set Dockerfile path\n```bash\nddf webapp -sd ./custom/Dockerfile\n```\n\n### Edit entrypoint script\n```bash\nddf webapp -ed\n```\n\n### Read file from Dockerfile COPY\n```bash\nddf webapp -rf entrypoint.sh\n```\n\n### Edit file from Dockerfile COPY\n```bash\nddf webapp -ef config.conf\n```\n\n### Create a new service\n```bash\nddf new-service -n\n```\n\n### Duplicate a service\n```bash\nddf webapp -dd webapp-staging\n```\n\n### Rename a service\n```bash\nddf webapp -rn webapp-prod\n```\n\n### Copy service to clipboard\n```bash\nddf webapp -cs\n```\n\n### Copy Dockerfile to clipboard\n```bash\nddf webapp -cd\n```\n\n### Remove a service\n```bash\nddf webapp -rm\n```\n\n### Show version\n```bash\nddf -v\n```\n\n## Advanced Features\n\n### Pattern Matching\n\nDDF supports flexible service name matching:\n- **Exact match**: `webapp`\n- **Wildcard**: `web*` (matches webapp, webserver, etc.)\n- **Substring**: `app` (matches webapp, myapp, etc.)\n- **Regex**: Use with `-F` (e.g., `-F '^web.*$'`)\n\n### Intelligent File Resolution\n\n- Automatically locates Dockerfiles based on service build context\n- Resolves entrypoint scripts from Dockerfile COPY instructions\n- Supports relative and absolute paths\n- Creates new Dockerfiles if missing when editing\n\n### Rich Output\n\n- Syntax-highlighted YAML, Dockerfile, and script content\n- Colorized port conflict detection\n- Formatted service listings with visual indicators\n\n### Caching System\n\n- File content caching based on SHA256 hashes\n- Improved performance for repeated operations\n- Automatic cache invalidation on file changes\n\n## Configuration Details\n\n### Default Paths\n\n- Default Docker Compose file: `docker-compose.yml` in current directory or `c:\\PROJECTS\\docker-compose.yml`\n- Default project root: `c:\\PROJECTS` (if exists on Windows), else current directory\n- Default editors: `nvim`, `nano`, `vim`\n\n### Editor Priority\n\nThe utility tries editors in this order:\n1. Custom editors from `ddf.ini`\n2. `nano`\n3. `nvim`\n4. `vim`\n\n## Error Handling\n\nDDF provides comprehensive error handling for:\n- Missing or invalid YAML files\n- Non-existent services\n- File permission issues\n- Invalid port configurations\n- Missing Dockerfiles or entrypoint scripts\n- Editor availability\n\n## Output Examples\n\n### Duplicate Port Detection\n```\nwebapp/ports/8080/tcp --\u003e api/ports/8080/tcp\n```\n\n### Service Port Listing\n```\nPorts for service 'webapp':\n  - 8080:80\n  - 443:443\n```\n\n### Volume Display\n```\nwebapp:\n  volumes:\n    - ./src:/app/src\n    - ./logs:/var/log/app\n```\n\n### Hostname Display\n```\n- webapp: hostname: app.example.com\n```\n\n## Limitations\n\n- Editor detection is platform-dependent\n- Some features require specific Docker Compose file structures\n- File paths in COPY commands must be resolvable relative to build context\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\nFor issues, feature requests, or questions:\n1. Check existing documentation\n2. Review error messages carefully\n3. Ensure proper YAML syntax in Docker Compose files\n4. Verify file permissions and paths\n\n## Tips\n\n- Use `-L` to list all services before working with specific ones\n- Pattern matching is case-sensitive\n- Always backup your Docker Compose files before editing\n- Use the duplicate feature to create staging/development variants\n- The clipboard copy feature is useful for sharing configurations\n- Use `-F` with regex for precise service filtering\n\n## 👤 Author\n\n[Hadi Cahyadi](mailto:cumulus13@gmail.com)\n\n[![Buy Me a Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/cumulus13)\n\n[![Donate via Ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/cumulus13)\n\n[Support me on Patreon](https://www.patreon.com/cumulus13)\n\n## 🙏 Acknowledgments\n\n- Built with [Rich](https://github.com/Textualize/rich) for beautiful terminal output\n- Uses [PyYAML](https://pyyaml.org/) for YAML parsing\n- Inspired by the need for better Docker Compose management tools\n\n## 📊 Project Status\n\nDDF is actively maintained and under continuous development. Feel free to report issues or suggest features on the [issue tracker](https://github.com/cumulus13/ddf/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcumulus13%2Fddf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcumulus13%2Fddf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcumulus13%2Fddf/lists"}