https://github.com/oleg-koval/dcli
Docker Compose and Git management CLI for macOS, Linux, and Windows. Easily clean and restart containers, reset repositories to develop or acceptance branches.
https://github.com/oleg-koval/dcli
cli cross-platform docker docker-compose git go homebrew linux macos windows
Last synced: about 2 months ago
JSON representation
Docker Compose and Git management CLI for macOS, Linux, and Windows. Easily clean and restart containers, reset repositories to develop or acceptance branches.
- Host: GitHub
- URL: https://github.com/oleg-koval/dcli
- Owner: oleg-koval
- License: mit
- Created: 2026-04-03T00:30:34.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-04-27T08:40:50.000Z (about 2 months ago)
- Last Synced: 2026-04-27T10:27:59.305Z (about 2 months ago)
- Topics: cli, cross-platform, docker, docker-compose, git, go, homebrew, linux, macos, windows
- Language: Go
- Homepage: https://github.com/oleg-koval/dcli
- Size: 4.21 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
dcli
Lightweight Docker Compose and Git management CLI
Clean, restart, and manage repositories with a single command
---
## Features
- ๐ณ **Docker Management** - Clean containers/volumes, rebuild, and restart services
- ๐ **Git Batch Operations** - Reset multiple repositories to any branch on origin
- ๐งฉ **Custom Command Packs** - Save local automation, share repo-pack commands, and export/import packs for onboarding
- โ๏ธ **Execution-First CLI** - Run commands directly; use `dcli commands` and `dcli commands ui` to manage packs and sharing
- ๐ **Homebrew Distribution** - Install with a single command: `brew install dcli`
- ๐ **Auto-Updates** - Checks GitHub Releases on launch and self-updates when a newer version is available
- ๐ฅ๏ธ **Cross-Platform** - Works on macOS (Intel & Apple Silicon), Linux, and Windows
- โ๏ธ **YAML Configuration** - Simple config file at `~/.dcli/config.yaml`
- ๐ **Clear Error Messages** - Comprehensive feedback on what went wrong and why
- ๐งช **Well-Tested** - 58 tests with 82.4% code coverage across all platforms
## Installation
### Using Homebrew (Recommended)
```bash
brew tap oleg-koval/dcli
brew install dcli
dcli --version
```
### From Source
```bash
git clone https://github.com/oleg-koval/dcli.git
cd dcli
make build
./bin/dcli --version
```
### Direct Download
Download binaries for your platform from [GitHub Releases](https://github.com/oleg-koval/dcli/releases/tag/v0.1.0)
Set `DCLI_DISABLE_AUTO_UPDATE=1` if you want to skip the startup update check.
Set `DCLI_AUTO_UPDATE_TIMEOUT=250ms` to adjust the best-effort update check timeout (default: `1s`).
Set `DCLI_AUTO_UPDATE_CHANNEL=prerelease` (or `beta` / `alpha`) to follow prerelease builds from GitHub Releases instead of stable only.
## Quick Start
### Docker Commands
```bash
# Clean all services (remove containers, volumes, rebuild, restart)
dcli docker clean
# Clean specific services
dcli docker clean api web
# Restart services while preserving data
dcli docker restart
# Restart specific services
dcli docker restart api
```
### Git Commands
```bash
# Reset all configured repos to develop
dcli git reset develop
# Reset all configured repos to develop
dcli git reset develop
```
### Custom Commands
```bash
# Add a personal command
dcli commands add john deploy -- docker compose up -d
# List loaded commands
dcli commands
# Open the interactive browser for management only
dcli commands ui
# Export a pack for onboarding
dcli commands export --file team-pack.json
# Import a shared pack
dcli commands import --file team-pack.json
```
## Configuration
Create `~/.dcli/config.yaml`:
```yaml
repositories:
- path: /Users/username/projects/backend
name: backend
- path: /Users/username/projects/frontend
name: frontend
- path: /Users/username/projects/infra
name: infra
```
### Environment Variables
- `DCLI_PROJECT_DIR` - Override default project directory (defaults to current directory)
- `DCLI_AUTO_UPDATE_TIMEOUT` - Override the startup update check timeout using a Go duration string, such as `250ms` or `1s`
Example:
```bash
DCLI_PROJECT_DIR=/path/to/monorepo dcli docker clean api web
```
## Commands Reference
### Global Flags
- `-h, --help` - Show help
- `-v, --version` - Show version
### Docker Subcommand
```
dcli docker clean [service ...] # Clean and rebuild (removes containers, volumes, rebuilds)
dcli docker restart [service ...] # Restart services (preserves data)
```
### Git Subcommand
```
dcli git reset [develop|acceptance] # Reset all configured repos to specified branch
```
### Commands Subcommand
```
dcli commands # List loaded commands
dcli commands show [path...] # Show details for one command
dcli commands add [path...] -- # Add a personal command
dcli commands edit [path...] # Edit command metadata or replace the step command
dcli commands enable [path...] # Enable a command
dcli commands disable [path...] # Disable a command
dcli commands delete [path...] # Delete a command
dcli commands export --file # Export a command pack
dcli commands import --file # Import a command pack
dcli commands ui [--export-file ] # Open the command management TUI
```
## System Requirements
- **Docker** 20.10+ with Docker Compose
- **Git** 2.20+
- macOS 10.14+, Ubuntu 18.04+, or Windows 10+
## Documentation
- ๐ [Installation Guide](docs/INSTALL.md) - Detailed installation instructions for all platforms
- โ๏ธ [Configuration Guide](docs/CONFIGURATION.md) - Complete configuration reference with examples
- ๐ [Contributing](CONTRIBUTING.md) - How to contribute to dcli
- ๐ [Security Policy](SECURITY.md) - Reporting security vulnerabilities
## Use Cases
### Development Workflow
Reset your working environment to latest develop:
```bash
dcli git reset develop # Fetch and reset all repos
dcli docker clean # Clean all containers and volumes
# Fresh environment ready for new feature branch
```
### Quick Service Restart
After code changes or configuration updates:
```bash
dcli docker restart web api # Restart specific services
# Preserves database data and volumes
```
### Monorepo Management
Configure all microservices and reset with one command:
```bash
# In ~/.dcli/config.yaml: add all repo paths
dcli git reset acceptance # All services to acceptance branch
dcli docker clean # Clean all microservices
```
## Architecture
dcli is built with:
- **Go 1.25.0+** - Compiled language for reliability
- **Cobra** - Battle-tested CLI framework
- **YAML** - Human-readable configuration
- **Docker Compose API** - Direct execution without shells
Zero external dependencies for core functionality.
## Project Status
- โ
**Alpha Release** (v0.1.0)
- โ
Tests passing (15+ tests)
- โ
Cross-platform builds (macOS, Linux, Windows)
- โ
Homebrew distribution ready
- ๐ Production-ready for Docker Compose and Git workflows
## Contributing
Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
## License
MIT License - see [LICENSE](LICENSE) for details
## Author
[@oleg-koval](https://github.com/oleg-koval)
---
dcli makes container, repository, and custom command management effortless
Report Issues โข
Discussions โข
Releases