A CLI tool for querying and inspecting the media in your Radarr and Sonarr instances
If you're looking for a more general tool to manage/change your *arrs, check out managarr.
brew install adamhl8/inspectarr/inspectarr
scoop bucket add inspectarr https://github.com/adamhl8/scoop-inspectarr.git
scoop install inspectarr
Binaries are available on the releases page.
Why are the binaries so big?
This project is written in TypeScript and the binaries are generated via Bun's compile feature. The Bun runtime itself is included in the binary, hence the size.Inspectarr requires your Radarr/Sonarr URL and API key to connect to your instances. You can provide these via:
- Environment variables:
RADARR_URL
,RADARR_API_KEY
,SONARR_URL
,SONARR_API_KEY
- Or directly when running Inspectarr:
- e.g.
inspectarr radarr --url 'your-radarr-url' --api-key 'your-api-key'
- e.g.
inspectarr <radarr|sonarr> [options]... [query]
- Use
inspectarr help <command>
to see more detailed usage information:inspectarr help sonarr
Running Inspectarr without a query will display all of your downloaded media:
inspectarr radarr
- By default, Inspectarr outputs a markdown table of the results.
You can also output the results as JSON if you want to do some further processing (pipe it to another command, etc.):
inspectarr sonarr --output json | json_pp
Inspectarr uses FilterQL to filter/transform the results. See the FilterQL readme for all of the available features.
Examples:
# display media with a bluray source and 1080p (resolution starts with 1920)
inspectarr radarr 'source == bluray && resolution ^= 1920'
# display media from specific release groups
inspectarr sonarr 'releaseGroup == NTb || releaseGroup == FLUX'
# display media where the title contains 'star wars' (case-insensitive)
inspectarr sonarr 'title i*= "star wars"'
# display media where the title does *not* contain 'star wars'
inspectarr sonarr '!title i*= "star wars"'
# display media released after 1990, then sort by title
inspectarr radarr 'year > 1990 | SORT title'
# display media where monitored is true and where the video codec is x265 (contains '265')
inspectarr radarr 'monitored && videoCodec *= 265'
Tip
Some fields are hidden by default to prevent the markdown table from being too wide.
- To display hidden fields, use the
--all
option.
You don't have to display hidden fields to use them in queries.
Tip
If the markdown table is too wide, use the EXCLUDE
operation to exclude specific fields/columns.
For example: inspectarr sonarr --all '* | EXCLUDE audioLanguage subtitleLanguage'
General fields:
title
(alias:t
) - Media titleyear
(alias:y
) - Release yearmonitored
(alias:m
) - Whether the media is monitoredreleaseGroup
(alias:rg
) - Release group namesource
(alias:src
) - Media source (bluray, webdl, etc.)qualityProfile
(alias:qp
) - Quality profile namevideoCodec
(alias:vc
) - Video codec (x264, x265, etc.)audioCodec
(alias:ac
) - Audio codec (AAC, EAC3, etc.)audioChannels
(alias:ach
) - Audio channels (2, 5.1, etc.)audioLanguage
(alias:al
) - List of audio languages (eng, jpn, etc.)subtitleLanguage
(alias:sl
) - List of subtitle languages (eng, spa, etc.)resolution
(alias:rs
) - Video resolutionsize
(alias:sz
) - File size
Sonarr-specific fields:
type
- Series type (standard, anime, daily)season
(alias:s
) - Season numberepisode
(alias:e
) - Episode number
These fields are used internally and are never displayed in the markdown table. The JSON output will always include all fields.
rawResolution
- Total pixel countrawSize
- File size in bytes
In addition to the built-in FilterQL operations, the following operations are available:
EXCLUDE
: Exclude the given fields/columns from the outputEXCLUDE [field]...
# display media with a bluray source and exclude the 'resolution' and 'size' columns
inspectarr radarr 'source == bluray | EXCLUDE resolution size'
Service options:
--url
: The URL of the instance (default: "<SERVICE>_URL" environment variable)--api-key
: The API key for the instance (default: "<SERVICE>_API_KEY" environment variable)
Output options:
--all
: Show fields that are hidden by default in the markdown table--output md|json
: The type of output to generate (json
implies--quiet
) (default:md
)--quiet
: Suppress all output except the markdown/JSON--short-headers
: Use the field aliases as the markdown table headers (can help reduce the width of the table)
Sonarr-specific options:
By default, media from Sonarr is displayed by series.
--by-season
: Display media by individual season--by-episode
: Display media by individual episode