An interactive CLI tool for batch operations on Docker resources (volumes, containers, images, and networks) with a user-friendly interface.
- Interactive multi-select interface for batch operations
- Support for multiple Docker resource types:
- Volumes
- Containers (with force removal of running containers)
- Images
- Networks (with protection for system networks)
- Visual indicators for networks:
- 🔒 Protected system networks
- 🔄 Internal networks
- 🌐 Custom networks
- Type-safe implementation using TypeScript
- Node.js >= 18.0.0
- Docker daemon running on your system
npm install -g @ahmedrowaihi/docker-batch
npm install @ahmedrowaihi/docker-batch
If installed globally, you can use either command:
docker-batch
# or the shorter alias
dkb
If installed locally:
npx docker-batch
# or
npx dkb
The tool will:
- Prompt you to select a resource type (volumes, containers, images, or networks)
- Display available resources of the selected type
- Allow you to select multiple items for batch operations
- Ask for confirmation before removal
- Show the status of each operation
- Use arrow keys to navigate
- Space to select/unselect items
- Enter to confirm selection
- Ctrl+C to exit
src/
containers/ - Container batch operations
images/ - Image batch operations
networks/ - Network batch operations
volumes/ - Volume batch operations
shared/ - Shared types and base classes
-
Clone the repository:
git clone https://github.com/ahmedrowaihi/docker-batch.git cd docker-batch
-
Install dependencies:
bun install
-
Build the project:
bun run build
-
Run locally:
bun start
Contributions are welcome! Please feel free to submit a Pull Request.
MIT