All notable changes to Trebejo are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
2.0.0 - 2026-09-18
Added
Trebejo.Error— typed error wrapper around raw command failures (lib/trebejo/error.ex). The struct carries akind/0of:not_found | :permission_denied | :invalid_args | :timeout | :signal | :exit_nonzero | :port_closed | :circuit_open | :rate_limited | :bulkhead_full | :unknown, plus the raw exit code, command line, stderr and duration.Trebejo.Error.classify_exit/1maps Unix exit codes to kinds (127 →:not_found, 126 →:permission_denied, 130/137/143/139 →:signal, etc).Trebejo.Stream—Port.open/2-based streaming runner (lib/trebejo/stream.ex).open/3returns a lazyStream.t()of stdout chunks;lines/3yields complete lines.:stderroption is:mergeonly (:separatedeprecated in 2.0, reserved for 2.1).Trebejo.Runner— behaviour for executing external commands with a swappable runner. The defaultTrebejo.Util.Runnerdelegates toTrebejo.Util.run_cmd/3; tests can installTrebejo.Mox.RunnerviaTrebejo.Runner.set_runner/1.Trebejo.Mox— minimal stubbing layer for tests.stub_cmd/3intercepts a specific(cmd_name, args)triple;stub_cmd_pattern/2matches a regex on the joined command line;reset_stubs/0clears. Stubs live inTrebejo.Mox.Server(anAgent).Trebejo.Breaker— circuit-breaker integration (lib/trebejo/breaker.ex).with_breaker/3wraps an arbitrary function inArrea.CircuitBreaker.call/3, lazily starting the breaker on first use. TranslatesArreaerrors into%Trebejo.Error{kind: :circuit_open | :timeout | :unknown}.Trebejo.Postgres—psql/pg_dump/pg_restorewrapper (lib/trebejo/postgres.ex).execute/2,dump/1,restore/1,stream/2. Supports:host,:port,:user,:database,:password(passed asPGPASSWORDenv var, never-W),:format,:timeout,:breaker.Trebejo.Redis—redis-cliwrapper (lib/trebejo/redis.ex).run/2,ping?/1,monitor/1. Supports:host,:port,:database,:password(via-aorREDISCLI_AUTHenv var with:auth, :env),:tls,:timeout,:breaker.Trebejo.GitHub—ghCLI wrapper (lib/trebejo/github.ex) for the highest-ROI subcommands:pr(pr_list,pr_view,pr_create),issue(issue_list,issue_view,issue_create),release(release_list,release_create). Plus a genericTrebejo.GitHub.run/2for anything else.- Integration tests —
test/integration_test.exsprobes real binaries (git,docker,redis-cli,psql,gh) with@tag :integration. Skip-by-default; run withmix test --only integration. Trebejo.SafeCommand— validated wrapper aroundArrea.Command.execute/2: single entry point for all shell execution with basic safety checks.
Changed
Trebejo.Util.run_cmd/3now wraps every error path in a%Trebejo.Error{}and applies a default:timeoutof 30 s (was unlimited; passthrough toArrea.Command).Trebejo.Util.run_ok/3return type changed from{:error, binary()}to{:error, %Trebejo.Error{}}. Existing call-sites only pattern-match on:okor{:error, _}so the change is source-compatible.- Trebejo 2.0 depends on
Arrea3.0 (required forArrea.CircuitBreakersingle-flight +Arrea.Telemetry).
Removed
Trebejo.SafeCommand.run_legacy/3— dead code, only referenced in its own docstring. UseTrebejo.Util.run_cmd_legacy/3directly.
Fixed
Trebejo.Proc.parse_tasklist/1no longer raisesMatchErroron Windows rows with a number of columns other than 5. Bad rows are now logged and skipped.Trebejo.Proc.parse_ps_output/1andparse_tasklist/1emitLogger.warninginstead of silently dropping malformed input.Trebejo.Proc.logs/2body depth reduced to 2 by extractinglogs_linux/2andlogs_macos/2helpers; the file-level credo disable forCyclomaticComplexityis no longer needed.Trebejo.Packages.installed?/2@spectightened fromboolean | {:error, String.t()}toboolean()— no clause actually returns{:error, _}.
1.0.0 - 2026-07-09
Added
Trebejo is the shell-command layer extracted from Apero v2.x.
Trebejo.Docker— Docker/Podman lifecycle (fromApero.Docker)Trebejo.Git/Trebejo.Git.Local— Git repository management (fromApero.Git)Trebejo.OS— OS inspection including arch, kernel, memory, CPU count (shell-based parts fromApero.OS)Trebejo.Proc— Process listing, signalling, VM introspection (shell-based parts fromApero.Proc)Trebejo.SSH— SSH command execution (fromApero.SSH)Trebejo.Kubernetes— kubectl wrappers (fromApero.Kubernetes)Trebejo.Compress— zip/tar/gzip (fromApero.Compress)Trebejo.Network— network probes (fromApero.Network)Trebejo.File— file watching via Arrea.WorkerSupervisor (from Apero.File.watch, which moved to Trebejo.File)
All dependencies on Arrea.Command are internal to Trebejo. Apero remains a pure utility library with no Arrea dependency.