All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.6.0] - 2026-11-12
Added
param/3accepts a type, andnew/1casts the value to that type. A parameter without a type works as before. (#19)- Built-in types:
:any,:binary,:boolean,:date,:decimal,:float,:integer,:map,:naive_datetime,:naive_datetime_usec,:string,:time,:time_usec,:utc_datetime,:utc_datetime_usec,{:array, type}, and{:map, type}. The:decimaltype needs the optional:decimalpackage, version 3.0 or later. Commandex.Typebehaviour for custom types. A type can take options from theparamline through theinit/1andcast/2callbacks.:requiredoption forparam. A required parameter without a value gets a:requirederror.new/1adds an:invaliderror for a value that does not cast, and halts a command that has an:invalidor:requirederror.paramraises anArgumentErrorat compile time for an unknown type, an unknown option, or a default that is not valid for the type.Commandex.halt_on_errors/1halts a command that has errors.- Command structs have a
__meta__field that holds aCommandex.Metadatastruct with the parameter types.
Changed
- Minimum supported Elixir version is now 1.16.
[0.5.2] - 2025-12-21
Added
halt/2optionally accepts asuccess: trueflag, allowing the command to halt early successfully. (#16)
[0.5.1] - 2024-09-09
Fixed
import_deps: [:commandex]in.formatter.exsworks again. (#15)
[0.5.0] - 2024-09-08
Added
run/0function for commands that don't define any parameters.
Changed
- Raise
ArgumentErrorif an invalidpipelineis defined.
[0.4.1] - 2020-06-26
Fixed
- Set
falseparameter correctly when given a Map of params. Was previously evaluating tonil.
[0.4.0] - 2020-05-03
Added
- Default typespecs and documentation for modules using Commandex.
Note: this will break any existing modules that have
@type talready defined.
[0.3.0] - 2020-01-31
Added
paramnow supports a:defaultoption. (eg.param :limit, default: 10)- Added
new/0to initialize commands without any parameters. pipelinecan now use a 1-arity anonymous function. (eg.pipeline &IO.inspect/1)
[0.2.0] - 2020-01-21
Added
- Enhanced documentation to show
&run/1shortcut
Changed
- Renamed
:errorto:errorson Command struct
[0.1.0] - 2020-01-18
- Initial release