Skip to content

Commit 51f7f90

Browse files
committed
Add commands
Document lsinitcpio (mkinitcpio initramfs inspector) and castor (terminal video caster to DLNA TVs).
1 parent 8dd884b commit 51f7f90

3 files changed

Lines changed: 227 additions & 0 deletions

File tree

assets/commands/castor.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# TAGLINE
2+
3+
cast web video streams to a smart TV from the terminal
4+
5+
# TLDR
6+
7+
**Discover** DLNA/UPnP cast targets on the local network
8+
9+
```castor scan```
10+
11+
**Cast interactively** (browse titles in the TUI; needs a TMDB API key)
12+
13+
```castor cast```
14+
15+
Cast a **movie by IMDB/TMDB id** via configured sources
16+
17+
```castor cast movie tt12300742```
18+
19+
Cast a TV **episode** by id
20+
21+
```castor cast episode tt2699128 --season 1 --episode 3```
22+
23+
Cast the video playing on a **web page**
24+
25+
```castor cast player https://example.com/watch/some-video```
26+
27+
Cast a **raw stream URL**
28+
29+
```castor cast url https://example.com/stream.m3u8```
30+
31+
**Dry-run** a cast (print found URLs without sending to the TV)
32+
33+
```castor cast movie --dry-run tt33028778```
34+
35+
Show **version / build** info
36+
37+
```castor info```
38+
39+
# SYNOPSIS
40+
41+
**castor** [*global-options*] *command* [*args*]
42+
43+
# DESCRIPTION
44+
45+
**castor** is a terminal tool that extracts a video stream from a web page (or a direct URL / media id), optionally transcodes it, and casts it in real time to a smart TV or networked media renderer on the same LAN. It launches headless Chrome, watches network traffic over the Chrome DevTools Protocol to locate the stream the page loads, then replays that stream to a DLNA/UPnP device (Chromecast support is experimental).
46+
47+
Unlike screen mirroring, Castor sends the real stream so resolution and quality are preserved. Optional whisper-based subtitles can be burned into the video. Castor ships **no** content catalog and **no** sources of its own; you configure authorized sources in `config.yaml` (or cast a page/URL you already have access to).
48+
49+
Native binaries need **Chrome/Chromium**, **ffmpeg**, and **ffprobe** on `PATH`. Device discovery uses SSDP multicast, so the host must share a network with the TV.
50+
51+
# COMMANDS
52+
53+
**scan**
54+
55+
> Discover DLNA/UPnP (and experimental Chromecast) devices on the local network.
56+
57+
**cast**
58+
59+
> Cast a title or stream. Subcommands / modes include interactive browse (`castor cast`), `movie`, `episode`, `player` (web page URL), and `url` (raw stream).
60+
61+
**info**
62+
63+
> Print version and build information.
64+
65+
# PARAMETERS
66+
67+
**--config** _file_
68+
69+
> Path to configuration file (default: `config.yaml` in the current directory).
70+
71+
**--debug**
72+
73+
> Enable verbose logging (global flag before the subcommand).
74+
75+
**--dry-run**
76+
77+
> With `cast movie` / similar: resolve and print stream URLs without casting.
78+
79+
**--season** _n_, **--episode** _n_
80+
81+
> Season and episode numbers for `cast episode`.
82+
83+
# CONFIGURATION
84+
85+
Castor requires a `config.yaml` in the working directory (or via **--config**). A minimal file names the target device and your own sources:
86+
87+
```
88+
device:
89+
name: "Living Room TV"
90+
type: dlna
91+
92+
sources:
93+
- proxies: ["https://your-source.example"]
94+
templates:
95+
movie: "/embed/movie/{itemID}"
96+
episode: "/embed/tv/{itemID}/{season}-{episode}"
97+
```
98+
99+
Optional `tmdb.api_key` enables the interactive browser. Secrets can go in a sibling `config.local.yaml` that overlays the main file. Environment variables of the form `CASTOR_SECTION__FIELD` also override settings. Auto-generated burned-in subtitles:
100+
101+
```
102+
whisper:
103+
enable: true
104+
```
105+
106+
# CAVEATS
107+
108+
Device discovery and casting require the host to be on the same LAN as the TV. Docker only works with `--network host` on a real Linux host; Docker Desktop on macOS/Windows cannot reach the LAN for SSDP. Chromecast support is experimental. Castor is a proof of concept for stream extraction and casting engineering—it hosts no content; only cast material you are authorized to access.
109+
110+
# SEE ALSO
111+
112+
[ffmpeg](/man/ffmpeg)(1), [ffprobe](/man/ffprobe)(1), [chromium](/man/chromium)(1), [curl](/man/curl)(1)
113+
114+
# RESOURCES
115+
116+
```[Source code](https://github.com/stupside/castor)```
117+
118+
```[Documentation](https://github.com/stupside/castor#readme)```
119+
120+
<!-- verified: 2026-07-19 -->

assets/commands/index.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,7 @@ carton.md
10531053
cashd.md
10541054
cast.md
10551055
castero.md
1056+
castor.md
10561057
castxml.md
10571058
cat.md
10581059
catchsegv.md
@@ -4232,6 +4233,7 @@ lsd.md
42324233
lsdev.md
42334234
lsfd.md
42344235
lshw.md
4236+
lsinitcpio.md
42354237
lsinitrd.md
42364238
lsipc.md
42374239
lsix.md

assets/commands/lsinitcpio.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# TAGLINE
2+
3+
examine the contents of an mkinitcpio initramfs image
4+
5+
# TLDR
6+
7+
**List** the files inside an initramfs image
8+
9+
```lsinitcpio /boot/initramfs-linux.img```
10+
11+
**Analyze** an image (kernel version, modules, binaries, early CPIO)
12+
13+
```lsinitcpio --analyze /boot/initramfs-linux.img```
14+
15+
Show the **configuration** the image was built with
16+
17+
```lsinitcpio --config /boot/initramfs-linux.img```
18+
19+
**Extract** the image into the current directory
20+
21+
```lsinitcpio --extract /boot/initramfs-linux.img```
22+
23+
List contents with **verbose** long-style output
24+
25+
```lsinitcpio -v /boot/initramfs-linux.img```
26+
27+
List or extract only the **early CPIO** segment
28+
29+
```lsinitcpio --early /boot/initramfs-linux.img```
30+
31+
List or extract only the **main CPIO** segment
32+
33+
```lsinitcpio --cpio /boot/initramfs-linux.img```
34+
35+
# SYNOPSIS
36+
37+
**lsinitcpio** [*action*] [*options*] *image*
38+
39+
# DESCRIPTION
40+
41+
**lsinitcpio** examines the contents of an initcpio (initramfs) image produced by **mkinitcpio**. Without any action flags it lists the files stored in the image. It is part of the mkinitcpio package on Arch Linux and related distributions and is useful for verifying what hooks, modules, and binaries were included after building an image.
42+
43+
Images may contain an early CPIO archive (microcode, early firmware) followed by the main compressed CPIO. The **--early** and **--cpio** options restrict listing or extraction to one of those segments.
44+
45+
# ACTIONS
46+
47+
**-a**, **--analyze**
48+
49+
> Analyze the image and print a human-readable summary (kernel version, early CPIO presence, included modules and binaries, and similar metadata).
50+
51+
**-c**, **--config**
52+
53+
> Show the configuration file the given image was built with.
54+
55+
**-l**, **--list**
56+
57+
> List the contents of the archive. This is the default action. Pass **-v** for long-style output.
58+
59+
**-x**, **--extract**
60+
61+
> Extract the given image into the current working directory.
62+
63+
# OPTIONS
64+
65+
**-h**, **--help**
66+
67+
> Print a short overview of available command-line switches.
68+
69+
**-n**, **--nocolor**
70+
71+
> Disable color output.
72+
73+
**-V**, **--version**
74+
75+
> Display version information.
76+
77+
**-v**, **--verbose**
78+
79+
> Be more verbose. Shows long-style listing output, and when extracting, prints files as they are written.
80+
81+
**--cpio**
82+
83+
> List or extract only the main CPIO image.
84+
85+
**--early**
86+
87+
> List or extract only the early CPIO image if it exists. See **mkinitcpio**(8) for details on early CPIO images.
88+
89+
# CAVEATS
90+
91+
Requires an initramfs path as an argument (unlike some distro tools that default to the running kernel's image). Extraction writes into the current directory and can overwrite existing files; run from an empty or dedicated directory. Part of the Arch Linux **mkinitcpio** package, not a standalone utility on all distributions.
92+
93+
# SEE ALSO
94+
95+
[mkinitcpio](/man/mkinitcpio)(8), [lsinitrd](/man/lsinitrd)(1), [dracut](/man/dracut)(8), [cpio](/man/cpio)(1)
96+
97+
# RESOURCES
98+
99+
```[Source code](https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio)```
100+
101+
```[Homepage](https://wiki.archlinux.org/title/Mkinitcpio)```
102+
103+
```[Documentation](https://man.archlinux.org/man/lsinitcpio.1)```
104+
105+
<!-- verified: 2026-07-19 -->

0 commit comments

Comments
 (0)