Skip to content

Commit 1b13a0b

Browse files
committed
release
0 parents  commit 1b13a0b

30 files changed

+20165
-0
lines changed

.githooks/pre-commit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
bun lint

.github/workflows/release.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
include:
15+
- target: bun-windows-x64
16+
artifact: inspectarr-windows-x64.exe
17+
- target: bun-darwin-x64
18+
artifact: inspectarr-macos-x64
19+
- target: bun-darwin-arm64
20+
artifact: inspectarr-macos-arm64
21+
- target: bun-linux-x64-musl
22+
artifact: inspectarr-linux-x64
23+
- target: bun-linux-arm64-musl
24+
artifact: inspectarr-linux-arm64
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v5
29+
30+
- name: Setup Bun
31+
uses: oven-sh/setup-bun@v2
32+
with:
33+
bun-version: latest
34+
35+
- name: Install dependencies
36+
run: bun install --production
37+
38+
- name: Build binary
39+
run: bun build --compile --sourcemap --target=${{ matrix.target }} --outfile=${{ matrix.artifact }} src/index.ts
40+
41+
- name: Upload artifact
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: ${{ matrix.artifact }}
45+
path: ${{ matrix.artifact }}
46+
47+
release:
48+
needs: build
49+
if: github.ref_type == 'tag'
50+
runs-on: ubuntu-latest
51+
permissions:
52+
contents: write
53+
54+
steps:
55+
- name: Download all artifacts
56+
uses: actions/download-artifact@v4
57+
with:
58+
path: ./artifacts
59+
60+
- name: Release
61+
uses: softprops/action-gh-release@v2
62+
with:
63+
files: |
64+
./artifacts/inspectarr-windows-x64.exe/inspectarr-windows-x64.exe
65+
./artifacts/inspectarr-macos-x64/inspectarr-macos-x64
66+
./artifacts/inspectarr-macos-arm64/inspectarr-macos-arm64
67+
./artifacts/inspectarr-linux-x64/inspectarr-linux-x64
68+
./artifacts/inspectarr-linux-arm64/inspectarr-linux-arm64

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
dist/
3+
.env

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 adamhl8
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
<p align="center">
2+
<h1 align="center"><img style="color:#36BCF7; width:38px; height:38px;" src="https://raw.githubusercontent.com/adamhl8/inspectarr/refs/heads/main/assets/logo.svg"> Inspectarr</h1>
3+
</p>
4+
5+
A CLI tool for querying and inspecting the media in your Radarr and Sonarr instances
6+
7+
<p align="center">
8+
<img alt="demo" src="https://github.com/adamhl8/inspectarr/blob/main/assets/demo.gif">
9+
</p>
10+
11+
---
12+
13+
<!-- toc -->
14+
15+
- [Installation](#installation)
16+
- [Homebrew (macOS/Linux)](#homebrew-macoslinux)
17+
- [Scoop (Windows)](#scoop-windows)
18+
- [Manual](#manual)
19+
- [Usage](#usage)
20+
- [Setup](#setup)
21+
- [Basic Usage](#basic-usage)
22+
- [Queries](#queries)
23+
- [Inspectarr Flags](#inspectarr-flags)
24+
25+
<!-- tocstop -->
26+
27+
If you're looking for a tool to manage/change your \*arrs, check out [managarr](https://github.com/Dark-Alex-17/managarr).
28+
29+
## Installation
30+
31+
### Homebrew (macOS/Linux)
32+
33+
```sh
34+
brew install adamhl8/inspectarr/inspectarr
35+
```
36+
37+
### Scoop (Windows)
38+
39+
```sh
40+
scoop bucket add inspectarr https://github.com/adamhl8/scoop-inspectarr.git
41+
scoop install inspectarr
42+
```
43+
44+
### Manual
45+
46+
Binaries are available on the [releases](https://github.com/adamhl8/inspectarr/releases) page.
47+
48+
<details>
49+
<summary><i>Why are the binaries so big?</i></summary>
50+
This project is written in TypeScript and the binaries are generated via <a href="https://bun.com/docs/bundler/executables">Bun's compile feature</a>. The Bun runtime itself is included in the binary, hence the size.
51+
</details>
52+
53+
## Usage
54+
55+
### Setup
56+
57+
Inspectarr requires your Radarr/Sonarr URL and API key to connect to your instances. You can provide these via:
58+
59+
- Environment variables: `RADARR_URL`, `RADARR_API_KEY`, `SONARR_URL`, `SONARR_API_KEY`
60+
- Or directly when running Inspectarr:
61+
- e.g. `inspectarr radarr --url "your-radarr-url" --api-key 'your-api-key'`
62+
63+
### Basic Usage
64+
65+
Using Inspectarr generally looks like this: `inspectarr <radarr|sonarr> [flags]... [query]`
66+
67+
- Use `--help` to see all of the available flags on a subcommand: `inspectarr sonarr --help`
68+
69+
Running Inspectarr without a query will display _all_ of your downloaded media:
70+
71+
```sh
72+
inspectarr radarr
73+
```
74+
75+
- By default, Inspectarr outputs a markdown table of the results.
76+
77+
You can also output the results as JSON if you want to do some further processing (pipe it to another command, etc.):
78+
79+
```sh
80+
inspectarr sonarr --output json | json_pp
81+
```
82+
83+
### Queries
84+
85+
Inspectarr uses [FilterQL](https://github.com/adamhl8/filterql) to filter/transform the results. See the [FilterQL readme](https://github.com/adamhl8/filterql#queries) for all of the available features.
86+
87+
**Examples:**
88+
89+
```sh
90+
# display media with a bluray source and 1080p (resolution starts with 1920)
91+
inspectarr radarr 'source == bluray && resolution ^= 1920'
92+
93+
# display media from specific release groups
94+
inspectarr sonarr 'releaseGroup == AMZN || releaseGroup == NF'
95+
96+
# display media where the title contains 'star wars' (case-insensitive)
97+
inspectarr sonarr 'title i*= "star wars"'
98+
99+
# display media released after 1990 (media year is contained in the title column), then sort by title
100+
inspectarr radarr 'title *= 1990 | SORT title'
101+
102+
# displayed media where monitored is true and where the video codec is x265 (contains '265')
103+
inspectarr radarr 'monitored && videoCodec *= 265'
104+
```
105+
106+
#### Fields
107+
108+
**General fields:**
109+
110+
- `title` (alias: `t`) - Media title
111+
- `monitored` (alias: `m`) - Whether the media is monitored
112+
- `releaseGroup` (alias: `rg`) - Release group name
113+
- `source` (alias: `src`) - Media source (bluray, webdl, etc.)
114+
- `videoCodec` (alias: `vc`) - Video codec (x264, x265, etc.)
115+
- `audioCodec` (alias: `ac`) - Audio codec with audio channel info
116+
- `resolution` (alias: `rs`) - Video resolution
117+
- `size` (alias: `sz`) - File size
118+
119+
**Sonarr-specific fields:**
120+
121+
- `type` - Series type (standard, anime, daily)
122+
- `season` (alias: `s`) - Season number
123+
- `episode` (alias: `e`) - Episode number
124+
125+
#### Operations
126+
127+
In addition to the [built-in FilterQL operations](https://github.com/adamhl8/filterql#operations), the following operations are available:
128+
129+
- `EXCLUDE`: Exclude the given fields/columns from the output
130+
- `EXCLUDE [field]...`
131+
132+
```sh
133+
# display media with a bluray source and exclude the 'resolution' and 'size' columns
134+
inspectarr radarr 'source == bluray | EXCLUDE resolution size'
135+
```
136+
137+
### Inspectarr Flags
138+
139+
**General flags:**
140+
141+
- `--url`: The URL of the instance (default: the "\<SERVICE\>\_URL" environment variable)
142+
- `--api-key`: The API key for the instance (default: the "\<SERVICE\>\_API_KEY" environment variable)
143+
- `--output <md|json>`: The type of output to generate ("json" implies --quiet) (default: "md")
144+
- `--quiet`: Suppress all output except the markdown/JSON
145+
- `--short-headers`: Use the field aliases as the markdown table headers (can help reduce the width of the table)
146+
147+
**Sonarr-specific flags:**
148+
149+
By default, media from Sonarr is displayed by series.
150+
151+
- `--by-season`: Display media by individual season
152+
- `--by-episode`: Display media by individual episode

assets/demo.gif

114 KB
Loading

assets/logo.svg

Lines changed: 1 addition & 0 deletions
Loading

biome.jsonc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/latest/schema.json",
3+
"extends": ["@adamhl8/configs/biome"]
4+
}

0 commit comments

Comments
 (0)