Releases: Octave-Energy/mender-cli
Release list
v3.6.1
v3.6.1
Date: 2026-08-04
Previous release: v3.6.0
Summary
Adds focused CSV export via --include-inventory-keys and --include-tag-keys
flags on export report.
Highlights
- Filtered inventory columns: Pass
--include-inventory-keys thing_name,sn_device
to export only the named[inventory]attributes as columns. All other scopes
([identity],[tags], etc.) are unaffected. - Filtered tag columns: Pass
--include-tag-keys name,customerto export only
the named[tags]attributes as columns. - Both flags are optional and independent. When omitted, all keys in the
respective scope are exported (existing default behaviour unchanged). - Missing keys produce empty cells, not misaligned rows — alignment is always
correct regardless of how many devices have a given attribute.
Example Usage
# Export only specific inventory attributes
mender-cli export report --include-inventory-keys thing_name,sn_device,site_id
# Export only specific tags
mender-cli export report --include-tag-keys name,customer
# Focused export combining both filters
mender-cli export report --include-inventory-keys thing_name,site_id --include-tag-keys name,customer -o focused.csvUpgrading
- No breaking changes. Both new flags are purely additive and optional.
v3.6.0
v3.6.0
Date: 2026-07-28
Previous release: v3.5.1
Summary
Adds exec command for non-interactive command execution on one or more
devices.
Highlights
execcommand: Execute shell commands on devices non-interactively,
capturing output and exit codes. Unliketerminal,execruns a command
(or chained commands), captures the output, and returns.- Multi-device support: Target multiple devices using the same flexible
options asdeployments create:--device(repeatable),--filter-multi,
--group, or--all. - Sequential execution: Devices are processed one at a time with
per-device output blocks and a summary at the end. - Confirmation dialog: Shows target count before executing. Use
--yes
to skip for automation. - Timeout control: Per-device timeout with
--timeout(default 60s). - Dry-run mode: Use
--dry-runto preview targeted devices without
executing. - JSON output: Use
--rawfor machine-readable JSON output.
Example Usage
# Execute on a single device by ID
mender-cli exec --command 'hostname' --device abc123
# Execute on a device matching a filter
mender-cli exec --command 'uptime' -f hostname=my-gateway
# Execute on all devices in a group
mender-cli exec --command 'cat /etc/os-release' --group production
# Execute on all devices matching a filter (multi-device)
mender-cli exec --command 'df -h' --filter-multi device_type=gateway
# Execute on all accepted devices
mender-cli exec --command 'date' --all --yes
# Chained commands (use && to proceed only if previous succeeds)
mender-cli exec --command 'apt update && apt upgrade -y' --group staging --timeout 5m
# Dry run to preview targets
mender-cli exec --command 'hostname' --group production --dry-run
# JSON output for scripting
mender-cli exec --command 'hostname' --device abc123 --yes --rawNotes
- Command wrapping: Commands are automatically terminated with
; exit $?
to capture the exit code. Trailing semicolons are stripped to avoid syntax
errors. - Exit codes: CLI exits 0 if all devices succeed, 1 if any fail. A summary
table shows per-device exit codes. - Mutually exclusive targeting:
--device,-f/--filter,--filter-multi,
--group, and--allcannot be combined.
Upgrading
- No breaking changes. The new
execcommand is purely additive.
v3.5.1
v3.5.1
Date: 2026-07-28
Previous release: v3.5.0
Summary
Adds --filter-multi flag to deployments create for targeting multiple
devices via inventory filters.
Highlights
--filter-multiflag: Target all devices matching inventory filters
instead of requiring exactly one match. Useful for deploying to device
classes (e.g.--filter-multi "device_type=gateway").- Confirmation dialog: Shows matched device count before creating
deployment. Use--yesto skip for automation.
Example Usage
# Deploy to all gateways
mender-cli deployments create --release v2.0 --filter-multi "device_type=gateway"
# Combine multiple filters (AND logic)
mender-cli deployments create --release v2.0 \
--filter-multi "device_type=gateway" \
--filter-multi "tags/environment=production"
# Skip confirmation for automation
mender-cli deployments create --release v2.0 --filter-multi "device_type=gateway" --yesNotes
- Existing
--filterunchanged: The-f/--filterflag still requires
exactly one matching device, showing matched IDs in the error message when
multiple devices match. - Mutually exclusive:
--filter-multicannot be combined with--device,
-f/--filter,--group, or--all.
Upgrading
- No breaking changes. The new
--filter-multiflag is purely additive.
v3.5.0
v3.5.0
Date: 2026-07-27
Previous release: v3.4.0
Summary
Adds a new export report command for exporting comprehensive device reports
in CSV format, including inventory attributes, group membership, and deployment
history.
Highlights
Device Report Export
mender-cli export report: Export all devices with their complete
inventory, group assignment, and latest deployment status to CSV.- Dynamic column discovery: Automatically includes all inventory attributes
found across the fleet as columns. Devices missing an attribute have an empty
cell — no schema definition required. - Pipe-delimited CSV: Uses
|as the field delimiter to avoid conflicts
with comma-containing inventory values (e.g.update_modules). - Fixed columns:
ID,LastSeen,Group,LatestDeploymentName,
LatestDeploymentArtifact,LatestDeploymentStatus,
LatestDeploymentCreated,LatestDeploymentFinished. - Inventory columns: All attributes are included, sorted alphabetically and
prefixed with their scope (e.g.[inventory]artifact_name,[identity]mac,
[tags]environment). - Filtering: Supports
--groupto export only devices in a specific group. - Output: Writes to stdout by default; use
-o/--outputto write to a file.
Example Usage
# Export all devices to stdout
mender-cli export report
# Export to a file
mender-cli export report -o devices.csv
# Export only production devices
mender-cli export report --group production -o prod-devices.csvNotes
- Large fleets: The export fetches inventory, groups, and deployment history
for every device. For fleets with thousands of devices, this may take several
minutes. - Deployment history: Only the most recent deployment per device is
included. Devices without any deployment history have empty deployment
columns.
Upgrading
- No breaking changes. The new
exportcommand tree is purely additive.
v3.4.0
v3.4.0
Date: 2026-07-27
Previous release: v3.3.0
Summary
Adds a new deployments create command for creating deployments from the CLI,
and introduces interactive confirmation dialogs for destructive operations.
Highlights
Deployment Creation
mender-cli deployments create: Create deployments targeting (mutually
exclusive — exactly one required):- Individual devices by ID (
--device, repeatable) - A single device by inventory filter (
-f/--filter) - All devices in a static group (
--group) - All accepted devices (
--all)
- Individual devices by ID (
- Interactive confirmation dialog by default; use
--yesfor automation - Supports
--forceto skip already-installed checks - Supports
--retriesfor automatic retry on failure - Custom deployment names with
--name(defaults to release name) - Raw JSON output with
-r/--rawfor scripting
Safety Confirmations for Destructive Operations
mender-cli artifacts delete: Now requires interactive confirmation
before deleting. Use--yesto skip for automation/scripting.- Consistent confirmation pattern across
artifacts delete,inventory groups delete,token clear, anddeployments create.
Notes
- Safety by default: Destructive commands (
artifacts delete,
deployments create) now require interactive confirmation. For CI/CD
pipelines and scripts, use--yesto skip the prompt. - Non-interactive detection: When stdin is not a TTY (e.g., in CI), these
commands will fail with an error unless--yesis provided, preventing
accidental execution.
Upgrading
- Breaking change for scripts: If you have scripts that call
mender-cli artifacts deletewithout user interaction, you must add--yes
to continue working.
v3.3.0
v3.3.0
Date: 2026-07-27
Previous release: v3.2.2
Summary
Adds comprehensive inventory group management commands: list devices in a group,
delete groups, bulk add/remove devices from groups, and per-device group
management (get/set/clear).
Highlights
mender-cli inventory groups get --name <name>: List all device IDs
belonging to a static group (auto-paginated). Supports-r/--rawfor JSON
output.mender-cli inventory groups delete --name <name>: Delete a static group
by removing all devices from it. Requires interactive confirmation unless
--yesis provided.mender-cli inventory groups add-devices --name <name> DEVICE_ID...: Add
one or more devices to a static group. Creates the group implicitly if it
does not exist.mender-cli inventory groups remove-devices --name <name> DEVICE_ID...:
Remove one or more devices from a static group.mender-cli inventory device-group get: Show which group a single device
belongs to. Target with--idor-f/--filter.mender-cli inventory device-group set --name <group>: Assign a device to
a group. If the device is already in another group, it is moved. Target with
--idor-f/--filter.mender-cli inventory device-group clear: Remove a device from its
current group. Target with--idor-f/--filter.
Notes
- No explicit "create group" command: Groups are created implicitly when
devices are added viaadd-devicesordevice-group set. This matches the
Mender API behavior. - No "rename group" command: The API does not support group renaming. To
rename, delete the old group and recreate with the new name. - Single group per device: A device can belong to at most one static group.
Assigning to a new group automatically removes from the previous one.
Upgrading
- No breaking changes. Existing commands and flags are unchanged; the new
device-groupsubcommand tree and expandedgroupssubcommands are purely
additive.
v3.2.2
v3.2.2
Date: 2026-07-24
Previous release: v3.2.1
Summary
Fixes mender-cli token set so long Personal Access Tokens can be pasted and
saved interactively again, while keeping the prompt masked.
Highlights
- Interactive PAT paste fix:
mender-cli token setno longer truncates
long pasted tokens in interactive mode. - Masked prompt restored: interactive token entry continues to hide the
token while typing/pasting, instead of echoing the raw value. - Regression coverage: adds targeted test coverage for long interactive
token entry so the interactive and piped paths stay aligned.
Upgrading
- No breaking changes. Existing commands and flags are unchanged.
v3.2.1
v3.2.1
Date: 2026-06-17
Previous release: v3.2.0
Summary
Improves remote terminal session shutdown behavior so local termination paths
cleanly close websocket sessions and reduce stale DeviceConnect session state.
Highlights
- Graceful terminal shutdown path:
mender-cli terminalnow uses an
idempotent shutdown flow that performs best-effort shell stop, websocket
close handshake, unconditional transport close, and bounded cleanup wait. - Signal/hangup handling improvements: terminal shutdown behavior is aligned
for local escape and host termination paths (including terminal hangup and
stdin EOF cases), with safer signal subscription handling. - Race/deadlock hardening: replaced shared terminal runtime state with
coordinated stop signaling to avoid shutdown races and blocking stop calls. - Better websocket handshake errors: connection failures now include HTTP
status and bounded response body content when available, making session-limit
or authorization problems easier to diagnose. - Tests: adds targeted unit coverage for shutdown idempotency, shutdown
ordering, failure-continuation behavior, and handshake diagnostics, plus
integration test coverage for SIGTERM/stdin-EOF terminal termination followed
by immediate reconnect. - Acceptance test UX:
make build-acceptanceandmake run-acceptance
now fail fast with a clear message when thetests/mender_serversubmodule
is not initialized.
Upgrading
- No breaking changes. Existing commands and flags are unchanged.
v3.2.0
v3.2.0
Date: 2026-06-10
Previous release: v3.1.0
Summary
Adds a new top-level deployments command group for listing and inspecting
deployments and fetching per-device deployment logs.
Highlights
mender-cli deployments list: List all deployments (auto-paginated).
Filter with--id/--name(repeatable),--status
(inprogress|finished|pending),--type(software|configuration),
--created-before/--created-after(Unix timestamps), and order with
--sort(asc|desc).-d/--detailcontrols verbosity;-r/--rawprints the
server JSON. Shell completion is available for the enum flags.mender-cli deployments count: Return only the total number of
deployments (read from the server'sX-Total-Countheader), accepting the
same filters aslist(except--sort).mender-cli deployments search: Find deployments by who they target —
--group <name>,--device <id>, or-f/--filter(inventory attributes
resolving to exactly one device, likedevices get --filter). Matches each
deployment's declared group/device targeting;--status/--typenarrow the
scan.mender-cli deployments get --id <id>: Show a single deployment, with
-d/--detailand-r/--raw.mender-cli deployments stats --id <id>: Show per-status device counts
for a deployment.mender-cli deployments devices --id <id>: List a deployment's devices
and their per-device status (auto-paginated), optionally filtered with
--status(completion supported).mender-cli deployments log --id <id> --device <device-id>: Print a
device's deployment log as plain text — handy for CI debugging.
Upgrading
- No breaking changes. Existing commands and flags are unchanged; the
deploymentsgroup is purely additive.