This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Go monorepo containing multiple command-line utilities. Each tool is located in cmd/<tool-name>/ and can be built independently. The project uses vendor directory for dependency management and follows standard Go project layout.
- Build all tools:
go build ./cmd/... - Build specific tool:
go build ./cmd/<tool-name> - Build with output binary:
go build -o <binary-name> ./cmd/<tool-name>
- Run linter:
golangci-lint run - Run linter with timeout:
golangci-lint run --timeout 5m - Auto-fix issues:
golangci-lint run --fix
The project uses comprehensive linting with .golangci.yaml configuration that enables most linters with specific exclusions for depguard, exhaustruct, gochecknoglobals, gochecknoinits, and nonamedreturns.
- Run tests:
go test ./... - Run tests with coverage:
go test -cover ./... - Run tests with race detection:
go test -race ./...
Note: The project currently has no test files (*_test.go), so adding tests for new functionality is recommended.
- Update dependencies:
go mod tidy - Update vendor:
go mod vendor - Check for updates:
go list -u -m all
The project uses GoReleaser (.goreleaser.yaml) for building cross-platform binaries. GPG signing is configured with key F57F85FC7975F22BBC3F25049C173EB1B531AA1F.
cmd/: Contains individual CLI tools, each in their own subdirectory- Each tool has a main package and can be built independently
- Tools include: bpa, game-of-life, me-site, mtgdsgenerator, vk2tg, vkphotosdownloader, etc.
internal/: Internal packages shared between toolsinternal/pkg/vk2tg/: VK to Telegram forwarding functionality
vendor/: Vendored dependenciesdeployments/: Deployment configurationsbuild/: Build-related files
- Cobra (
github.com/spf13/cobra): CLI framework - Viper (
github.com/spf13/viper): Configuration management - Echo (
github.com/labstack/echo/v4): Web framework - Redis client (
github.com/redis/go-redis/v9) - VK SDK (
github.com/SevereCloud/vksdk/v3) - Telegram bot API (
gopkg.in/telebot.v4)
Based on README.md, key tools include:
me-site: Personal websitemtgdsgenerator: Magic: The Gathering dataset generatorvk2tg: VK to Telegram wall forwardervkphotosdownloader: VK photo downloadera200: Simple nginx-like server responding 200 to all requests
- GitHub Actions workflow for Go linting (
.github/workflows/lint-go.yaml) - Separate workflows for specific tools (a200, me-site, vk2tg)
- Linting runs on any Go file changes (
.go,.mod,.sum) - GoReleaser configuration for multi-platform releases
The project follows standard Go conventions with strict linting rules. Pay attention to:
- Variable naming length requirements (min 3 characters, configured in golangci)
- Complexity limits (cyclomatic complexity max 10)
- Import formatting with goimports and gofumpt
- Error handling patterns using
github.com/cockroachdb/errors
When adding a new CLI tool:
- Create directory under
cmd/<tool-name>/ - Follow existing patterns (main package, cobra commands if applicable)
- Update go.mod if new dependencies are needed
- Run
go mod vendorto update vendor directory - Ensure linting passes with
golangci-lint run