A Nix library for building full-featured CLI tools with flag parsing, auto-documentation, and tab completion in pure Nix.
Pog is a Nix library designed for building full-featured command-line interface (CLI) tools using pure Nix and bash. It solves the problem of creating robust CLI applications with features like flag parsing, auto-generated documentation, and tab completion without leaving the Nix ecosystem. By leveraging nixpkgs, it allows developers to define CLI tools declaratively and manage dependencies reproducibly.
Nix developers and system administrators who need to create maintainable, feature-rich CLI tools integrated with the Nix ecosystem. It's ideal for those building internal tools, deployment scripts, or automation utilities in a Nix-based environment.
Developers choose Pog because it provides a declarative, Nix-native way to build CLI tools with built-in best practices like auto-documentation and tab completion. Its integration with nixpkgs ensures dependency management and reproducibility, while helper functions simplify common scripting tasks.
🤯 a new, powerful way to do bash scripts
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Tools are defined using a clear Nix schema that automatically generates help text and documentation, as shown in the API reference for the main function parameters like name, description, and flags.
Seamlessly leverages nixpkgs for dependency management and reproducibility, with runtimeInputs handling dependencies like awscli2 and kubectl in the example, ensuring consistent environments.
Includes out-of-the-box tab completion, interactive prompts, and terminal styling without external libraries, as highlighted in the features list for auto-documentation and flag systems.
Provides common helpers like debug logging, error handling with die, and spinner animations, simplifying bash script development, detailed in the helper functions section such as var.empty and file.exists.
Every Pog tool requires Nix to run, which adds deployment complexity and limits portability to non-Nix systems, as indicated by the need for Nix overlays or flakes in setup examples.
The script logic must be written in bash, which may lack advanced error handling and performance optimizations compared to full programming languages, constraining complex application logic.
Primarily designed for single-command tools with flags; hierarchical subcommands are not natively supported, as the API focuses on arguments rather than nested commands, potentially requiring manual workarounds.
Initial configuration involves Nix-specific concepts like fetching tarballs or flakes, which can be daunting for developers unfamiliar with the ecosystem, as seen in the quick start requiring sha256 hashes and overlay setups.