This guide walks through the complete setup process to publish the CLI to Docker Hub and Homebrew.
- Go 1.21+ (
brew install go) - Docker Desktop
- GitHub CLI (
brew install gh) - GitHub account with access to
simplebytes-comorganization
cd /Users/julianengeltcg/projects_code/domaindetails/domaindetails-cli
# Download dependencies
go mod tidy
# Build
go build -o bin/domaindetails ./cmd/domaindetails
# Test
./bin/domaindetails --help
./bin/domaindetails lookup example.com
./bin/domaindetails rdap google.com --json# Switch to SimpleBytes Agent account
gh auth switch
# Select: simplebytes-agent
# Create the repository
gh repo create simplebytes-com/domaindetails-cli \
--public \
--description "Domain RDAP and WHOIS lookup CLI tool" \
--homepage "https://domaindetails.com"
# Initialize git and push
cd /Users/julianengeltcg/projects_code/domaindetails/domaindetails-cli
git init
git add .
git commit -m "Initial commit: domaindetails CLI"
git branch -M main
git remote add origin https://github.com/simplebytes-com/domaindetails-cli.git
git push -u origin main# Create the homebrew tap repo
gh repo create simplebytes-com/homebrew-tap \
--public \
--description "Homebrew formulae for Simple Bytes tools"
# Clone and set up
cd /tmp
git clone https://github.com/simplebytes-com/homebrew-tap.git
cd homebrew-tap
mkdir -p Formula
# Create initial formula (will be auto-updated on release)
cat > Formula/domaindetails.rb << 'EOF'
class Domaindetails < Formula
desc "Domain RDAP and WHOIS lookup CLI tool"
homepage "https://domaindetails.com"
version "0.0.1"
license "MIT"
on_macos do
url "https://github.com/simplebytes-com/domaindetails-cli/releases/download/v0.0.1/domaindetails-0.0.1-darwin-arm64.tar.gz"
sha256 "placeholder"
end
def install
bin.install "domaindetails"
end
test do
system "#{bin}/domaindetails", "--version"
end
end
EOF
git add .
git commit -m "Initial commit: homebrew tap"
git push -u origin main- Go to https://hub.docker.com
- Create organization
domaindetails(if not exists) - Create repository
domaindetails/cli - Go to Account Settings → Security → Access Tokens
- Create a new access token with Read/Write permissions
- Save the token for GitHub secrets
Go to https://github.com/simplebytes-com/domaindetails-cli/settings/secrets/actions
Add these secrets:
| Secret Name | Description |
|---|---|
DOCKERHUB_USERNAME |
Docker Hub username |
DOCKERHUB_TOKEN |
Docker Hub access token |
HOMEBREW_TAP_TOKEN |
GitHub PAT with repo access to homebrew-tap |
- Go to https://github.com/settings/tokens
- Generate new token (classic)
- Select scopes:
repo(full control) - Copy token and add as secret
cd /Users/julianengeltcg/projects_code/domaindetails/domaindetails-cli
# Tag the release
git tag v1.0.0
git push origin v1.0.0This will trigger the GitHub Actions workflow which will:
- Build binaries for all platforms
- Create a GitHub release with the binaries
- Build and push Docker images to Docker Hub
- Update the Homebrew formula automatically
After the release workflow completes:
docker pull domaindetails/cli:1.0.0
docker run domaindetails/cli lookup example.combrew tap simplebytes-com/tap
brew install domaindetails
domaindetails lookup example.comThe following pages will link back to domaindetails.com:
-
Docker Hub: https://hub.docker.com/r/domaindetails/cli
- Repository description
- README with link to website
-
Homebrew: https://github.com/simplebytes-com/homebrew-tap
- Formula homepage field
- README
-
GitHub: https://github.com/simplebytes-com/domaindetails-cli
- Repository homepage
- README
- Release notes
brew install go
export PATH=$PATH:/opt/homebrew/bin# Make sure Docker Desktop is running
docker info
# Build manually
docker build -t domaindetails/cli:latest .- Check the Actions tab for error logs
- Ensure all secrets are configured correctly
- Verify repository permissions