Skip to main content

mr resources list

List Resources, optionally filtered. Filter flags combine with AND. Comma-separated ID lists on --tags, --groups, --notes are conjunctive: a resource must carry every ID in the list. Pass a single ID to match on one. Date flags (--created-before, --created-after) accept YYYY-MM-DD or an RFC 3339 timestamp. Sort with --sort-by=created_at,name; append desc or asc to an entry to set its direction (--sort-by='name desc'). Names are lowercase database columns, and an entry the server does not recognise is ignored. Pagination via the global --page flag (default page size 50).

--include-subgroups widens --owner-id to the whole group subtree: resources owned by the given group or by any of its descendant subgroups, recursively. It has no effect without --owner-id.

--mrql applies an MRQL filter expression, with type = "resource" implied (the same expression the list-page filter bar accepts). It uses the WHERE-clause grammar only -- no ORDER BY, LIMIT, GROUP BY, SCOPE, or $name parameters -- and composes with the other filter flags via AND. An invalid expression returns an error. Example: --mrql 'tags = "vacation" AND created > -30d'.

Usage

mr resources list

Examples

List all resources (paged)

mr resources list

Filter by content type

mr resources list --content-type image/jpeg

Filter by tag + date

mr resources list --tags 5 --created-after 2026-01-01 --json | jq -r '.[].Name'

Filter with an MRQL expression (type = "resource" implied)

mr resources list --mrql 'tags = "vacation" AND created > -30d'

Flags

FlagTypeDefaultDescription
--namestring``Filter by name
--descriptionstring``Filter by description
--content-typestring``Filter by content type
--owner-iduint0Filter by owner group ID
--include-subgroupsboolfalseWith --owner-id: also match resources owned by descendant subgroups
--tagsstring``Comma-separated tag IDs to filter by
--groupsstring``Comma-separated group IDs to filter by
--notesstring``Comma-separated note IDs to filter by
--resource-category-iduint0Filter by resource category ID
--created-beforestring``Filter by creation date (before)
--created-afterstring``Filter by creation date (after)
--min-widthuint0Minimum width
--min-heightuint0Minimum height
--max-widthuint0Maximum width
--max-heightuint0Maximum height
--hashstring``Filter by hash
--original-namestring``Filter by original name
--mrqlstring``MRQL filter expression (type = "resource" implied), e.g. 'tags = "vacation" AND created > -30d'
--sort-bystring``Comma-separated sort fields

Inherited global flags

FlagTypeDefaultDescription
--jsonboolfalseOutput raw JSON
--no-headerboolfalseOmit table headers
--pageint1Page number for list commands (default page size: 50)
--quietboolfalseOnly output IDs
--serverstringhttp://localhost:8181mahresources server URL (env: MAHRESOURCES_URL)

Output

Array of resources with id, name, content type, size, dimensions, owner id, created

Exit Codes

0 on success; 1 on any error

See Also