bkirwi/decline
51.7
Adequate · 28 September 2026
2k
lines of production code
Scala
primary language
2
measurements over time
What this system is
Decline is a Scala library for building command-line interfaces, providing robust argument parsing for various types including Java Time, paths, and refined types. It supports multiple platforms (JVM, Node.js, Native) and integrates with Cats Effect for polymorphic, effect-based applications. The system features structured, themeable help output and includes performance benchmarks to ensure efficient parsing.
How it got here
2016–2017 — Initial scaffolding and platform expansion
9 changes.
The project was initialized with core scaffolding, documentation, and build configuration, establishing the foundation for the decline command-line parser library. Significant work focused on expanding platform support by adding Scala.js Node.js compatibility, integrating refined types for argument validation, and enhancing help output with structured, themeable rendering.
2018–2021 — Multi-platform support and testing
6 changes.
This period focused on extending the library's platform compatibility by introducing Scala Native support and a polymorphic CommandIOApp for effect-based applications. Significant effort was also dedicated to enhancing test coverage through JMH benchmarks, property-based testing, and specific suites for Java Time and CommandIOApp behavior.
Features
Add Node.js environment and argument support for Scala.js
The \core/js\ module now exposes \PlatformApp.ambientArgs\ and \PlatformApp.ambientEnvs\ to retrieve command-line arguments and environment variables when running in a Node.js context. This allows Scala.js applications using the library to access runtime platform data that was previously unavailable, enhancing compatibility with server-side JavaScript environments.
core/js · high confidence
Add Scala Native platform support with environment and path argument handling
This change introduces a new Scala Native platform implementation for the library. It adds \PlatformApp\ which provides stub implementations for \ambientArgs\ and \ambientEnvs\ (returning \None\), ensuring compatibility with the existing API surface while native-specific environment retrieval is not yet implemented. It also adds \PlatformArguments\ which defines a \Path\ argument reader that correctly handles \InvalidPathException\ during path parsing, aligning native behavior with other platforms.
core/native · high confidence
Add support for ChronoUnit and platform-specific ambient data
Users can now accept \java.time.temporal.ChronoUnit\ values (such as \half-days\) as command-line arguments via a new implicit \Argument\ implementation. Additionally, the \PlatformApp\ object now exposes \ambientArgs\ and \ambientEnvs\ methods to retrieve command-line arguments and environment variables when running under Node.js via Scala.js, while \PlatformArguments\ provides the JVM-specific argument readers.
core/jvm/src/main · high confidence
Add support for refined types in argument parsing
Users can now use refined types (from the eu.timepit.refined library) as command-line argument types. The new \refined\ module provides an implicit \Argument\ instance that parses the underlying value and validates it against the refinement predicate, returning a validation error if the predicate fails. This allows command-line arguments to be constrained by refined types, such as ensuring an integer is positive.
refined · high confidence
Initial project scaffolding and documentation
The repository has been initialized with core project files, including a README describing the \decline\ command-line parser library, a CONTRIBUTING guide referencing the Typelevel Code of Conduct, and an Apache 2.0 LICENSE. Build configuration is established via \.scalafmt.conf\ (configured for Scala 2.12 and version 3.0.3) and \.gitignore\ (excluding build artifacts and IDE files), with the project version set to 2.6.3-SNAPSHOT in \version.sbt\.
(repo-wide) · high confidence
Introduce CommandIOApp for polymorphic effect-based CLI applications
A new \CommandIOApp\ abstract class is added to the \effect/shared\ module, allowing users to build command-line applications that are polymorphic over the effect type (e.g., supporting both JVM and Node.js environments via Cats Effect). This class extends \IOApp\ and provides a \main\ method returning \Opts\[IO\[ExitCode\]\]\, handling argument parsing, help display, and exit codes through a shared \run\ implementation that leverages \Sync\ and \Console\ type classes.
effect/shared · high confidence
Behavioural changes
Help output is now structured, themeable, and supports environment variables
The help text rendering has been completely rewritten to use a structured data model (HelpArgs) instead of a flat case class, allowing for fine-grained control over the output via the new HelpFormat API. Users can now toggle individual sections (commands, options, environment variables, usage, errors, description) and enable or disable colors, including automatic support for the NO\_COLOR environment variable. The help output now explicitly lists environment variables associated with options, supports multi-line descriptions, and provides better error reporting. To maintain binary compatibility with the previous Help structure, deprecated synthetic methods and constructors are preserved in the Help class and BinCompat traits for Scala 2 and 3.
core/shared/src/main · high confidence
Test coverage
Added JMH benchmarks for argument parsing performance; Added JVM-specific tests for CommandIOApp behavior; Added discipline-based property tests for Argument validation; Added example CLI applications for testing; Added test coverage for Argument, Help, Parsing, and Usage components; Added tests for Java Time argument parsing; Added tests for Path and ChronoUnit argument parsing.
Dependencies
Upgrade core dependencies and add Scala Native support
The build configuration updates Cats to version 2.13.0 and Cats Effect to 3.7.0, while also adding support for Scala Native across the core, refined, and effect modules. Additionally, the refined integration is updated to version 0.11.3, and the project now cross-builds for Scala 2.12, 2.13, and 3.3.7.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 60 → 52 (-7.9)
- Rubric changed (rubric-2026.09.8 → rubric-2026.09.16) — scores are not directly comparable.
Lenses
- Code Health 97 → 97 (+0.0)
- Architecture 100 → 100 (+0.0)
- Maturity 52 → 52 (+0.0)
- Readiness 53 → 36 (-17.5)
- Security 64 → 64 (+0.0)
Resolved (3)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Off-boarding risk: anonymized user #1
New (2)
- Dependency hygiene PARTLY measured — sbt declarations read, no exact version to grade for currency
- Off-boarding risk: anonymized user #1
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
bkirwi/decline was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 28 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 77f0e5228ef5b8213c361ec1eb5c1236fbceba4e — the exact code this score is about.
- Scored under rubric-2026.09.16 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-d46da229e3fd.