dodot

module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 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-manpage command
dodot/main 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.
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.
commands
Package commands provides high-level command implementations for dodot.
Package commands provides high-level command implementations for dodot.
commands/status
Package status provides the status command implementation for dodot.
Package status provides the status command implementation for dodot.
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.
errors
Package errors defines error types and codes for dodot.
Package errors defines error types and codes for dodot.
filesystem
Package filesystem provides filesystem implementations for dodot.
Package filesystem provides filesystem implementations for dodot.
lipbalm
Package lipbalm provides a simple template engine for rich terminal rendering.
Package lipbalm provides a simple template engine for rich terminal rendering.
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.
output
Package output implements a declarative, template-based rendering system for dodot's command-line interface.
Package output implements a declarative, template-based rendering system for dodot's command-line interface.
output/styles
Package styles defines the visual styling for dodot's terminal output.
Package styles defines the visual styling for dodot's terminal output.
packs
Package packs provides functionality for discovering, loading, and managing dotfile packs within the dodot system.
Package packs provides functionality for discovering, loading, and managing dotfile packs within the dodot system.
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.
powerups/homebrew
Package homebrew provides the BrewPowerUp implementation for dodot.
Package homebrew provides the BrewPowerUp implementation for dodot.
powerups/install
Package install provides the InstallScriptPowerUp implementation for dodot.
Package install provides the InstallScriptPowerUp implementation for dodot.
powerups/path
Package path provides the PathPowerUp implementation for dodot.
Package path provides the PathPowerUp implementation for dodot.
powerups/shell_add_path
Package shell_add_path provides an alternative PATH management powerup for dodot.
Package shell_add_path provides an alternative PATH management powerup for dodot.
powerups/shell_profile
Package shell_profile provides the ShellProfilePowerUp implementation for dodot.
Package shell_profile provides the ShellProfilePowerUp implementation for dodot.
powerups/symlink
Package symlink provides the SymlinkPowerUp implementation for dodot.
Package symlink provides the SymlinkPowerUp implementation for dodot.
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