Official Packages
The Whim project maintains Trifle packages on Codeberg. Each package has its own repository.
These packages use names under Trifle\. Their Git tags define their
versions. Install them through Whim’s Git package manager.
| Package | Description | Install |
|---|---|---|
ansi | ANSI colours, styles, cursor movement, and screen controls. | whim add git+ssh://[email protected]/trifle/ansi |
args | Typed command-line parsing and generated usage. | whim add git+ssh://[email protected]/trifle/args |
cache | Stampede-safe local LRU and database caches. | whim add git+ssh://[email protected]/trifle/cache |
config | Typed configuration from values, files, and the environment. | whim add git+ssh://[email protected]/trifle/config |
console | Terminal output, tables, progress, and prompts. | whim add git+ssh://[email protected]/trifle/console |
cqrs | Command and query buses with events, logs, and traces. | whim add git+ssh://[email protected]/trifle/cqrs |
diff | Myers diffs for values and text, with unified output. | whim add git+ssh://[email protected]/trifle/diff |
dotenv | .env parsing and environment layering. | whim add git+ssh://[email protected]/trifle/dotenv |
event | Typed events with hierarchy-aware listeners. | whim add git+ssh://[email protected]/trifle/event |
expect | Fluent expectations for tests. | whim add git+ssh://[email protected]/trifle/expect |
fake | Deterministic fake data generated from a seed. | whim add git+ssh://[email protected]/trifle/fake |
feed | Atom and RSS feed generation. | whim add git+ssh://[email protected]/trifle/feed |
humanize | Human-readable durations, sizes, counts, and numbers. | whim add git+ssh://[email protected]/trifle/humanize |
lock | Leased mutual exclusion over pluggable stores. | whim add git+ssh://[email protected]/trifle/lock |
log | Structured logging with composable loggers. | whim add git+ssh://[email protected]/trifle/log |
markdown | CommonMark and GitHub-flavoured Markdown parsing. | whim add git+ssh://[email protected]/trifle/markdown |
markdown-ansi | Markdown rendering for styled terminal text. | whim add git+ssh://[email protected]/trifle/markdown-ansi |
markdown-html | Markdown rendering for HTML. | whim add git+ssh://[email protected]/trifle/markdown-html |
money | Integer money, ISO 4217 currencies, and lossless allocation. | whim add git+ssh://[email protected]/trifle/money |
otp | HOTP, TOTP, and authenticator provisioning. | whim add git+ssh://[email protected]/trifle/otp |
qr | QR code generation with matrix and SVG output. | whim add git+ssh://[email protected]/trifle/qr |
queue | Message queues with retries, workers, and pluggable stores. | whim add git+ssh://[email protected]/trifle/queue |
seal | Sealed payloads and signed JWTs with key rotation. | whim add git+ssh://[email protected]/trifle/seal |
semver | Semantic versions and Cargo-style requirements. | whim add git+ssh://[email protected]/trifle/semver |
template | Logic-less Mustache templates rendered from JSON values. | whim add git+ssh://[email protected]/trifle/template |
theme | Paints and themes for terminal text. | whim add git+ssh://[email protected]/trifle/theme |
trace | Timed spans recorded through structured logs. | whim add git+ssh://[email protected]/trifle/trace |
Codeberg hosts all Trifle package repositories.
After you add Trifle\Diff and load vendor/autoload.whim, you can compare two
sequences:
use Trifle\Diff;
use Trifle\Diff\Operation;
$edits = Diff\diff::<string>(vec['a', 'b', 'c'], vec['a', 'c', 'd']);
foreach ($edits as $edit) {
$marker = match ($edit->operation) {
Operation::Keep => ' ',
Operation::Delete => '-',
Operation::Insert => '+',
};
write_line!($marker . ' ' . $edit->value);
}
See Git Dependencies for manifests, locks, updates, and autoloading.