A collection of useful Go CLI tools for developers and power users.
- File Management: Find duplicates, organize files, and find/replace text.
- Network: Port scanner and simple HTTP server.
- Development: JSON formatting, TODO scanning, and load testing.
- Media: Image format conversion.
- Docker Management: Comprehensive Docker environment management, cleanup, inspection, and automation.
- Extensible: Built-in scaffolding for creating new tools.
- Go 1.25 or higher
git clone https://github.com/rthurman2386/go-tooling.git
cd go-tooling
go install .This will install the go-tooling binary to your $GOPATH/bin directory.
You can build the binary and move it to a directory in your $PATH (e.g., ~/.local/bin):
go build -o go-tooling ./cmd
mv go-tooling ~/.local/bin/Run the tool followed by the subcommand:
go-tooling [command] [flags]benchmark: A simple HTTP load testing tool to measure server performance.- Usage:
go-tooling benchmark -u <url> [flags]
- Usage:
duplicate-finder: Finds duplicate files in a specified directory based on content hash.- Usage:
go-tooling duplicate-finder [path]
- Usage:
find-replace: Find and replace text in files recursively.- Usage:
go-tooling find-replace <pattern> <replacement> <path>
- Usage:
img-convert: Convert image formats (e.g., PNG to JPG).- Usage:
go-tooling img-convert <input> <output> <format>
- Usage:
json-fmt: Format and validate JSON data from a file or stdin.- Usage:
go-tooling json-fmt [file]
- Usage:
newtool: Scaffold a new tool in this project.- Usage:
go-tooling newtool <name>
- Usage:
organize: Organizes files in a directory based on their extension.- Usage:
go-tooling organize [path]
- Usage:
port-scanner: Scans for open ports on a host.- Usage:
go-tooling port-scanner <host> [flags]
- Usage:
serve: Serves the current directory over HTTP.- Usage:
go-tooling serve [port]
- Usage:
todo-scanner: Scan for TODO, FIXME, and NOTE comments in code files.- Usage:
go-tooling todo-scanner [path] [flags]
- Usage:
docker-cleanup: Clean up Docker resources (containers, images, volumes, networks, cache).- Usage:
go-tooling docker-cleanup [flags]
- Usage:
docker-inspect: Inspect Docker environment and resources with multiple output formats.- Usage:
go-tooling docker-inspect [flags]
- Usage:
docker-prune-old: Prune old Docker resources based on age with pattern exclusion.- Usage:
go-tooling docker-prune-old --days N [flags]
- Usage:
docker-logs-manager: Manage and analyze Docker container logs with export and search.- Usage:
go-tooling docker-logs-manager --container NAME [flags]
- Usage:
docker-compose-manager: Discover and manage Docker Compose projects.- Usage:
go-tooling docker-compose-manager [flags]
- Usage:
cmd/: Contains the main application entry point and subcommand definitions. Each tool has its own file here (e.g.,cmd/mytool.go).pkg/: Contains the core logic for each tool, organized by package (e.g.,pkg/mytool/).go.mod: Manages project dependencies.
Use the built-in newtool command to scaffold a new tool:
go-tooling newtool my-new-toolThis will create:
cmd/my_new_tool.go: The CLI command definition.pkg/my_new_tool/my_new_tool.go: The package for the tool's logic.
go build -o go-tooling ./cmdContributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
MIT