CatFetch

A desktop GUI application built with Go and Gio UI that fetches and displays random cat images from cataas.com.
Gallery
Prerequisites
Getting Started
Clone the Repository
git clone <repository-url>
cd catfetch
Build the Application
go build -o build/catfetch ./cmd/catfetch
Run the Application
From the project directory:
./build/catfetch
Or run directly without building:
go run ./cmd/catfetch/main.go
Optional: Install System-wide
To run the application from anywhere without ./:
Linux/macOS (user-local install):
cp build/catfetch ~/bin/catfetch
# Ensure ~/bin is in your PATH
Linux (system-wide install):
sudo cp build/catfetch /usr/local/bin/catfetch
Then you can run it from anywhere:
catfetch
Usage
Launch the application and click the "Fetch Image" button to load a random cat picture. The image will automatically scale to fit the window while maintaining its aspect ratio.
Roadmap
- Cat History: Browse previously fetched cat images
- Text Overlays: Add custom text overlays to cat images
- Tag Search: Search for cats by specific tags
- Image Filters: Add sliders and options to apply filters (sepia, blur, brightness, etc.) using cataas API parameters
Development
Pre-commit Hooks
This project uses pre-commit hooks for automated code quality checks. To set up:
-
Install pre-commit:
# macOS
brew install pre-commit
# Linux
pip install pre-commit
# or
pipx install pre-commit
-
Install the git hooks:
pre-commit install
-
Run hooks manually (optional):
pre-commit run --all-files
The hooks will automatically run on every commit and check for:
- Go code formatting
- Linting with golangci-lint
- Secret detection with gitleaks
- Common issues (trailing whitespace, merge conflicts, etc.)
Running Tests
# Run all tests
go test ./...
# Run with coverage
go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
# View coverage report
go tool cover -html=coverage.out
License
MIT License - see LICENSE file for details.
Copyright (c) 2026 NovelGit LLC