dodot

module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: MIT

README ΒΆ

dodot - A Stateless Dotfiles Manager

This module sets up a complete Go CLI application with Cobra framework, comprehensive build tooling, and CI/CD pipelines.

What You Get

πŸ“ Project Structure
dodot/
β”œβ”€β”€ cmd/dodot/    # CLI entry point with Cobra commands
β”‚   β”œβ”€β”€ main.go                # Main application entry
β”‚   └── root.go                # Root command configuration
β”œβ”€β”€ pkg/                       # Reusable packages
β”‚   └── logging/               # Structured logging setup
β”œβ”€β”€ scripts/                   # Build and development scripts
β”œβ”€β”€ .github/workflows/         # GitHub Actions CI/CD
β”œβ”€β”€ .goreleaser.yml           # Multi-platform release configuration
└── go.mod                    # Go module definition
πŸ› οΈ Build & Development Scripts
  • ./scripts/build - Builds the CLI binary with embedded version info
  • ./scripts/test - Runs tests with race detection and coverage
  • ./scripts/test-with-coverage - Detailed coverage report with visualization
  • ./scripts/lint - Comprehensive code linting with golangci-lint
  • ./scripts/pre-commit - Git hooks for code quality enforcement
  • ./scripts/release-new - Automated semantic versioning and releases
  • ./scripts/cloc-go - Go-specific line counting statistics
πŸš€ GitHub Actions Workflows
  • Test workflow - Runs on every push: build, test, coverage upload
  • Release workflow - Triggers on version tags: multi-platform builds, GitHub releases
  • Codecov integration - Automatic coverage reporting
πŸ“¦ Release & Distribution
  • GoReleaser configuration for:
    • Linux, macOS, Windows binaries (amd64, arm64)
    • Homebrew formula generation
    • Debian packages (.deb)
    • Checksums and release notes
  • Homebrew tap support with debug mode for testing
πŸ”§ Pre-configured Features
  • Cobra CLI framework with command structure
  • Structured logging with zerolog
  • Version command with git commit info
  • Comprehensive error handling
  • Context-aware configuration
  • Pre-commit hooks for consistent code quality
🎯 Development Tools
  • golangci-lint - Comprehensive Go linting (auto-installed)
  • gotestsum - Better test output formatting (auto-installed)
  • Race detection enabled in tests
  • Coverage reporting with HTML output
  • Semantic versioning automation

Quick Start Commands

After adding this module:

# Build your CLI
./scripts/build
./bin/dodot --version

# Run tests
./scripts/test

# Set up development environment
./scripts/pre-commit install

# Create a release
./scripts/release-new --patch

Configuration

The module is pre-configured with:

  • Go 1.23+ support
  • MIT license
  • GitHub Actions for CI/CD
  • Codecov for coverage tracking
  • Homebrew formula generation

Directories ΒΆ

Path Synopsis
cmd
dodot command
dodot-manpage command
Package internal contains non-exported utilities and helpers used internally by dodot.
Package internal contains non-exported utilities and helpers used internally by dodot.
cli
pkg
actions
Package actions handles the conversion of high-level actions generated by power-ups into low-level filesystem operations that can be executed by synthfs.
Package actions handles the conversion of high-level actions generated by power-ups into low-level filesystem operations that can be executed by synthfs.
cobrax/topics
Package topics provides a pluggable, topic-based help system for Cobra CLI applications.
Package topics provides a pluggable, topic-based help system for Cobra CLI applications.
config
Package config handles configuration management for dodot.
Package config handles configuration management for dodot.
core
Package core implements the core pipeline functions for dodot.
Package core implements the core pipeline functions for dodot.
deprecated
Package deprecated contains deprecated functions that are maintained for backward compatibility.
Package deprecated contains deprecated functions that are maintained for backward compatibility.
errors
Package errors defines error types and codes for dodot.
Package errors defines error types and codes for dodot.
matchers
Package matchers implements the matcher system that connects triggers to power-ups.
Package matchers implements the matcher system that connects triggers to power-ups.
paths
Package paths provides centralized path handling for dodot.
Package paths provides centralized path handling for dodot.
powerups
Package powerups implements various power-up types that process matched files and generate actions.
Package powerups implements various power-up types that process matched files and generate actions.
registry
Package registry provides a generic, type-safe registry system for managing triggers, power-ups, and actions.
Package registry provides a generic, type-safe registry system for managing triggers, power-ups, and actions.
testutil
Package testutil provides common utilities and helpers for testing dodot.
Package testutil provides common utilities and helpers for testing dodot.
triggers
Package triggers implements various trigger types for matching files and directories within packs.
Package triggers implements various trigger types for matching files and directories within packs.
types
Package types defines the core types and interfaces used throughout dodot.
Package types defines the core types and interfaces used throughout dodot.

Jump to

Keyboard shortcuts

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