LinuxCommandLibrary

komac

Generate Winget manifest files

TLDR

Create a new package from scratch

$ komac new [Package.Identifier] --version [1.2.3] --urls [https://example.com/app.exe]
copy

Update an existing package with a new version
$ komac update [Package.Identifier] --version [1.2.3] --urls [https://example.com/app.exe]
copy

Update a package with multiple URLs and automatically submit
$ komac update [Package.Identifier] --version [1.2.3] --urls [https://example.com/app.exe https://example.com/app.msi ...] --submit
copy

Remove a version from winget-pkgs
$ komac remove [Package.Identifier] --version [1.2.3]
copy

List all versions for a package
$ komac list-versions [Package.Identifier]
copy

Sync your fork of winget-pkgs with the upstream repository
$ komac sync-fork
copy

Update the stored GitHub token
$ komac token update --token [your_github_token]
copy

Generate shell autocompletion script
$ komac complete [bash|zsh|fish|powershell]
copy

SYNOPSIS

komac [global_options] <command> [command_options] [arguments...]

PARAMETERS

-h, --help
    Displays help information for the command or a specific subcommand.

-v, --verbose
    Enables verbose output, providing more detailed information during execution for debugging purposes.

--version
    Prints the komac client version information.

--config <path>
    Specifies the path to a custom configuration file for komac, overriding default settings.

--dry-run
    Executes the command in dry-run mode, showing what would happen without making actual changes to files.

-f, --file <path>
    Specifies the path to a Kubernetes manifest file or a directory containing manifests to process.

--recursive
    Processes files in subdirectories recursively when a directory is specified with the --file option.

DESCRIPTION

komac is a specialized command-line interface (CLI) tool designed to streamline the management and maintenance of Kubernetes manifest files. Its core purpose is to ensure the cleanliness, consistency, and correctness of the YAML configurations used for deploying and managing applications within Kubernetes clusters. komac achieves this by offering functionalities such as automated linting, opinionated formatting, and comprehensive validation against established best practices and predefined rules. This helps developers and DevOps engineers to identify potential issues, enforce coding standards, and prevent common configuration errors before deployment. By integrating komac into their development pipelines, teams can significantly reduce manual review efforts, improve the reliability and security of their Kubernetes deployments, and maintain high-quality, standardized infrastructure-as-code. It serves as an essential utility for anyone working with complex Kubernetes environments.

CAVEATS

komac is not typically included in standard Linux distributions and must be installed separately, often via a package manager like `brew`, `go install`, or by downloading pre-compiled binaries. Its functionality is highly specialized for Kubernetes manifest files, meaning it's not a general-purpose text processing tool. The effectiveness of its linting and formatting capabilities depends on the quality and comprehensiveness of its internal rule sets, which might be opinionated and require user configuration to align with specific organizational standards.

KEY SUBCOMMANDS

komac operates using various subcommands, each performing a specific task:

  • validate: Checks Kubernetes manifests against a set of rules for correctness and best practices, often including schema validation.
  • fmt: Formats Kubernetes YAML files according to a consistent, opinionated style, enhancing readability and consistency across projects.
  • lint: Identifies potential issues, errors, or deviations from recommended practices within manifest files, providing actionable feedback.
  • version: Displays the version of the komac tool, useful for debugging and compatibility checks.
  • help: Provides detailed help for komac or a specific subcommand, explaining its usage and available options.

HISTORY

komac emerged as part of the growing ecosystem of tools addressing the complexities of Kubernetes configuration management. Developed to tackle common challenges like YAML consistency, error prevention, and adherence to best practices, it aims to automate aspects of Kubernetes manifest validation and formatting. Its development is often driven by community contributions and the evolving needs of cloud-native development workflows, reflecting a broader industry trend towards 'shift-left' practices in infrastructure-as-code.

SEE ALSO

kubectl(1), helm(1), kustomize(1), yamllint(1)

Copied to clipboard