catfetch

module
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2026 License: MIT

README

CatFetch

Go Version Tests Release codecov

A desktop GUI application built with Go and Gio UI that fetches and displays random cat images from cataas.com.

CatFetch startup screen CatFetch with cat image

Prerequisites

  • Go 1.25 or higher

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:

  1. Install pre-commit:

    # macOS
    brew install pre-commit
    
    # Linux
    pip install pre-commit
    # or
    pipx install pre-commit
    
  2. Install the git hooks:

    pre-commit install
    
  3. 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

Directories

Path Synopsis
cmd
catfetch command
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL